掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
キーボードからの入力制限をかけるには?(VB6.0) (ID:126320)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
実は先週から始めたばかりですので用語などがほとんどわからないまま やっております。 下に現状のソースコードを記入しておきます。 VBが使える方から見れば「なんじゃこりゃ?」と思われると 思いますが、これが現在の自分の限界です・・・。 Private Sub Text1_KeyPress(KeyAscii As Integer) Dim A, B, C, D, E, F, G, H, I, J As Integer Select Case Text1 Case 0 If KeyAscii = vbKeyA Then KeyAscii = vbKey0 Case 1 If KeyAscii = vbKeyB Then KeyAscii = vbKey1 Case 2 If KeyAscii = vbKeyC Then KeyAscii = vbKey2 Case 3 If KeyAscii = vbKeyD Then KeyAscii = vbKey3 Case 4 If KeyAscii = vbKeyE Then KeyAscii = vbKey4 Case 5 If KeyAscii = vbKeyF Then KeyAscii = vbKey5 Case 6 If KeyAscii = vbKeyG Then KeyAscii = vbKey6 Case 7 If KeyAscii = vbKeyH Then KeyAscii = vbKey7 Case 8 If KeyAscii = vbKeyI Then KeyAscii = vbKey8 Case 9 If KeyAscii = vbKeyJ Then KeyAscii = vbKey9 End If Case Else KeyAscii = 0 End Select End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.