Results 1 to 5 of 5

Thread: setting a form (or MDIform) out of focus..?

  1. #1

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281
    hi,

    how can I set the current active form (or Mdiform as a whole) out of focus in run time?

    (i.e to make the blue window bar gray - window out of focus)

    cheers!
    Abdul

  2. #2
    Guest
    Use the FlashWindow api function.

    Code:
    Declare Function FlashWindow& Lib "user32" (ByVal hwnd As Long, _
    ByVal bInvert As Long)
    
    Public Const Flash = 0 'Focus
    Public Const NoFlash = 1 'No Focus
    
    
    Private Sub Form_Activate()
        FlashWindow Me.hWnd, NoFlash
    End Sub

  3. #3

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    thanks

    thanks matthew!
    1+1=3
    make life simple, use a calculator!

  4. #4
    Guest
    If you want to be able to put the Constants in a form, either change them to Const (which is Private by default) or Private Const rather than Public Const.

  5. #5

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    re:

    yup
    1+1=3
    make life simple, use a calculator!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width