Option ExplicitPrivate Const MOD_ALT = &H1
Private Const MOD_CONTROL = &H2
Private Const MOD_SHIFT = &H4
Private Const PM_REMOVE = &H1
Private Const WM_HOTKEY = &H312
Private Type POINTAPI
    x As Long
    y As Long
End Type
Private Type Msg
    hWnd As Long
    Message As Long
    wParam As Long
    lParam As Long
    time As Long
    pt As POINTAPI
End Type
Private Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Private Declare Function UnregisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long) As Long
Private Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (lpMsg As Msg, ByVal hWnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long, ByVal wRemoveMsg As Long) As Long
Private Declare Function WaitMessage Lib "user32" () As Long
Private bCancel As Boolean
Private Sub ProcessMessages()
    Dim Message As Msg
    'loop until bCancel is set to True
    Do While Not bCancel
        'wait for a message
        WaitMessage
        'check if it's a HOTKEY-message
        If PeekMessage(Message, Me.hWnd, WM_HOTKEY, WM_HOTKEY, PM_REMOVE) Then
            WindowState = vbMaximized
            Me.SetFocus
        End If
        'let the operating system process other events
        DoEvents
    Loop
End Sub
Private Sub Form_Load()
    Dim ret As Long
    bCancel = False
    'register the Ctrl-F hotkey
    ret = RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyf3)
    'show some information
    Me.AutoRedraw = True
    Me.Print "按 F3 本窗口便被呼叫,并最大化!"
    'show the form and
    Show
    'process the Hotkey messages
    ProcessMessages
End Sub
Private Sub Form_Unload(Cancel As Integer)
    bCancel = True
    'unregister hotkey
    Call UnregisterHotKey(Me.hWnd, &HBFFF&)
End Sub

解决方案 »

  1.   

    你就把2)编写搜索程序 再给我讲讲吧。
    似乎光光把以上程序copy去,其他什么都不做似乎不能做成效果(别晕,别晕,昨天睡的太晚,现在脑子还疼)
      

  2.   

    如果有MSDN的话,它有个笔记本程序的例程。在系统中搜索SDINOTE.VBP,够用了。
      

  3.   

    笔记本程序??是notepad嘛?和文件搜索有什么关系?◎_◎
      

  4.   

    DimVar() ( )研究msdn够仔细的!
      

  5.   

    同意上面的'声明API函数   Declare Function ShellExecute Lib "shell32.dll" Alias _     "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _     As String, ByVal lpFile As String, ByVal lpParameters _     As String, ByVal lpDirectory As String, ByVal nShowCmd _     As Long) As Long   '定义常量参数   Const SW_SHOW = 5   '通用调用查找对话框函数   Public Sub ShowFindDialog(Optional InitialDirectory As String)   ShellExecute 0, "find", _    IIf(InitialDirectory = "", "", InitialDirectory), _    vbNullString, vbNullString, SW_SHOW   End Sub   '调用查找对话框例程   Call ShowFindDialog("C:\Program Files") 
      

  6.   

    Indexing Service或者搜索所有磁盘文件
      

  7.   

    说清楚一点好嘛?或者去这儿:
    <a href="http://expert.csdn.net/Expert/topic/1524/1524545.xml?temp=2.938479E-02">Here</a>还有100点等你拿(好像广告-_-)
      

  8.   

    http://expert.csdn.net/Expert/topic/1524/1524545.xml?temp=2.938479E-02
      

  9.   

    似乎不支持Html或者Ubb........
    就这儿啦:http://expert.csdn.net/Expert/topic/1524/1524545.xml?temp=2.938479E-02