In VB6 you could do this
put in module: (change all types in declare to vb.net equivalents)
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const WS_EX_TRANSPARENT = &H20&
Public Const WS_EX_NOPARENTNOTIFY = &H4&
Global hwnd1 As Long
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal
hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long,
ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Global Const SWP_SHOWWINDOW = &H40
Global Const SWP_HIDEWINDOW = &H80
Now put this in your form or class whatever
'Default Property Values:
Const m_def_HideTaskBar = 0
'Property Variables:
Dim m_HideTaskBar As Boolean
Private Sub HideTheTaskBar(HideIt As Boolean)
hwnd1 = FindWindow("Shell_traywnd", "")
If HideIt Then
OK = SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
Else
OK = SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End If
End Sub
Private Sub Image1_Click()
HideTheTaskBar (HideTaskBar)
End Sub
Public Property Get HideTaskBar() As Boolean
HideTaskBar = m_HideTaskBar
End Property
Public Property Let HideTaskBar(ByVal New_HideTaskBar As Boolean)
m_HideTaskBar = New_HideTaskBar
HideTheTaskBar New_HideTaskBar
PropertyChanged "HideTaskBar"
End Property
Private Sub Form_Load()
m_HideTaskBar = m_def_HideTaskBar
End Sub
Take this code and modify a bit for .NET and it will work.
be sure to declare HWND variables as required and change declares as you
should.
HTH
Shane Story
spielmann said:
Hi
How can we hide and show the taskbar without dll on vb.net?
How can we set the scrollbar size without dll on vb.net?