Creation of menus ... ! 
Author Message
 Creation of menus ... !

After choosing an option of the menu servant with api, disappears the
menu...

I thank any help.
thank you!

'************************************* Code ***************
Private Function WindowProc(ByVal hw As Long, ByVal uMsg As Long, ByVal
wParam As Long, ByVal lParam As Long) As Long
     If uMsg = WM_COMMAND Then
           'After exhibiting the message box the menu it disappears of the
form.
           MsgBox "Option...." & wParam
     End If
     WindowProc = CallWindowProc(lpPrevWndProc, hw, uMsg, wParam, lParam)
End Function
'************************************************************



Sat, 13 Jan 2001 03:00:00 GMT  
 Creation of menus ... !


Fri, 19 Jun 1992 00:00:00 GMT  
 Creation of menus ... !
To create menus with apis (CreateMenu (), Setmenu ()) it only works
correctly when the form this visible one. If I want to create menu in a form
carried in the memory but with the property " Visible = false " I don't get.

I thank any information on the subject.

thank you!



Sat, 13 Jan 2001 03:00:00 GMT  
 Creation of menus ... !
I'm not sure of your problem. I have used CreateMenu(), etc. in a Form_Load
before the form is visible without problems. Post some of your code - maybe
we can see the problem.

Jonas
TRION Technologies

Quote:

>To create menus with apis (CreateMenu (), Setmenu ()) it only works
>correctly when the form this visible one. If I want to create menu in a
form
>carried in the memory but with the property " Visible = false " I don't
get.

>I thank any information on the subject.

>thank you!



Sat, 13 Jan 2001 03:00:00 GMT  
 Creation of menus ... !
Put your code in the Form_Activate sub and it will work fine.   You will
have to create a Static Var to make sure you dont running the code more than
once or you start over everytime you launch another form as vbModal.

Private Sub Form_Activate()
    Static bBeenHere as Boolean

    If bBeenHere Then Exit Sub

    bBeenHere = True
    CreateMenu () ....
    Setmenu () ....
End Sub

Quote:

>To create menus with apis (CreateMenu (), Setmenu ()) it only works
>correctly when the form this visible one. If I want to create menu in a
form
>carried in the memory but with the property " Visible = false " I don't
get.

>I thank any information on the subject.

>thank you!



Sun, 14 Jan 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Dynamic Creation of Menu.

2. Dynamic Creation of Menu's in VB6

3. Icon creation on Menu

4. Custom Menu creation at run time.

5. Auto menu creation

6. Dynamic Menu Creation

7. Dynamic Menu Creation

8. Dynamic menu creation

9. Problems with Dynamic Menu creation using API

10. Dynamic creation of complex menus?

11. Menu's creation in Run Time

12. Dynamic menu creation in run time

 

 
Powered by phpBB® Forum Software