showpopup help.
-
hi! im new to vb.net. and lookin for help frm u all genius working in .net i have seen the showpopup method, this is very nice thing in .net now good to c such thing for quick help. i have tried the example from msdn, i thot from example that the showpopup will show help on the bottom of the textbox but unfortunately it is not working that way. it is showin somewhere else on the form.if i do maximize the form the location also changes. so plz let me knw is there anyprob for this popup help showing location or is there anything im doing wrong. i have seen one topic in this website too on this. in this topic they have used mousepointer position to showpopup help. that is working fine. wherever the cursor is system show that popup on that place but i wana to show that quick help popup on the textbox or anycontrol bottom side as example in msdn is saying. thankx in advance and help will b v v appreciate. atif saeed khan software developer realtime technology dubai
-
hi! im new to vb.net. and lookin for help frm u all genius working in .net i have seen the showpopup method, this is very nice thing in .net now good to c such thing for quick help. i have tried the example from msdn, i thot from example that the showpopup will show help on the bottom of the textbox but unfortunately it is not working that way. it is showin somewhere else on the form.if i do maximize the form the location also changes. so plz let me knw is there anyprob for this popup help showing location or is there anything im doing wrong. i have seen one topic in this website too on this. in this topic they have used mousepointer position to showpopup help. that is working fine. wherever the cursor is system show that popup on that place but i wana to show that quick help popup on the textbox or anycontrol bottom side as example in msdn is saying. thankx in advance and help will b v v appreciate. atif saeed khan software developer realtime technology dubai
Is this a desktop app?
-
Is this a desktop app?
-
hi! im new to vb.net. and lookin for help frm u all genius working in .net i have seen the showpopup method, this is very nice thing in .net now good to c such thing for quick help. i have tried the example from msdn, i thot from example that the showpopup will show help on the bottom of the textbox but unfortunately it is not working that way. it is showin somewhere else on the form.if i do maximize the form the location also changes. so plz let me knw is there anyprob for this popup help showing location or is there anything im doing wrong. i have seen one topic in this website too on this. in this topic they have used mousepointer position to showpopup help. that is working fine. wherever the cursor is system show that popup on that place but i wana to show that quick help popup on the textbox or anycontrol bottom side as example in msdn is saying. thankx in advance and help will b v v appreciate. atif saeed khan software developer realtime technology dubai
Let me see a sample of your code. Maybe I can fix it if I can figure out what it is you want from it. :confused:
-
Let me see a sample of your code. Maybe I can fix it if I can figure out what it is you want from it. :confused:
ok! actually if u can c the help of showhelp popup in msdn the same example i tried to run. wat i gt idea from this example is that the popup help will popup on the edge of the textbox. but it is not working so. try the example in msdn. Private Sub textBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyUp ' Determine whether the key entered is the F1 key. Display help if it is. If e.KeyCode = Keys.F1 Then ' Display a pop-up help topic to assist the user. Help.ShowPopup(textBox1, "Enter your first name", New Point(textBox1.Right, Me.textBox1.Bottom)) End If End Sub 'textBox1_KeyUp
-
ok! actually if u can c the help of showhelp popup in msdn the same example i tried to run. wat i gt idea from this example is that the popup help will popup on the edge of the textbox. but it is not working so. try the example in msdn. Private Sub textBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyUp ' Determine whether the key entered is the F1 key. Display help if it is. If e.KeyCode = Keys.F1 Then ' Display a pop-up help topic to assist the user. Help.ShowPopup(textBox1, "Enter your first name", New Point(textBox1.Right, Me.textBox1.Bottom)) End If End Sub 'textBox1_KeyUp
popalzai wrote:
New Point(textBox1.Right, Me.textBox1.Bottom))
There's you're problem right there - the point you're creating will plot the location relative to the screen, not the textbox control or it's containing form. You have to take into account the location of the textbox on the form AND the location of the form itself. Try this, it'll show the popup over the top right of the textbox no matter where the form is or what window state it's in (normal/maximized).
Private Sub TextBox1_KeyUp(....) Handles TextBox1.KeyUp
If e.KeyCode = Keys.F1 Then
Help.ShowPopup(Me.TextBox1, "Help is at hand", New Point((Me.Left + TextBox1.Right), (Me.Top + TextBox1.Bottom)))
End If
End Sub -
popalzai wrote:
New Point(textBox1.Right, Me.textBox1.Bottom))
There's you're problem right there - the point you're creating will plot the location relative to the screen, not the textbox control or it's containing form. You have to take into account the location of the textbox on the form AND the location of the form itself. Try this, it'll show the popup over the top right of the textbox no matter where the form is or what window state it's in (normal/maximized).
Private Sub TextBox1_KeyUp(....) Handles TextBox1.KeyUp
If e.KeyCode = Keys.F1 Then
Help.ShowPopup(Me.TextBox1, "Help is at hand", New Point((Me.Left + TextBox1.Right), (Me.Top + TextBox1.Bottom)))
End If
End Sub -
thankx for reply. but dear its not working in the mdi application. lets suppose if u take this form as a child form then wat ?
Then you mess around until you get it right.
Private Sub txt_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt.KeyUp
If e.KeyCode = Keys.F1 Then
Dim x, y As Integer
Dim r As Rectangle = txt.RectangleToScreen(txt.Bounds)
x = (r.Left - txt.Left) + txt.Width
y = (r.Bottom - txt.Top) - txt.Height
Help.ShowPopup(Me.txt, "Help is at hand", New Point(x, y))
End If
End Sub