Anyone know how? Ctrl - Alt - type thing.
Printable View
Anyone know how? Ctrl - Alt - type thing.
what do you mean ??
What I mean is, my app is hidden. So when a user press's for example ctrl + alt + whatever, then it would show itself.
I do have an example in VB6 that I am trying to conver but with no luck:
VB Code:
Option Explicit Private Sub Form_Load() Subclass Me RegisterHotKey Me.hWnd, 1&, MOD_WIN, Asc("G") ' Upper Case RegisterHotKey Me.hWnd, 2&, MOD_WIN, Asc("g") ' Lower Case 'Note: the 1& and the 2& must increment for each registered hot-key End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Unsubclass End Sub Public Sub HotKey(dwKey As Long, dwShift As Long) ' Called from WndProc If (dwKey = Asc("G") Or dwKey = Asc("g")) And (dwShift = MOD_WIN) Then Visible = Not Visible End If End Sub
try this ....
Thank you! Works like a charm. I almost gave up on this idea.
Well , it's VB6 Code that I used to use ... but I'm looking for .NET way .I bet there are many ways around but seems out of reach ... maybe through DX . Yes I guess ;)