Monthly Archives: August 2010
How to register Hot Keys in VB.net
Code sample: Register multiple hotkeys such as Alt+D, Alt+C, etc.
1 |
Imports System.Runtime.InteropServices<br><br>Public Class Form1<br><br> Public Const MOD_ALT As Integer = &H1 'Alt key<br> Public Const WM_HOTKEY As Integer = &H312<br><br> <DllImport("User32.dll")> _<br> Public Shared Function RegisterHotKey(ByVal hwnd As IntPtr, _<br> ByVal id As Integer, ByVal fsModifiers As Integer, _<br> ByVal vk As Integer) As Integer<br> End Function<br><br> <DllImport("User32.dll")> _<br> Public Shared Function UnregisterHotKey(ByVal hwnd As IntPtr, _<br> ByVal id As Integer) As Integer<br> End Function<br><br> Private Sub Form1_Load(ByVal sender As System.Object, _<br> ByVal e As System.EventArgs) Handles MyBase.Load<br> RegisterHotKey(Me.Handle, 100, MOD_ALT, Keys.D)<br> RegisterHotKey(Me.Handle, 200, MOD_ALT, Keys.C)<br> End Sub<br><br> Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)<br> If m.Msg = WM_HOTKEY Then<br> Dim id As IntPtr = m.WParam<br> Select Case (id.ToString)<br> Case "100"<br> MessageBox.Show("You pressed ALT+D key combination")<br> Case "200"<br> MessageBox.Show("You pressed ALT+C key combination")<br> End Select<br> End If<br> MyBase.WndProc(m)<br> End Sub<br><br> Private Sub Form1_FormClosing(ByVal sender As System.Object, _<br> ByVal e As System.Windows.Forms.FormClosingEventArgs) _<br> Handles MyBase.FormClosing<br> UnregisterHotKey(Me.Handle, 100)<br> UnregisterHotKey(Me.Handle, 200)<br> End Sub<br><br>End Class |
Find Failure Calls in T-Server
Here is technical tip to find failure calls in T-Server.. Download here
Tips for using Text Pad with Genesys
Here is tips for using Text Pad with Genesys.. Download here
“HTTP Error 404 – File or Directory not found” error message when you request dynamic content with IIS 6.0
To permit IIS to serve dynamic content, the administrator must unlock this content in the Web service extensions node in… Continue reading »
“HTTP Error 404 – File or Directory not found” error message when you request dynamic content with IIS 6.0
To permit IIS to serve dynamic content, the administrator must unlock this content in the Web service extensions node in… Continue reading »