Menu Question

S

S Shulman

Hi

Is there any way to open a main menu in code which will show all the menu
entries of that main menu

Thank you,
Shmuel Shulman
SBS Technologies LTD
 
H

Herfried K. Wagner [MVP]

S Shulman said:
Is there any way to open a main menu in code which will show all the menu
entries of that main menu

\\\
SendKeys.Send("{F10}{ENTER}")
///
 
D

Dominique Gratpain

Hello Herfried,

If I put SendKeys.Send("{F10}{ENTER}") in the event of a button on the
form, it is always good.

But if I put that in the event of the form load, sometines it is good,
sometimes it does nothing and sometimes the cursor becomes the wait
cursor but i have the hand.

In which event, can we put the sendkeys to open the menu with the form ?

Dominique
 
H

Herfried K. Wagner [MVP]

Dominique Gratpain said:
If I put SendKeys.Send("{F10}{ENTER}") in the event of a button on the
form, it is always good.

But if I put that in the event of the form load, sometines it is good,
sometimes it does nothing and sometimes the cursor becomes the wait
cursor but i have the hand.

In which event, can we put the sendkeys to open the menu with the form ?

The form's 'Load' event handler is called when the form is not yet visible.
Make sure the for is visible, enabled and the active form before calling
'SendKeys'.

Untested:

\\\
Private Sub Form1_Activated( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles MyBase.Activated
Static IsActivated As Boolean
If Not IsActivated Then
IsActivated = True
Application.DoEvents()

' Call 'SendKeys' here.
End If
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MenuItem35.PerformClick() 2
[email protected] 1
bitwise operations 1
String Methods 3
NumericUpDown Control 2
Status Bar 2
FontFamily.GetFamilies Method Question 1
Reporting Tool 2

Top