Jump to content
Sign in to follow this  
wuruoyu

Is it possible to create MenuStrip control with AutoIt

Recommended Posts

wuruoyu

I am not sure if this has been asked or done before, I can't seem to find any information in the forum. Is it possible to create MenuStrip control (from .Net Framework), the menu has a gradient background. Thank you Kindly.

menu.jpg

Edited by wuruoyu

Share this post


Link to post
Share on other sites
czardas

Is this what you want?

#include <GUIConstants.au3>

Local $hGUI = GUICreate(" Example", 200, 80)

Local $idMenu = GUICtrlCreateMenu("Menu")

Local $idItem = GUICtrlCreateMenu("Item", $idMenu)
Local $idSubItem1 = GUICtrlCreateMenuItem("SubItem 1", $idItem)
Local $idSubItem2 = GUICtrlCreateMenuItem("SubItem 2", $idItem)
GUISetState(@SW_SHOW)

Local $msg
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

I'm not sure what you mean about gradient.

Edited by czardas

Share this post


Link to post
Share on other sites
wuruoyu

Hi @czardas, thank you for your quick reply. This is not what I want, please see this screenshot instead. The menustrip control created in VS .net has gradient background from left to right (dark to light), and the menu style is also different than the standard menu created in AutoIt

menu.jpg

Edited by wuruoyu
  • Like 1

Share this post


Link to post
Share on other sites
wuruoyu

Is it possible to use MenuStrip control (from .Net Framework) in AutoIt Form (GUICreate) which has a gradient background from left to right (dark to light) with different style than the standard menu.

I am Just thinking out loud here and have tried using @ptrex .Net CLR Framework, and created the MenuStrip with following code, but unable to create menu items, also it's created under "System.Windows.Forms" not using AutoIt GUICreate.

Local $oAssembly = _CLR_LoadLibrary( "System.Windows.Forms" )
Local $MenuStrip = _CLR_CreateObject($oAssembly, "System.Windows.Forms.MenuStrip")
$MenuStrip.Parent = $oForm

 

menu.jpg.1d93568d96850d0464490c006be273cd.jpg

Share this post


Link to post
Share on other sites
JLogan3o13

Stick to one topic, please.


√-1 2^3 ∑ π, and it was delicious!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.