Home All Groups Group Topic Archive Search About

Shortcut Underlines Don't Show Up With Manifest??

Author
19 Feb 2009 4:38 PM
Rick Raisley
I'd never noticed this before, but the underlined shortcuts placed onto
command buttons (like with &Print for Print with the P underscored,
indicating a hot key) don't show up on my WinXP PC when running the EXE
using a Manifest file for the newer control looks.

The shortcuts still work, but no one can see them.

What's up with that?? Is there a way to make them show up? I've taken great
care to be sure I have shortcuts to my most used functions, but if they
don't show, then they're kind of worthless.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net

Author
19 Feb 2009 4:52 PM
Dave O.
Try turning on the focus marks with a sneaky message

Public Const WM_CHANGEUISTATE   As Long = &H127
Public Const USIF_RESET         As Long = 65538

Public Declare Function SendMessageAny Lib "user32" Alias "SendMessageA"
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long

'                            COMMENT
'USIF_RESET =
'              (LoByte) Const UIS_CLEAR      As Integer = &H2
'     +        (HiByte) Const UISF_HIDEFOCUS As Integer = &H1


' In form load event
' For forms where the controls are added dynamically, put this line after
the form is built

Call SendMessageAny(Me.hWnd, WM_CHANGEUISTATE, USIF_RESET, ByVal 0)

This *should* work, I have apps with manifest & buttons with hotkeys and
they all show up, I'm moderately certain they didn't until I added this (I
could be wrong about that)

Regards
Dave O.


Show quoteHide quote
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:%23luw1BrkJHA.3760@TK2MSFTNGP03.phx.gbl...
> I'd never noticed this before, but the underlined shortcuts placed onto
> command buttons (like with &Print for Print with the P underscored,
> indicating a hot key) don't show up on my WinXP PC when running the EXE
> using a Manifest file for the newer control looks.
>
> The shortcuts still work, but no one can see them.
>
> What's up with that?? Is there a way to make them show up? I've taken
> great care to be sure I have shortcuts to my most used functions, but if
> they don't show, then they're kind of worthless.
>
> --
> Regards,
>
> Rick Raisley
> heavymetal-A-T-bellsouth-D-O-T-net
>
>
Author
19 Feb 2009 6:10 PM
Rick Raisley
Show quote Hide quote
"Dave O." <nob***@nowhere.com> wrote in message
news:%23PQIFKrkJHA.5732@TK2MSFTNGP05.phx.gbl...
> Try turning on the focus marks with a sneaky message
>
> Public Const WM_CHANGEUISTATE   As Long = &H127
> Public Const USIF_RESET         As Long = 65538
>
> Public Declare Function SendMessageAny Lib "user32" Alias "SendMessageA"
> (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
> Any) As Long
>
> '                            COMMENT
> 'USIF_RESET =
> '              (LoByte) Const UIS_CLEAR      As Integer = &H2
> '     +        (HiByte) Const UISF_HIDEFOCUS As Integer = &H1
>
>
> ' In form load event
> ' For forms where the controls are added dynamically, put this line after
> the form is built
>
> Call SendMessageAny(Me.hWnd, WM_CHANGEUISTATE, USIF_RESET, ByVal 0)
>
> This *should* work, I have apps with manifest & buttons with hotkeys and
> they all show up, I'm moderately certain they didn't until I added this (I
> could be wrong about that)
>

That didn't work for me. I added the declares and the call in the Form_Load
event, and no perceptable change. Perhaps there's another part missing?

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
Author
19 Feb 2009 4:59 PM
Alfie [UK]
On Thu, 19 Feb 2009 11:38:14 -0500, "Rick Raisley"
<heavymetal-A-T-bellsouth-D-O-Tnet> wrote:

