4 Replies - 325 Views - Last Post: 29 January 2013 - 04:12 AM Rate Topic: -----

#1 Vishal1419  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 141
  • Joined: 19-May 12

About User Input in vb.net

Posted 28 January 2013 - 02:05 PM

I am trying to create an informationBox which should just work like Balloon Tip
I want to hide the informationBox while user moves his mouse or presses any key on his keyboard
How should I detect that if a user has moved his mouse or pressed any key on the keyboard
Is This A Good Question/Topic? 0
  • +

Replies To: About User Input in vb.net

#2 FerretHolmes  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 41
  • View blog
  • Posts: 167
  • Joined: 12-November 12

Re: About User Input in vb.net

Posted 28 January 2013 - 02:33 PM

You could use the MouseHover and MouseMove event to show and hide your balloon tip.

    Private Sub IamDoingSomething_MouseHover(sender As Object, e As System.EventArgs) Handles Me.MouseHover
           balloontip.visible = true
    End Sub

    Private Sub IamDoingSomething_MouseMove(sender As Object, e As System.EventArgs) Handles Me.MouseHover
          balloontip.visible = false
    End Sub


Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3611
  • View blog
  • Posts: 12,419
  • Joined: 12-December 12

Re: About User Input in vb.net

Posted 28 January 2013 - 02:39 PM

You could add the ToolTip control to the form. You can then set the ToolTip property for specific controls on your form. You can also do this programmatically, perhaps in the forms' load event:

ToolTip1.SetToolTip(TextBox1, "Hello textbox 1")


The ToolTip control has a number of properties that you can explore.

If you wish to do this yourself then you'll need to investigate the various mouse and keyboard events for the form and its controls and use these to move a, perhaps, PictureBox, or even a Label.

If you are using the full version of VS then there's probably a Package that you can install for this.

This post has been edited by andrewsw: 28 January 2013 - 02:41 PM

Was This Post Helpful? 2
  • +
  • -

#4 Vishal1419  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 141
  • Joined: 19-May 12

Re: About User Input in vb.net

Posted 29 January 2013 - 12:36 AM

ya it was helpful
But I want to say that if you use GMail then you might have seen the Information Box at the top which gives information about what you have done. e.g. SAVED or THE MESSAGE HAS BEEN DELETED
I want to have the same thing in my desktop application and I have done it but I want some Additional features on it like informationBox should hide while user moves his mouse or press any key

I know I have to use some mousemove and keydown events
But I am Creating a Class Library Project, So how should I write these events for the container i.e. form in which the InformationBox will be Dropped

Thanks again for replying
Was This Post Helpful? 0
  • +
  • -

#5 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3611
  • View blog
  • Posts: 12,419
  • Joined: 12-December 12

Re: About User Input in vb.net

Posted 29 January 2013 - 04:12 AM

Ah, you didn't mention that you were creating a custom control. Have a look through the tutorials on this site.

I guess you would have to subscribe to events of your custom controls' parent containers' parent form :). Something like

your_instance.FindForm.ParentForm

You may have to extend the ExtenderControl class which kinda adds new properties to other controls on the form.

But I'm only speculating. Maybe someone who has already achieved something similar will contribute. Good luck.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1