How can you access the Start Menu from a VB form for both Windows XP & 2000?

I've done a lot of research and haven't found anything that works for this.

I have this:

Private Sub PicBoxStartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PicBoxStartButton.Click

    End Sub

I need to figure out some way to incorporate this code into it. To be honest, I'm not good enough (sad, I know) with VB to figure it out on my own.

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
          ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
      Private Const KEYEVENTF_KEYUP = &H2

      ' Press the Ctrl-Esc key
      keybd_event vbKeyControl, 0, 0, 0
      keybd_event vbKeyEscape, 0, 0, 0
      DoEvents
 
      ' Release the two keys
      keybd_event vbKeyControl, 0, KEYEVENTF_KEYUP, 0
      keybd_event vbKeyEscape, 0, KEYEVENTF_KEYUP, 0
      DoEvents

It looks as though this may work if I can just figure out how to make it fit my code.

try this...

Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
    Const VK_STARTKEY = &H5B
    Private Sub PicBoxStartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PicBoxStartButton.Click
        keybd_event(VK_STARTKEY, 0, 0, 0)
        keybd_event(VK_STARTKEY, 0, 2, 0)
    End Sub
This article has been dead for over six months. Start a new discussion instead.