[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/30/2002 at 01:30PM PST, ID: 20386512
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

how to make a menu on load ?

Asked by albundy in VB Database Programming

Tags: declare, function, lib

hello,

i would to create a menu when my application start. in the form load in fact...

i already use the AppendMenu api and some other... that create the menu but then ? how do i tell my application to know wich item has been selected in the created menu ?

my code :

in a module :

Public Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Public Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
 
Public Const MF_BYPOSITION = &H400&
Public Const MF_STRING = &H0&
Public fstart As Boolean


Public Function InsertNewSubMenu(hForm As Long, idMenu As Long, lPos As Long, _
  sMenuName As String, Optional PopUp As Boolean = False) As Boolean
  Dim hMenu As Long
  Dim hRet As Long
  Dim hSubMenu As Long
  Dim hPopUpMenu As Long
 
  hMenu = GetMenu(hForm)
  hSubMenu = GetSubMenu(hMenu, idMenu)
  'hRet = InsertMenu(hSubMenu, lPos, MF_STRING Or MF_BYPOSITION, 0, sMenuName)
  hRet = AppendMenu(hSubMenu, MF_STRING Or MF_BYPOSITION, 0, sMenuName)
  If fstart = True Then
   hRet = RemoveMenu(hSubMenu, 0, MF_BYPOSITION)
   fstart = False
  End If
  DrawMenuBar hForm 'odœwie¿enie menu
  InsertNewSubMenu = hRet
End Function


in my form i made a menu like this :

file | links | ?

and i the form_load i have :

For i = 0 To UBound(tab_lnk)
  InsertNewSubMenu hwnd, 1, i, tab_lnk(i)
Next i


this add several item in the links menu but then ?
how i tell my app to make something when i click on the first or fird item ?!

normally in the menu creator i have to put somtehing in the 'name' field and then in my form i put a :
private sub something_Click()
 my code
end sub

weel... I think i'm not so far from the goal, please help


 
Keywords: how to make a menu on load ?
 
Loading Advertisement...
 
[+][-]10/31/02 06:46 PM, ID: 7395041

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: VB Database Programming
Tags: declare, function, lib
Sign Up Now!
Solution Provided By: twalgrave
Participating Experts: 3
Solution Grade: A
 
 
[+][-]11/04/02 05:26 AM, ID: 7405592

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/02 05:34 AM, ID: 7405615

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/23/02 09:35 AM, ID: 7487505

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/15/02 05:48 PM, ID: 7586706

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/02 10:28 PM, ID: 7622872

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91