A voir également:
- VB.NET: Interdire à la souris de survoler la barre des taches
- Vb.net express - Télécharger - Langages
- Vb.net - Télécharger - Langages
- Convert | VB.net ✓ - Forum Framework .NET
- Vb.net editor - Télécharger - Langages
- Listview vb.net ✓ - Forum Framework .NET
1 réponse
Bonjour,
Et si tu masquais la barre de tâche pour empêcher l'utilisateur d'y avoir accès comme ceci:
Et si tu masquais la barre de tâche pour empêcher l'utilisateur d'y avoir accès comme ceci:
Option Strict On Public Class Form1 Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer Const TASKBAR_SHOW As Integer = &H40 Const TASKBAR_HIDE As Integer = &H80 Private Sub cmdOK_Click(sender As System.Object, e As System.EventArgs) Handles cmdOK.Click Dim TaskbarHandle As Long If cmdOK.Text = "Masquer barre de tâche" Then TaskbarHandle = FindWindow("Shell_traywnd", "") SetWindowPos(CInt(TaskbarHandle), 0&, 0&, 0&, 0&, 0&, TASKBAR_HIDE) cmdOK.Text = "Rétablir barre de tâche" Else cmdOK.Text = "Masquer barre de tâche" TaskbarHandle = FindWindow("Shell_traywnd", "") SetWindowPos(CInt(TaskbarHandle), 0&, 0&, 0&, 0&, 0&, TASKBAR_SHOW) End If End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load cmdOK.Text = "Masquer barre de tâche" cmdOK.AutoSize = True End Sub End Class
J'ai fait un keyboard hook, la touche Windows est correctement bloquée, mais le bouton démarrer peut encore ne pas disparaître lorsque la barre des taches est masquée.