Bold menu items 
Author Message
 Bold menu items

Many popup menus in Win95 contain a bolded item -- usually designating the
default entry or selection.

Is it possible to create this effect using VB? I have the feeling it can be
done using the ModifyMenu API and setting the Flags parameter to &H1000, but
no matter what I do it doesn't seem to work. (I'm sure I'm using the
ModifyMenu function correctly because I can do everything else it's supposed
to do -- like enabling, disabling, graying, etc., the menu item)

I once heard that somewhere I had to use the MENUITEMINFO type def:

Type MENUITEMINFO ' 44 Bytes
cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As Long
cch As Long
End Type

However, in what function am I meant to use it?

TIA,

Michael Chapman
mchapman AT tac DOT com DOT au



Thu, 02 Aug 2001 03:00:00 GMT  
 Bold menu items
Hi, Michael!

This is supported by VB5 and 6 at least.
Use the method PopupMenu.

This method has a parameter that's called "defaultmenu" and here you supply
the
name fo the menuitem that should be bold (default).

Here's an example:

MnuPop is the name of the menu and MnuOpen is the name of an Menuitem.

PopupMenu MnuPop, Defaultmenu:=MnuOpen

I hope this helps!

Regards

/Mattias Dahlgren
Microsoft Certified Professional - MCP

Quote:
----- Original Message -----

Newsgroups: comp.lang.basic.visual.misc
Sent: den 14 februari 1999 10:58
Subject: Bold menu items

>Many popup menus in Win95 contain a bolded item -- usually designating the
>default entry or selection.

>Is it possible to create this effect using VB? I have the feeling it can be
>done using the ModifyMenu API and setting the Flags parameter to &H1000,
but
>no matter what I do it doesn't seem to work. (I'm sure I'm using the
>ModifyMenu function correctly because I can do everything else it's
supposed
>to do -- like enabling, disabling, graying, etc., the menu item)

>I once heard that somewhere I had to use the MENUITEMINFO type def:

>Type MENUITEMINFO ' 44 Bytes
>cbSize As Long
>fMask As Long
>fType As Long
>fState As Long
>wID As Long
>hSubMenu As Long
>hbmpChecked As Long
>hbmpUnchecked As Long
>dwItemData As Long
>dwTypeData As Long
>cch As Long
>End Type

>However, in what function am I meant to use it?

>TIA,

>Michael Chapman
>mchapman AT tac DOT com DOT au



Thu, 02 Aug 2001 03:00:00 GMT  
 Bold menu items
It also works in VB4 32...

Quote:

>Hi, Michael!

>This is supported by VB5 and 6 at least.
>Use the method PopupMenu.

>This method has a parameter that's called "defaultmenu" and here you supply
>the
>name fo the menuitem that should be bold (default).

>Here's an example:

>MnuPop is the name of the menu and MnuOpen is the name of an Menuitem.

>PopupMenu MnuPop, Defaultmenu:=MnuOpen

>I hope this helps!

>Regards

>/Mattias Dahlgren
>Microsoft Certified Professional - MCP

>----- Original Message -----

>Newsgroups: comp.lang.basic.visual.misc
>Sent: den 14 februari 1999 10:58
>Subject: Bold menu items

>>Many popup menus in Win95 contain a bolded item -- usually designating the
>>default entry or selection.

>>Is it possible to create this effect using VB? I have the feeling it can
be
>>done using the ModifyMenu API and setting the Flags parameter to &H1000,
>but
>>no matter what I do it doesn't seem to work. (I'm sure I'm using the
>>ModifyMenu function correctly because I can do everything else it's
>supposed
>>to do -- like enabling, disabling, graying, etc., the menu item)

>>I once heard that somewhere I had to use the MENUITEMINFO type def:

>>Type MENUITEMINFO ' 44 Bytes
>>cbSize As Long
>>fMask As Long
>>fType As Long
>>fState As Long
>>wID As Long
>>hSubMenu As Long
>>hbmpChecked As Long
>>hbmpUnchecked As Long
>>dwItemData As Long
>>dwTypeData As Long
>>cch As Long
>>End Type

>>However, in what function am I meant to use it?

>>TIA,

>>Michael Chapman
>>mchapman AT tac DOT com DOT au



Fri, 03 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bold menu items on VB

2. Bold Menu Items

3. Bolding menu items

4. Bold items in Menu

5. Making Menu Items Bold

6. Make Menu Items Caption Bold?

7. Default Bold Context Menu Items

8. popup menu bold item

9. Menu Item-Bold Type, Help

10. Menu Item-Bold Type, Help

11. Adding Menu item to the Mail item menu from an outlook Addin

12. Adding Menu item to the Mail item menu from an outlook Addin

 

 
Powered by phpBB® Forum Software