Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region "Impertent"
- Imports System.Runtime.InteropServices
- #End Region
- Public Class TaskBoard
- Sub New()
- End Sub
- #Region "Private Share Vars"
- Private Shared WM_CLOSE As Integer = &H10
- #End Region
- #Region "WIN32 API"
- <DllImport("coredll.dll", EntryPoint:="FindWindow")> _
- Private Shared Function FindWindow( _
- ByVal lpClassName As String, _
- ByVal lpWindowName As String) As IntPtr
- End Function
- <DllImport("coredll.dll", EntryPoint:="FindWindow")> _
- Private Shared Function FindWindowByClass( _
- ByVal lpClassName As String, _
- ByVal zero As IntPtr) As IntPtr
- End Function
- <DllImport("coredll.dll", EntryPoint:="FindWindow")> _
- Private Shared Function FindWindowByCaption( _
- ByVal zero As IntPtr, _
- ByVal lpWindowName As String) As IntPtr
- End Function
- <DllImport("coredll.dll", EntryPoint:="SendMessage")> _
- Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Integer
- End Function
- #End Region
- Public Sub DisableTaskMenu()
- Dim TaskMenu As IntPtr = FindWindow("HHTaskBar", Nothing)
- SendMessage(TaskMenu, WM_CLOSE, Nothing, Nothing)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement