[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

How to get the icon of the main EXE???

Harkos

7/24/2003 6:33:00 PM

Hi everyone,

This question could not be more complicated. I have 2 DLL and 1 EXE file.
This application launches a form existing on the first DLL and passes it to
the second DLL. Noticing that this form is the only relation between the
three, how can I make this second DLL retrieve the main icon of the EXE
file? I have already seen many methods within the Assembly method but their
description is too cloudy.

I provided an example just to illustrate my problem. Please excuse any lack
like using clauses because they're not important right now:

/// EXE file
using System;
using MyLibrary1;
using MyLibrary2;

class Runner {
static void Main( ) {
MyLibrary2.App.Run(new MyLibrary1.Form1( ));
}
}

/// MyLibrary1.DLL need no explanation
/// It only has that form (Form1).

/// MyLibrary2.DLL
using System;

public class App {
public static void Run(Form f) {
// Right here I need the EXE's main icon
}
}