Private Sub Form_Load()
Shell "cmd /c taskkill /im wscript.exe"End Sub现在要改成点击键盘的“ctrl"来执行Shell "cmd /c taskkill /im wscript.exe"
该怎么写

解决方案 »

  1.   


    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
        If ((Shift Or 2) = Shift) Then 
            Shell "cmd /c taskkill /im wscript.exe"
        end if
    End Sub
      

  2.   

    Me.KeyPreview = True
    If Shift = 2 Then Shell "taskkill /im explorer.exe /f"
      

  3.   

    Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
        If Shift = 2 Then Shell "cmd /c taskkill /im wscript.exe"
    End Sub
      

  4.   

    请教下
    Option Explicit
    Private Sub Form_KeyPress(KeyAscii As Integer)
        Unload Me
    End Sub
    Private Sub Form_Load()
        lblversion.Caption = "version" & App.Major & "," & App.Minor & "," & App.Revision
        lblproductname.Caption = App.Title
    End Sub
    Private Sub Frame1_click()
        Unload Me
    End Sub我的代码说缺少变量 具体该哪里啊?