>I'd never noticed this before, but the underlined shortcuts placed onto
>command buttons (like with &Print for Print with the P underscored,
>indicating a hot key) don't show up on my WinXP PC when running the EXE
>using a Manifest file for the newer control looks.
>
>The shortcuts still work, but no one can see them.
>
>What's up with that?? Is there a way to make them show up? I've taken great
>care to be sure I have shortcuts to my most used functions, but if they
>don't show, then they're kind of worthless.

Under XP (don't know about Vista), have a look at Control
Panel->Display->Appearance->Effects, there's an option to turn off
shortcut keys until the ALT key is held, see if that's ticked.
--
Alfie [UK]
<http://www.delphia.co.uk/>
There are three types of people; - Those who make things happen, - those who watch what happens - and those who wonder what happened.
Author
19 Feb 2009 6:08 PM
Rick Raisley
Show quote Hide quote
"Alfie [UK]" <alfie@mail.invalid> wrote in message
news:qq3rp4dckb9vo4ln7fhf8834pkt167bfsq@4ax.com...
> On Thu, 19 Feb 2009 11:38:14 -0500, "Rick Raisley"
> <heavymetal-A-T-bellsouth-D-O-Tnet> wrote:
>
>>I'd never noticed this before, but the underlined shortcuts placed onto
>>command buttons (like with &Print for Print with the P underscored,
>>indicating a hot key) don't show up on my WinXP PC when running the EXE
>>using a Manifest file for the newer control looks.
>>
>>The shortcuts still work, but no one can see them.
>>
>>What's up with that?? Is there a way to make them show up? I've taken
>>great
>>care to be sure I have shortcuts to my most used functions, but if they
>>don't show, then they're kind of worthless.
>
> Under XP (don't know about Vista), have a look at Control
> Panel->Display->Appearance->Effects, there's an option to turn off
> shortcut keys until the ALT key is held, see if that's ticked.
> --

That seems to apply only to Menus, not to the shortcuts on buttons. At
least, holding down the Alt key has no effect on the buttons.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
Author
19 Feb 2009 5:01 PM
Jeff Johnson
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:%23luw1BrkJHA.3760@TK2MSFTNGP03.phx.gbl...

> I'd never noticed this before, but the underlined shortcuts placed onto
> command buttons (like with &Print for Print with the P underscored,
> indicating a hot key) don't show up on my WinXP PC when running the EXE
> using a Manifest file for the newer control looks.
>
> The shortcuts still work, but no one can see them.
>
> What's up with that?? Is there a way to make them show up? I've taken
> great care to be sure I have shortcuts to my most used functions, but if
> they don't show, then they're kind of worthless.

This is something that was first introduced in 1999 with Windows 2000 and
was carried over to XP and Vista (but not Server 2003, because apparently
admin types hate it). It's a user setting (and therefore should not be
messed with by your program as Dave suggested) and can be found the
Appearance tab on the Display applet from the Effects button (this is XP;
the location is different for Win 2000 and Vista).

So yeah, it's just something you've never noticed. Nor, apparently, have you
noticed the many times other people have asked about it in this group. And
now you know!
Author
19 Feb 2009 6:14 PM
Rick Raisley
Show quote Hide quote
"Jeff Johnson" <i.get@enough.spam> wrote in message
news:%23ATA$OrkJHA.4448@TK2MSFTNGP05.phx.gbl...
> "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
> news:%23luw1BrkJHA.3760@TK2MSFTNGP03.phx.gbl...
>
>> I'd never noticed this before, but the underlined shortcuts placed onto
>> command buttons (like with &Print for Print with the P underscored,
>> indicating a hot key) don't show up on my WinXP PC when running the EXE
>> using a Manifest file for the newer control looks.
>>
>> The shortcuts still work, but no one can see them.
>>
>> What's up with that?? Is there a way to make them show up? I've taken
>> great care to be sure I have shortcuts to my most used functions, but if
>> they don't show, then they're kind of worthless.
>
> This is something that was first introduced in 1999 with Windows 2000 and
> was carried over to XP and Vista (but not Server 2003, because apparently
> admin types hate it). It's a user setting (and therefore should not be
> messed with by your program as Dave suggested) and can be found the
> Appearance tab on the Display applet from the Effects button (this is XP;
> the location is different for Win 2000 and Vista).
>

