By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

Menu Question

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"S Shulman" <sm*******@hotmail.com> schrieb:
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}")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #3

P: n/a
"Dominique Gratpain" <no****@devdex.com> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.