Results 1 to 2 of 2

Thread: Anyone Uses/Used VB 3.0?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344
    I need help keeping my form ontop, I know code is pretty much similar but I can't get the difference. What sucks is I had it, and said im never gonna use vb3.0 again so erased it!!! Arghhh, if ya can help drop a reply. Thanks!
    -RaY
    VB .Net 2010 (Ultimate)

  2. #2
    Guest
    Code:
    ' in a module
    Declare Sub SetWindowPos Lib "User" (ByVal hWnd%, ByVal hWndInsertAfter%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal wFlags%)
    
    Const HWND_NOTOPMOST = -2
    Const SWP_NOMOVE = &H2
    Const SWP_NOSIZE = &H1
    Const SWP_NOACTIVATE = &H10
    Const HWND_TOPMOST = -1
    
    Sub OnTop(frm As Form, blnTF$)
    If blnTF = "True" Then
    SetWindowPos frm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE
    Else
    SetWindowPos frm.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE
    End If
    End Sub
    ' in form_load
    ontop Me, "True"
    I had to use Strings instead of Booleans because I dont think VB3 supports Boolean Variables.


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