ALT Key Shortcuts Hidden

前提是你 提交于 2019-12-11 02:28:35

问题


I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application.

ex. "&Goto Here" is not underlining the G until I press the ALT key.

Is there a way to have this underline the text that I put an ampersand in front of when the form/application starts instead of having to have the user press the alt key?

Thanks!


回答1:


This is a desktop setting in Windows.

Right click the desktop, go to Properties, then click the Appearance tab, and then click the Effects button. You should see the setting for "Hide underlined letters for keyboard navigation until I press the Alt Key"

There are similar settings for Vista and 7 that you can set.

These are, however, individual desktop settings (and this one, sadly, is the Windows installation default).




回答2:


''''''''''''' its working fine

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load      
  Dim myThread As New System.Threading.Thread(AddressOf SendAltKey)
  Call myThread.Start()
End Sub

Private Sub SendAltKey()
  System.Windows.Forms.SendKeys.SendWait("%")
  System.Windows.Forms.SendKeys.SendWait("Esc")
End Sub


来源:https://stackoverflow.com/questions/1701815/alt-key-shortcuts-hidden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!