Results 1 to 3 of 3

Thread: BACKGROUND FORM

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116
    Hi,

    Anyone has an idea about how to force a Form
    to remain behind all other Forms (i.e. a
    background Form).

    I tried vbModal and Zorder, but didn't work.

    Thank you
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Try this:
    Code:
    Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
    Public Const HWND_BOTTOM = 1
    Public Const SWP_NOMOVE = &H2
    Public Const SWP_NOACTIVATE = &H10
    Public Const SWP_NOSIZE = &H1
    
    SetWindowPos Form1.hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE
    This will make your form to be behind all windows.

    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Thumbs up

    Finally!!! Thanks it worked.
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

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