to write to Registry.LocalMachine in vista or win7 you need admin privileges in your app, which requires vb2008+.
Project-->Properties-->Application-->View UAC Settings + follow the instructions in your app.manifest
to catch the key combination, set your form's keypreview property to true, then handle the keydown event:
vb Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown Static ALT_F6_Pressed As Boolean = False If e.Modifiers = Keys.Alt AndAlso e.KeyValue = Keys.F6 AndAlso ALT_F6_Pressed = False Then ALT_F6_Pressed = True ElseIf e.Modifiers = Keys.Alt AndAlso e.KeyValue = Keys.F6 AndAlso ALT_F6_Pressed = True Then 'edit registry ALT_F6_Pressed = False End If End Sub




Reply With Quote