Jump to content

Problems with GUICtrlCreateMenu using &MenuItem


JPPercy
 Share

Recommended Posts

Hello There, ;)

I'm having some trouble with Function GUICtrlCreateMenu...

An Example:

$Menu = GUICtrlCreateMenu( "&File" )

When I use in Koda( v: 1.7.0.1 ) - It Works. However it doesn't when I run the Script.

--> In Koda, &File == File

and Running Script == File

...

Well... I tryed to find help using "Search", but i didn't.

Thx for replies... and sorry for my bad English :D

=)

Link to comment
Share on other sites

It works exactly the same way - have a look at this:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 254, 123, 193, 125)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$MenuItem1 = GUICtrlCreateMenu("&File")
GUICtrlSetOnEvent(-1, "MenuItem1Click")
$MenuItem2 = GUICtrlCreateMenuItem("Dem&o", $MenuItem1)
GUICtrlSetOnEvent(-1, "MenuItem2Click")
$MenuItem3 = GUICtrlCreateMenuItem("E&xit", $MenuItem1)
GUICtrlSetOnEvent(-1, "MenuItem3Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func Form1Close()
    Exit
EndFunc
Func MenuItem1Click()

EndFunc
Func MenuItem2Click()

EndFunc
Func MenuItem3Click()

EndFunc

In order to see the underline you have to press "Alt" key.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Oh... I actually wanted to do it without pressing "Alt".

hummm...

Thank you anyway... ;)

You could always change that setting in Windows so they are always visible :D
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...