Jump to content

Recommended Posts

Posted (edited)

What am i doing wrong -

When I enter <ALT>f the file menu does not open? Tried the example in the help file and it seems to work.

#include "GUIConstants.au3"

GUICreate("My GUI menu",300,200)

$oFileMenu = GUICtrlCreateMenu ("&File")

$oFileNew = GUICtrlCreateMenuItem ( "&New", $oFileMenu )

$oFileOpen = GUICtrlCreateMenuItem ("&Open",$oFileMenu)

$oRecentFilesMenu = GUICtrlCreateMenu ("Recent Files",$oFileMenu,2)

$oSeparator1 = GUICtrlCreateMenuitem ("",$oFileMenu,3)

$oSaveFile = GUICtrlCreateMenuitem ("&Save", $oFileMenu)

GUICtrlSetState($oSaveFile,$GUI_DISABLE)

$oSaveFileAs = GUICtrlCreateMenuitem ("Save &As...", $oFileMenu)

GUICtrlSetState($oSaveFileAs,$GUI_DISABLE)

$oSeparator2 = GUICtrlCreateMenuitem ("",$oFileMenu,6)

$oClose = GUICtrlCreateMenuitem ("&Close", $oFileMenu)

$oEditMenu = GUICtrlCreateMenu ( "&Edit" )

GUISetState ()

While 1

$msg = GUIGetMsg()

If $msg = $oFileOpen Then

$file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)")

EndIf

If $msg = $oClose Then

GUIDelete()

Exit

EndIf

WEnd

GUIDelete()

Exit

Edited by alawoona
Posted (edited)

Update

Seems to be a general problem with a menu- and 'controlfree'-window.

I used some other sample menu applications and removed the controls from the windows -> and now they have the same problem.

So I see no chance to correct a default-will-ever-happens-bug :(

P.S.: I never saw an application with only menus in it but however, you could use the small workaround with creating a small label.

I somebody knows a solution let us know :ph34r:

So long and regards

Holger

Edited by Holger

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
  • Recently Browsing   0 members

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