Results 1 to 5 of 5

Thread: PLEASE HELP ME NO ONE EVER HELP ME !!!!!!!!!!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204
    you know how in vb you have the the toolbar and you csn make it stik to the side . How can i do that in my project just making it stay on the side , if you can help me thank you.
    WHat would we do with out Microsoft.
    A lot more.

  2. #2
    Guest
    You mean dock a window?

    Code:
    Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
    
    
    Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
    
    
    Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
        End Type
        
        Dim StartMenu As Long
        Dim What As RECT
        
    
    Public Sub BorderToRight(FormName As Form)
    
    
        For TempNum = 1 To 999
            TempString$ = Space$(128)
            TempNum2 = GetClassName(TempNum, TempString$, 128)
            TempNum3 = Left$(TempString$, TempNum2)
            If LCase(TempNum3) = "shell_traywnd" Then GoTo StartMenuFound
        Next TempNum
    StartMenuFound:
        GetWindowRect TempNum, What
        StartMenu = What.Top * 15
    
    
        FormName.Move Screen.Width - FormName.Width, 0, FormName.Width, StartMenu
        End Sub
    
    Usage:  Call BorderToRight(Me)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204
    no no i mean liek its lke a magnet it like go to the side if it it like 50pix away then it like magnets to the side like winamp when you bring the playlist close to one of the other windows it like locks the winodws together
    WHat would we do with out Microsoft.
    A lot more.

  4. #4
    Guest
    this will make the form move to the left side of the screen if it is within 1000 pixels away


    Code:
    Private Sub Form_Load()
    Timer1.Enabled = True
    Timer1.Interval = 50
    End Sub
    
    Private Sub Timer1_Timer()
    If Me.Left < 1000 Then Me.Left = 0
    If Me.Left < 1000 Then Exit Sub
    End Sub
    if flickers a little bit though

  5. #5

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