News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

visual basic .net help

Started by ✟pao✟, October 11, 2011, 04:57:04 PM

Previous topic - Next topic

✟pao✟

anyone here knows how to assign new keys in keyboard in vb? e.g: changing A to B
★★★★★★
Admin in disguise
Spoiler (click to show)
★9.14.10★

Shamrock

I didn't test this but if should be something like.

This is for VB.net 2010

Protected Overloads Overrides Function ProcessCmdKey(ByRef msg As Windows.Forms.Message, ByVal keydata As Windows.Forms.Keys) As Boolean

        If keydata = Keys.A  Then
            msgbox(B)

            End if
End Class

Note: If you are trying to type the character b instead of a then I would try making this if call a Keys.B event or a sub that pushes the key.

In the future I would also ask this at one of the Vb.net forums as they would have a better answer for you, but then you would need to provide which version year of VB.net and such

Shamrock

Also I hope you are mapping keys and not making one hell of an annoying virus lol. "Every time I push '6' I get 'g' I better call geek squad"