Joined: 04 May 2007 Posts: 955 Location: Why do you care?
Posted: Thu Jan 01, 2009 4:07 pm Post subject:
Or you can do it the .NET way.
You can find a handle to the window a number of ways (e.g., native APIs, or like this:)
Code:
Process p = Process.GetProcessesByName("notepad");
IntPtr hWnd = p.MainWindowHandle;
(Though I'm pretty sure the following also works with controls, so you could find the handle using FindWindowEx, or looping through the controls on the form gotten by this method)
Code:
Form f = Form.FromHandle( hWnd );
And hiding:
Code:
f.Hide();
Edit:
Whoops. You said VB. Just use a C# to VB converter, or convert it by hand. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum