YourForm  Form_Deactivate Event
    YourForm.setfocus

解决方案 »

  1.   

    用API
    SetWindowPos
    SetFocus
      

  2.   

    SetWindowPos form1.hwnd, -1, 0, 0, 0, 0, 3
      

  3.   

    Kin_CIOM() (2001-10-20 16:51:17)  得0分 
    SetWindowPos form1.hwnd, -1, 0, 0, 0, 0, 3  
    你的做法虽然窗口还在最上,但系统的控制权还是可以被别的窗口占用
    我想要的是不能选择除此窗口以外的别的任何窗口
      

  4.   

    Public Enum FORM_FRAME_STYLE
        没有最大化最小化 = 0
        带有最大化按钮 = 1
        带有最小化按钮 = 2
    End EnumPublic Sub FormPos(ByVal FormhWnd As Long, ByVal FormPosition As FORM_POSITION)
        
        '设置窗口位置
        SetWindowPos FormhWnd, FormPosition, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZEEnd Sub
      

  5.   

    .show 1我知道,差的更远了
      

  6.   

    用API
    试试看把鼠标的范围限制在本窗口,再禁用键盘热键就行了