Resolved how do i set window visibility , given a window handle ?

Raymond0517

New member
Joined
Dec 22, 2020
Messages
1
Programming Experience
Beginner
Hi, I am new to visual basic,
I was given a window handle (IntPtr),
how can I set visibility of this window to hide, in background, and in foreground visible ?

Thanks
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,397
Location
Sydney, Australia
Programming Experience
10+
You would use the ShowWindow API function. If you don't know how to use Platform Invoke (pinvoke) to call unmanaged functions then you should learn that first. When looking at examples, just be aware that a lot of the VB examples are written for VB6 rather than VB.NET. Such examples will use the Long data type where you need to use Integer.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,517
Location
Norway
Programming Experience
10+
Top Bottom