Link to home
Start Free TrialLog in
Avatar of orekin
orekinFlag for Australia

asked on

Cannot Undo SystemParametersInfo API Call ! Please Help !!

Hi
I wanted accelerator keys to show for my users, so I followed the instructions in http://www.codeproject.com/KB/dotnet/General.aspx
However I cannot work out how to call the function to reverse my change !
Thanks
Nick

Public Class AcceleratorKeyVisibilityUtils
    <DllImport("user32.dll")> _
    Private Shared Sub SystemParametersInfo(ByVal uiAction As UInteger, ByVal uiParam As UInteger, ByRef pvParam As Integer, ByVal fWinIni As UInteger)
    End Sub
 
    Const SPI_SETKEYBOARDCUES As UInteger = &H100B
 
    Public Shared Sub AcceleratorsVisible_ChangeSystemSetting(ByVal pShowAccelerators As Boolean)
        SystemParametersInfo(SPI_SETKEYBOARDCUES, 0, pShowAccelerators, 0)
    End Sub
 
End Class

Open in new window

Avatar of Rimvis
Rimvis
Flag of Lithuania image

Hello orekin,

Maybe you can use SPI_GETKEYBOARDCUES (0x100A) action to get current settings?

Regards,

Rimvis
Avatar of orekin

ASKER

I'm not sure what you mean.  
Wouldn't SPI_GETKEYBOARDCUES be used to retrieve the settings ?
I want to change the settings back to what they were - in other words "Hide Underlined letters for keyboard navigation until I press the ALT Key"
Sorry, I misunderstood.

Try to set pShowAccelerators to False
Avatar of orekin

ASKER

Well, yes, I tried to set pShowAccelerators = False and it does not reverse the change.  

Anyone else have any ideas ?  This should be a solvable problem ....
Avatar of orekin

ASKER

Another unanswered question of mine.
Another question that a moderator will forcibly close.
Yet this question is direct, short and clearly expained.  
It seems that Experts Exchange is a Waste of Money
ASKER CERTIFIED SOLUTION
Avatar of orekin
orekin
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial