Results 1 to 12 of 12

Thread: I dont think its possible !!!

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 1999
    Location
    Rawalpindi,Punjab,Pakistan
    Posts
    36
    i have several controls and one statusbar control on one form. is it possible to show the tooltiptext of a control in statusbar when mouse is over that control ????

    i dont think its possible !!!

  2. #2
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    Code:
    Private Sub cmdYourCommandButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        frmFormWithStatusBas.StatusBar1.Panels(PanelYouWantToolTIpToAppearIn) = cmdYourCommandButton.ToolTipText
    End Sub
    Hope that helps...
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Hey, don't be sad...

    Everythin' is possible!

    Code:
    Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    StatusBar1.Panels(0).Text = "haha *everything*  is possible!"
    End Sub
    Do this for every control and you're finished!!!!

    Oops Morgan beat me damn I'm slow I've failed

    well, I'll get over it
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 1999
    Location
    Rawalpindi,Punjab,Pakistan
    Posts
    36
    OK rockies1 & Jop,


    what if i have a toolbar with multiple buttons on it and i want to show the tooltiptext of a button when mouse move over it ???????????

    i'll be grateful for help

  5. #5
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    You'll need to put the MouseMove event code in for all of your buttons...

    It'll be time consuming if you're not using a control array, but possibly worth it...

    Hope that helps...
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 1999
    Location
    Rawalpindi,Punjab,Pakistan
    Posts
    36
    rockies1,

    buttons on toolbar created using code not wizard and at design time buttons are not known!!!

  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Yeah that's a bit harder...

    ...I think you have to do a trick with X,Y

    You have to check where the mousepointer is at the moment, and if it's between the X and Y cooridnates of one of the buttons and wich button.

    Not sure if there's a better way to do it (probably)

    Good Luck

    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  8. #8

    Thread Starter
    Member
    Join Date
    Jun 1999
    Location
    Rawalpindi,Punjab,Pakistan
    Posts
    36
    jop,

    how can i find out the control_name under x,y ??

  9. #9
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    Code:
    Private Sub Command1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
        Me.StatusBar1.Panels(PanelSectionName) = Command1(Index).ToolTipText
    End Sub
    This uses a Control Array of Command Buttons...

    Make Sense?
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  10. #10
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    That's what I'm figuring out

    Oh, got it!!! (damn I'm smart )

    Code:
    Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    If x > Toolbar1.Buttons(1).Left And x < Toolbar1.Buttons(1).Width Then
    MsgBox "IN first button!"
    End If
    End sub
    Do this for every button and you're done!

    [Edited by Jop on 09-07-2000 at 11:54 AM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  11. #11

    Thread Starter
    Member
    Join Date
    Jun 1999
    Location
    Rawalpindi,Punjab,Pakistan
    Posts
    36
    JOP... U R GREAT

    thanx a lot for help... it worked

  12. #12
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    anytime...

    just add me if ya want! (18818940, ICQ)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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