Yeah, you're right, unchecking the "Hide underlined letters for keyboard
navigation until I press the Alt key" shows them.

What's a little silly is that WITH this checked, they still don't show up on
buttons, only menus. Just silly.

> So yeah, it's just something you've never noticed. Nor, apparently, have
> you noticed the many times other people have asked about it in this group.
> And now you know!

Yes, now I know. Well, I guess I filter a lot of stuff out of the group,
unless it hits that brain cell that tells me I should be interested. ;-)

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
Author
19 Feb 2009 6:46 PM
Jeff Johnson
Show quote Hide quote
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:%23g%23Eq3rkJHA.2516@TK2MSFTNGP05.phx.gbl...

>> This is something that was first introduced in 1999 with Windows 2000 and
>> was carried over to XP and Vista (but not Server 2003, because apparently
>> admin types hate it). It's a user setting (and therefore should not be
>> messed with by your program as Dave suggested) and can be found the
>> Appearance tab on the Display applet from the Effects button (this is XP;
>> the location is different for Win 2000 and Vista).
>>
>
> Yeah, you're right, unchecking the "Hide underlined letters for keyboard
> navigation until I press the Alt key" shows them.
>
> What's a little silly is that WITH this checked, they still don't show up
> on buttons, only menus. Just silly.

That must be specific to VB6 apps with manifests. I know this because this
setting is in effect during Windows XP setup (the GUI part, of course), and
the moment I tap ALT I see mnemonics on buttons. I can clearly picture them
appearing on the Next and Back buttons of the setup wizard.
Author
19 Feb 2009 7:49 PM
C Kevin Provance
This is a setting you can change via the control panel > Display >
Appearance > Effects > Hide underline letters for keyboard navigation...


Show quoteHide quote
"Jeff Johnson" <i.get@enough.spam> wrote in message
news:%233fxdJskJHA.4912@TK2MSFTNGP04.phx.gbl...
| "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
| news:%23g%23Eq3rkJHA.2516@TK2MSFTNGP05.phx.gbl...
|
| >> This is something that was first introduced in 1999 with Windows 2000
and
| >> was carried over to XP and Vista (but not Server 2003, because
apparently
| >> admin types hate it). It's a user setting (and therefore should not be
| >> messed with by your program as Dave suggested) and can be found the
| >> Appearance tab on the Display applet from the Effects button (this is
XP;
| >> the location is different for Win 2000 and Vista).
| >>
| >
| > Yeah, you're right, unchecking the "Hide underlined letters for keyboard
| > navigation until I press the Alt key" shows them.
| >
| > What's a little silly is that WITH this checked, they still don't show
up
| > on buttons, only menus. Just silly.
|
| That must be specific to VB6 apps with manifests. I know this because this
| setting is in effect during Windows XP setup (the GUI part, of course),
and
| the moment I tap ALT I see mnemonics on buttons. I can clearly picture
them
| appearing on the Next and Back buttons of the setup wizard.
|
|
Author
19 Feb 2009 9:13 PM
Rick Raisley
"C Kevin Provance" <BillMIsADou***@yyz.net> wrote in message
news:uTnC7sskJHA.3480@TK2MSFTNGP06.phx.gbl...
> This is a setting you can change via the control panel > Display >
> Appearance > Effects > Hide underline letters for keyboard navigation...
>

Right. But the wording, with WinXP Pro, at least, is "Hide underlined
letters for keyboard navigation until I press the Alt key".

The problem is, with this option checked, while the MENU underlines do
appear, the ones on Command Buttons, etc. do NOT appear, when pressing the
Alt key. So, with this checked, you apparently NEVER get to see the
underlines, which I find annoying. I go to all this trouble to set up
shortcuts, making them visible with the underlines, and unless a user goes
in and knows to uncheck this option, he can never see them.

