Jump to content

Is it possible to create MenuStrip control with AutoIt


wuruoyu
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

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...