26/01/10 15:03
maurizio74
Ci sono tante cose che devo ancora imparare in visual basic ma grazie a te qualche lacuna me l'hai tolta... cmq per completare il cerchio c'e' l'ultimo errorino da risolvere nel senso: da tasti della calcolatrice funziona tutto perfetto mi da eerore nel form_key press quando digito un operatore mi da errore l'emento '0' della matrice di controlli non esiste.. e tra laltro non mi schiacca la virgola?????
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim Index As Integer
If KeyAscii = 13 Then KeyAscii = 61
Select Case KeyAscii
Case Asc("0" To Asc("9"
Index = KeyAscii - Asc("0"
number_Click (Index)
Case Asc("+", Asc("-", Asc("*", Asc("/", Asc("="
Index = -1
Do
Index = Index + 1
Loop Until operator(Index).Tag = Chr(KeyAscii)
operator_Click (Index)
Case Asc(".", Asc(","
virgola_Click (Index)
Case 8
cancella1_Click
End Select
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim Index As Integer
If KeyAscii = 13 Then KeyAscii = 61
Select Case KeyAscii
Case Asc("0" To Asc("9"
Index = KeyAscii - Asc("0"
number_Click (Index)
Case Asc("+", Asc("-", Asc("*", Asc("/", Asc("="
Index = -1
Do
Index = Index + 1
Loop Until operator(Index).Tag = Chr(KeyAscii)
operator_Click (Index)
Case Asc(".", Asc(","
virgola_Click (Index)
Case 8
cancella1_Click
End Select
End Sub
aaa