taietel Posted May 29, 2010 Share Posted May 29, 2010 (edited) I've tried to put a vertical menu in a form, using an ActiveX control (see attachment), but I fail big time... . It creates the object, but it blinks continuously when I move the mouse and second menu is not showing.I have no problem in VB6, but... I need your guidance in this issue...Here is a code sample:expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 600, 400) $Obj1 = ObjCreate("MeniuVert.MeniuVertical") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 10, 10, 130, 380) If IsObj($Obj1) Then ConsoleWrite("Object created succesfully!" & @CRLF) With $Obj1 .MenusMax = 2 ;max number of vertical menus .MenuCur = 1 ;select first menu .MenuCaption = "Meniu 1" ;set caption .MenuItemsMax = 3 ;set number of items in the first menu .MenuItemCur = 1 ;select first submenu of the first menu .MenuItemCaption = "Submeniu 11" ;set caption for that .MenuItemCur = 2 ;select second submenu of the first menu .MenuItemCaption = "Submeniu 12" ;set caption for that .MenuItemCur = 3 ;select third submenu of the first menu .MenuItemCaption = "Submeniu 13" ;set caption for that .MenuCur = 2 .MenuCaption = "Meniu 2" .MenuItemsMax = 3 .MenuItemCur = 1 .MenuItemCaption = "Submeniu 21" .MenuItemCur = 2 .MenuItemCaption = "Submeniu 22" .MenuItemCur = 3 .MenuItemCaption = "Submeniu 23" .MenuCur = 1 ;set default menu at runtime EndWith Else ConsoleWrite("Object creation failed!..." & @CRLF) EndIf GUISetState() While 1 Sleep(100) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd[EDIT] I have a problem with attachment. I've put the files (meniuvert.ocx, a print preview of VB6 sample form and the code above) here . Edited May 29, 2010 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now