learning33

I have only created console applications up until now. Now I need tp use a windows appliaction. But I'm having problems. Are there any conceptual guids on how Windows applications in particular work

Now to the problem. I need to get the forms handle into another class file so I can use it there. I can't figure out how to do this.


Re: Visual C# General Get a form handle into Program.cs

Jeremy Filburn

From inside the form's class, you can pass this.Handle to another class as an IntPtr.

If your class needs to get the windows handle externally, you would have to use an API.






Re: Visual C# General Get a form handle into Program.cs

learning33

Thanks Jeremy! I've figured it out with your help!