wince 隐藏任务栏

前端之家收集整理的这篇文章主要介绍了wince 隐藏任务栏前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Imports System.Runtime.InteropServices

<DllImport("coredll.dll")> _
Friend Shared Function IsWindowVisible(ByVal hwnd As Integer) As Boolean
End Function
<DllImport("coredll.dll")> _
Friend Shared Function FindWindow(ByVal lpClassName As String,ByVal lpWindowName As String) As Integer
End Function
<DllImport("coredll.dll")> _
Friend Shared Function EnableWindow(ByVal hwnd As Integer,ByVal fEnable As Integer) As Integer
End Function
<DllImport("coredll.dll")> _
Friend Shared Function ShowWindow(ByVal hwnd As Integer,ByVal nCmdShow As Integer) As Integer
End Function

Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1

Private Sub btnHide_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles btnHide.Click '屏蔽系统任务栏 Dim htask As IntPtr = FindWindow("HHTaskBar",Nothing) If Not IsWindowVisible(htask) Then ShowWindow(htask,SW_SHOWNORMAL) Else EnableWindow(htask,False) ShowWindow(htask,SW_HIDE) End If End Sub

猜你在找的VB相关文章