">" Keycode :O
">" Keycode :O
">" Keycode :O
">" Keycode :O
">" Keycode :O
">" Keycode :O ">" Keycode :O ">" Keycode :O ">" Keycode :O ">" Keycode :O ">" Keycode :O ">" Keycode :O ">" Keycode :O
">" Keycode :O ">" Keycode :O
">" Keycode :O
Go Back  Xtreme Visual Basic Talk > > > ">" Keycode :O


Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2010, 11:20 AM
mato900 mato900 is offline
Newcomer
 
Join Date: Nov 2010
Location: Slovenia
Posts: 9
Question ">" Keycode :O


Hi Forum

I was searching the web, tried diffrent applications for detecting keycodes and still couldn't find the right keycode for "<" (">") button . I always get keycode "226" for that button, but i tried it in my application and it doesnt work(doesnt do anything, like open a msgbox, if i press the button). If it might help i live in europe .
So now i ask you, could you help me find the keycode for that button ?

Thanks
Reply With Quote
  #2  
Old 11-04-2010, 12:47 PM
AtmaWeapon's Avatar
AtmaWeapon&quot;&gt;&quot; Keycode :O AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Could you show the code you are using and define the context in which you are looking for the key code? Going by keyboard scan codes is notoriously unreliable. There's better ways to tell if a specific key was pressed, but in order to show you the best we have to know what you're trying to do.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #3  
Old 11-04-2010, 02:39 PM
mato900 mato900 is offline
Newcomer
 
Join Date: Nov 2010
Location: Slovenia
Posts: 9
Default

I have rezultat declared as integer, and for GetAsyncKeyState you prolly know what that is XD
This is just one piece of code, i still have for CAPSLOCK-true SHIFT-false,
CAPSLOCK-false SHIFT-true, CAPSLOCK-false SHIFT-false

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For i As Integer = 1 To 225
rezultat = 0
rezultat = GetAsyncKeyState(i)
If rezultat = -32767 Then
If GetCapslock() = True And GetShift() = True Then
Select Case (i)
Case 64 To 90
TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
Case 32
TextBox1.Text = TextBox1.Text + " "
Case 8
If TextBox1.Text <> "" Then
TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.Text.Length - 1)
Else
End If
Case 106
TextBox1.Text = TextBox1.Text + "*"
Case 107
TextBox1.Text = TextBox1.Text + "+"
Case 109
TextBox1.Text = TextBox1.Text + "-"
Case 110
TextBox1.Text = TextBox1.Text + ","
Case 111
TextBox1.Text = TextBox1.Text + "/"
Case 96 To 105
TextBox1.Text = TextBox1.Text & i - "96"
Case 187
TextBox1.Text = TextBox1.Text + "*"
Case 191
TextBox1.Text = TextBox1.Text + "?"
Case 188
TextBox1.Text = TextBox1.Text + ";"
Case 190
TextBox1.Text = TextBox1.Text + ":"
Case 189
TextBox1.Text = TextBox1.Text + "_"
Case 219
TextBox1.Text = TextBox1.Text + "Š"
Case 220
TextBox1.Text = TextBox1.Text + "Ž"
Case 221
TextBox1.Text = TextBox1.Text + "Đ"
Case 222
TextBox1.Text = TextBox1.Text + "Ć"
Case 186
TextBox1.Text = TextBox1.Text + "č"
Case 192
TextBox1.Text = TextBox1.Text + "¨"
Case 226
TextBox1.Text = TextBox1.Text + "<"

End Select
End If

thanks in advance
Reply With Quote
  #4  
Old 11-04-2010, 02:47 PM
AtmaWeapon's Avatar
AtmaWeapon&quot;&gt;&quot; Keycode :O AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Actually no, I can't fathom what you'd want to use GetAsyncKeyState() for in a legitimate .NET application. Enlighten me.

What I can say is the < key is apparently one of the OEM keys, which means the key code for it can vary by region and keyboard. It's actually not even required to be present on the keyboard. I'm not aware of the mechanism that might be used to determine what its key code should be or if one even exists.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #5  
Old 11-04-2010, 02:59 PM
mato900 mato900 is offline
Newcomer
 
Join Date: Nov 2010
Location: Slovenia
Posts: 9
Default

Its kinda complicated and english isn't my primarly language XD

But, appreciate you for your time

Cheers

EDIT: Wooho I found out thanks to you :P

Last edited by mato900; 11-04-2010 at 03:09 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O &quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
 
&quot;&gt;&quot; Keycode :O
&quot;&gt;&quot; Keycode :O
 
-->