Sign in to follow this  
Followers 0
satanttin

[SOLVED]Menu + @SW_POPUP is bug?

5 posts in this topic

#1 ·  Posted (edited)

Hello,

Dunno where i should putting this and if it's a known thing or not but.

when i try to make a menu with @SW_POPUP it shows nothing untill i hover over it O.o

kinda strange and my question is is this an error of autoit or from my own computer?

Edited by satanttin

Share this post


Link to post
Share on other sites



Post the code you're using and then we can figure out what the issue is. Right now, I haven't a clue what you're trying to do.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

When i run this it opens like i want to but the only problem is that it's not shown my menu items only when i hover over the items they will get shown?

this is the code:

#include 
#include 
#include 
#include 

Global $Form1

Opt("GUIOnEventMode", 1)

Menu()
Func Menu()
$Form1 = GUICreate("Home", 450, 18, 341, 199, $WS_POPUP)
$MenuItem4 = GUICtrlCreateMenu("Menu")
$MenuItem8 = GUICtrlCreateMenuItem("Save", $MenuItem4)
GUICtrlSetOnEvent($MenuItem8, "Save")
$MenuItem7 = GUICtrlCreateMenuItem("Load", $MenuItem4)
GUICtrlSetOnEvent($MenuItem7, "Load")
$MenuItem6 = GUICtrlCreateMenuItem("empty", $MenuItem4)
GUICtrlSetOnEvent($MenuItem6, "empty")
$MenuItem5 = GUICtrlCreateMenuItem("empty", $MenuItem4)
GUICtrlSetOnEvent($MenuItem5, "empty")
$MenuItem3 = GUICtrlCreateMenu("empty")
GUICtrlSetOnEvent($MenuItem3, "empty")
$MenuItem2 = GUICtrlCreateMenu("empty")
GUICtrlSetOnEvent($MenuItem2, "empty")
$MenuItem1 = GUICtrlCreateMenu("Extra")
GUICtrlSetOnEvent($MenuItem1, "Extra")
$MenuItem10 = GUICtrlCreateMenuItem("Help", $MenuItem1)
GUICtrlSetOnEvent($MenuItem10, "Help")
$MenuItem9 = GUICtrlCreateMenuItem("Credits", $MenuItem1)
GUICtrlSetOnEvent($MenuItem9, "Credits")
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
EndFunc

Func empty()

EndFunc

Func empty()

EndFunc

Func empty()

EndFunc

Func Help()

EndFunc

Func Credits()

EndFunc

While 1
sleep(10)
WEnd

Func Close()
Exit
EndFunc

Share this post


Link to post
Share on other sites

Change your GUICreate line to this:

$Form1 = GUICreate("Home", 450, 20, 341, 199, $WS_POPUP)

Note the third parameter is 20 now and not 18. Your GUI was too short to display the menu without hovering over it first.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Change your GUICreate line to this:

$Form1 = GUICreate("Home", 450, 20, 341, 199, $WS_POPUP)

Note the third parameter is 20 now and not 18. Your GUI was too short to display the menu without hovering over it first.

oh xDweird that it shows normally when i don't use @SW_POPUP but thanks for explaining me^^

Share this post


Link to post
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
Sign in to follow this  
Followers 0