Hiding Windows Form

Raddy13

New member
Joined
Feb 9, 2007
Messages
2
Programming Experience
1-3
I'm writing a kind of joke program for my friend. Basically it causes harmless error messages to pop-up. I set the showintaksbar to false and made the opacity 0, but it still shows up when you alt+tab. Does anyone know how to hide it?
 
You'll need to use native WIN32 for this....

VB.NET:
Private Const GWL_EXSTYLE As Int32 = -20
Private Const WS_EX_TOOLWINDOW As Int32 = &H80I
Private Const WS_EX_APPWINDOW As Int32 = &H40000I

 
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Intptr, ByVal nIndex As Int32) As Int32

Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Intptr, ByVal nIndex As Int32, ByVal dwNewLong As Int32) As Int32

To use call...

VB.NET:
SetWindowLong(Me.Handle, GWL_EXSTYLE, GetWindowLong(Me.Handle, GWL_EXSTYLE Or WS_EX_TOOLWINDOW AND NOT WS_EX_APPWINDOW))

Now I think that is right, as it is a conversion from some C# code.
 
Back
Top