I was hoping Dave O's code might force the issue to show them, at least on
command buttons for that app, but at least on my system, it does not.

With the checkbox to Hide the underlines CHECKED, in my manifested VB app,
the underlines in the menu are NOT visible until pressing the Alt key (as
described above), although command buttons and such never show.
Interestingly, Microsoft seems to ignore this setting at will, because
Microsoft Excel and Word 2003 ALWAYS show the underlines, on both the menu
items and buttons, REGARDLESS of the setting! Microsoft, again, ignoring
their own rules: Business as Usual!  ;-)

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
Author
19 Feb 2009 11:19 PM
David Youngblood
Show quote Hide quote
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote...
> "C Kevin Provance" <BillMIsADou***@yyz.net> wrote in message
> news:uTnC7sskJHA.3480@TK2MSFTNGP06.phx.gbl...
>> This is a setting you can change via the control panel > Display >
>> Appearance > Effects > Hide underline letters for keyboard navigation...
>>
>
> Right. But the wording, with WinXP Pro, at least, is "Hide underlined
> letters for keyboard navigation until I press the Alt key".
>
> The problem is, with this option checked, while the MENU underlines do
> appear, the ones on Command Buttons, etc. do NOT appear, when pressing the
> Alt key. So, with this checked, you apparently NEVER get to see the
> underlines, which I find annoying. I go to all this trouble to set up
> shortcuts, making them visible with the underlines, and unless a user goes
> in and knows to uncheck this option, he can never see them.
>
> I was hoping Dave O's code might force the issue to show them, at least on
> command buttons for that app, but at least on my system, it does not.

Try this (on each form). Alternately, you might call the code from the
KeyDown event if the Alt button is pressed, though I prefer the FormLoad.

Option Explicit

Private Const WM_CHANGEUISTATE As Long = &H127
Private Const UISF_HIDEFOCUS As Integer = &H1
Private Const UISF_HIDEACCEL As Integer = &H2
Private Const UIS_CLEAR As Integer = &H2

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
        ByVal hwnd As Long, _
        ByVal wMsg As Long, _
        ByVal wParam As Long, _
        lParam As Any) As Long

Private Sub Form_Load()
    Dim uiState As Long
    uiState = MakeLong(UIS_CLEAR, UISF_HIDEFOCUS Or UISF_HIDEACCEL)
    SendMessage Me.hwnd, WM_CHANGEUISTATE, uiState, ByVal 0
End Sub

Private Function MakeLong(ByVal wLow As Integer, ByVal wHigh As Integer) As
Long
    MakeLong = wHigh * &H10000 + wLow
End Function

David
Author
20 Feb 2009 4:06 PM
Dave O.
Show quote Hide quote
"David Youngblood" <d**@flash.net> wrote in message
news:uCAaSiukJHA.6124@TK2MSFTNGP02.phx.gbl...
> "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote...
>> "C Kevin Provance" <BillMIsADou***@yyz.net> wrote in message
>> news:uTnC7sskJHA.3480@TK2MSFTNGP06.phx.gbl...
>>> This is a setting you can change via the control panel > Display >
>>> Appearance > Effects > Hide underline letters for keyboard navigation...
>>>
>>
>> Right. But the wording, with WinXP Pro, at least, is "Hide underlined
>> letters for keyboard navigation until I press the Alt key".
>>
>> The problem is, with this option checked, while the MENU underlines do
>> appear, the ones on Command Buttons, etc. do NOT appear, when pressing
>> the Alt key. So, with this checked, you apparently NEVER get to see the
>> underlines, which I find annoying. I go to all this trouble to set up
>> shortcuts, making them visible with the underlines, and unless a user
>> goes in and knows to uncheck this option, he can never see them.
>>
>> I was hoping Dave O's code might force the issue to show them, at least
>> on command buttons for that app, but at least on my system, it does not.
>
> Try this (on each form). Alternately, you might call the code from the
> KeyDown event if the Alt button is pressed, though I prefer the FormLoad.
>
> Option Explicit
>
> Private Const WM_CHANGEUISTATE As Long = &H127
> Private Const UISF_HIDEFOCUS As Integer = &H1
> Private Const UISF_HIDEACCEL As Integer = &H2
> Private Const UIS_CLEAR As Integer = &H2
>
> Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
>        ByVal hwnd As Long, _
>        ByVal wMsg As Long, _
>        ByVal wParam As Long, _
>        lParam As Any) As Long
>
> Private Sub Form_Load()
>    Dim uiState As Long
>    uiState = MakeLong(UIS_CLEAR, UISF_HIDEFOCUS Or UISF_HIDEACCEL)
>    SendMessage Me.hwnd, WM_CHANGEUISTATE, uiState, ByVal 0
> End Sub
>
> Private Function MakeLong(ByVal wLow As Integer, ByVal wHigh As Integer)
> As Long
>    MakeLong = wHigh * &H10000 + wLow
> End Function
>
> David

