Results 1 to 15 of 15

Thread: Form ALWAYS at Bottom

Threaded View

  1. #1

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Arrow Form ALWAYS at Bottom

    First see this code by bushmobile.
    This works perfectly. The form is always at bottom but on top of icons.

    Now enable web view on your desktop. Show any html file as wallpaper. Then run the following code and hit command1.

    See ? The form is now behind the icons.

    Any idea how to do this when webview is not enabled ?
    VB Code:
    1. Option Explicit
    2. ' Add 2 command buttons in the form
    3. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    4. Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    5. Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    6.  
    7. Dim Progman&
    8. Dim SHELLDLLDefView&
    9. Dim InternetExplorerServer&
    10.  
    11. Private Sub Command1_Click()
    12.     SetParent Me.hwnd, InternetExplorerServer
    13. End Sub
    14.  
    15. Private Sub Command2_Click()
    16.     SetParent Me.hwnd, Progman
    17. End Sub
    18.  
    19. Private Sub Form_Load()
    20.     Progman& = FindWindow("Progman", vbNullString)
    21.     SHELLDLLDefView& = FindWindowEx(Progman&, 0&, "SHELLDLL_DefView", vbNullString)
    22.     InternetExplorerServer& = FindWindowEx(SHELLDLLDefView&, 0&, "Internet Explorer_Server", vbNullString)
    23.     Command1.Caption = "InternetExplorerServer"
    24.     Command2.Caption = "Progman"
    25. End Sub
    Attached Images Attached Images  
    Last edited by iPrank; Aug 28th, 2006 at 04:27 AM. Reason: Added Screenshot
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


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