Change Window Class Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I got a C# form that imports a DLL i developped. I need this DLL to find the
form's window handle (using FindWindow API function for example). I thought
doing this by using RegisterClass function for my form class name, but i did
not manage to get it work.

Is there a way to do this with those Windows API functions ?

Thanks for help.
Regards, Flo.
 
Hi Flo,

If you have a form that calls a DLL you can send the handle using Form.hwnd
if you can.

If you need to use FindWindow remember to include the namespace

like:

FindWindow("MSITPro::EventQueue",NULL);
 
Hi Salvador,

i know there is a Handle property on my Windows.Form that i could call by
merging both projects. But i want the DLL to be independant from the form
that will call it, but , the tricky thing is that i need to find the form's
handle when the DLL will list the displayed windows. That is why i first
thought of using the FindWindow function, and registering a specific class
name for my form in order to find it.

Still did not manage how to do that. My form class name registering still
fails....

If anyone got a clue on this... :) Thx in advance.

Flo.
 
Back
Top