><(({°>

archives
it happens mostly at night
08 May, 2008
# quicklaunch enable through vb.net
In trying to find a way to enable the quicklaunch toolbar automatically during WDS, BDD, MDT, MDS or whatever you want to call it this week deployment, I've created the following:

Imports System.Runtime.InteropServices

Public Class Form1
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Integer, ByVal nCmdShow As Integer, ByVal wParam As Integer, ByVal lparam As Integer) As Integer
Const WM_USER As Int32 = &H400

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SendMessage(FindWindow("Shell_TrayWnd", vbNullString), WM_USER + 237, 0, 1)
End Sub
End Class

Just create a basic form with one button (button1 as above) and that'll do it. Customize it all you want, make it automatic, but that's the "root veggies" (as a vegetarian, i feel weird saying that that's the meat of the program :) )
sounddoc
Comments:

Post a Comment