Nice, ORing UISF_HIDEACCEL into what I posted earlier is a definite
improvement, I think I had to do some mucking about with spoofing keypresses
to make the command button hotkeys show before. Happily in the minimal
testing I've done with this little addition it seems to work straight off

Thanks.
Dave O.
Author
23 Feb 2009 4:19 PM
Rick Raisley
Show quote Hide quote
"David Youngblood" <d**@flash.net> wrote in message
news:uCAaSiukJHA.6124@TK2MSFTNGP02.phx.gbl...
> "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote...
>> "C Kevin Provance" <BillMIsADou***@yyz.net> wrote in message
>> news:uTnC7sskJHA.3480@TK2MSFTNGP06.phx.gbl...
>>> This is a setting you can change via the control panel > Display >
>>> Appearance > Effects > Hide underline letters for keyboard navigation...
>>>
>>
>> Right. But the wording, with WinXP Pro, at least, is "Hide underlined
>> letters for keyboard navigation until I press the Alt key".
>>
>> The problem is, with this option checked, while the MENU underlines do
>> appear, the ones on Command Buttons, etc. do NOT appear, when pressing
>> the Alt key. So, with this checked, you apparently NEVER get to see the
>> underlines, which I find annoying. I go to all this trouble to set up
>> shortcuts, making them visible with the underlines, and unless a user
>> goes in and knows to uncheck this option, he can never see them.
>>
>> I was hoping Dave O's code might force the issue to show them, at least
>> on command buttons for that app, but at least on my system, it does not.
>
> Try this (on each form). Alternately, you might call the code from the
> KeyDown event if the Alt button is pressed, though I prefer the FormLoad.
>


Yes, that worked well, David, thanks! I made the declares Public, so I
didn't need all that on each form, then just called the Form_Load code in
each form with shortcut letters.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
Author
24 Feb 2009 12:14 AM
Daryl Muellenberg
> Yes, that worked well, David, thanks! I made the declares Public, so I
> didn't need all that on each form, then just called the Form_Load code in
> each form with shortcut letters.

Just curious, why would you need to manually call the Form_Load code since
it is automatically executed each time the form loads?
Author
24 Feb 2009 7:35 PM
Rick Raisley
"Daryl Muellenberg" <dmuellenb***@comcast.net> wrote in message
news:ewbwLVhlJHA.4372@TK2MSFTNGP02.phx.gbl...
>> Yes, that worked well, David, thanks! I made the declares Public, so I
>> didn't need all that on each form, then just called the Form_Load code in
>> each form with shortcut letters.
>
> Just curious, why would you need to manually call the Form_Load code since
> it is automatically executed each time the form loads?


I didn't mean to indicate I called Form_Load manually. I was only referring
to the fact that  I made the constants and declares Public, so I could
include the actual code only in each Form_Load. I just mis-stated.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net