Results 1 to 13 of 13

Thread: Form Position [RESOLVED]

Threaded View

  1. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Form Always on Bottom

    This will keep your form always at the bottom

    VB Code:
    1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    2.                 ByVal lpClassName As String, _
    3.                 ByVal lpWindowName As String) As Long
    4.                
    5. Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _
    6.                 ByVal hWnd1 As Long, _
    7.                 ByVal hWnd2 As Long, _
    8.                 ByVal lpsz1 As String, _
    9.                 ByVal lpsz2 As String) As Long
    10.                
    11. Private Declare Function SetParent Lib "user32" ( _
    12.                 ByVal hWndChild As Long, _
    13.                 ByVal hWndNewParent As Long) As Long
    14.  
    15. Private Sub Form_Load()
    16.     Dim ProgMan&, shellDllDefView&, sysListView&
    17.    
    18.     ProgMan = FindWindow("progman", vbNullString)
    19.     shellDllDefView = FindWindowEx(ProgMan&, 0&, "shelldll_defview", vbNullString)
    20.     sysListView = FindWindowEx(shellDllDefView&, 0&, "syslistview32", vbNullString)
    21.    
    22.     SetParent Me.hwnd, sysListView
    23. End Sub

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