vb6 - how do force enable button in menu items using handles value and make sure click even fires -


how enable menu item , make sure click fires? .

i have app1 , app2

app2 has 3 menu items
gold
silver
bronze

i setted option enabled = false
in 3 item click events have msgbox, when clicked know msgbox fired , working.

=======================================

app1 has code below , have image drag app1 windows handle value , menu handles value, each menu handle value insert text2.text , enable menu button.

public declare function enablewindow lib "user32" (byval hwnd long, byval fenable long) long   private sub command5_click()  enablewindow text2.text, 1 ' enable < api call         controllenabled = true ' sets swich end sub 

when enable each menu item using handle value menu item becomes clickable , when click it, dont fire msgbox ? how come

module

'public verables public controllenabled boolean public cursorposition point public targeting boolean  'user defined type public type rect     left long     top long     right long     bottom long end type  public type point     x long     y long end type 

it doesn't fire msgbox because haven't written click event handlers menu item. also, don't need use api need do, , don't recommend so. it's easier use built-in event handlers.

i'll refer microsoft's using menus in application vb6 doc. suggest scrap existing code, read of this, , start over. menus aren't difficult making them , save lot of time if adopt more usual method of menu creation.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -