Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [VB6] Problemino tra Keypress e GotFocus

    Ciao ho un problemino, in questa text devo controllare che siano solo numeri, quindi :

    codice:
    Private Sub txtIMPORTO_GotFocus(Index As Integer)
    On Error Resume Next
        txtIMPORTO(Index).BackColor = &HFBF0D9
        txtIMPORTO(Index).SelLength = Len(txtIMPORTO(Index).Text)
    End Sub
    Ma da quando ho messo questa non funziona piu' ..

    codice:
    Private Sub txtIMPORTO_KeyPress(Index As Integer, KeyAscii As Integer)
    Select Case KeyAscii
            Case 48 To 57, 44, 8, 45, 46, vbKeyTab
            Case Else
                KeyAscii = 0
                Beep
        End Select
    End Sub
    Ma prima funzinava correttamente.
    Io gli passo il KeyTab ..

  2. #2
    Utente di HTML.it L'avatar di Sypher
    Registrato dal
    Jun 2003
    Messaggi
    1,994
    Non capisco cos'è che non ti funziona esattamente?
    A me sembra che funziona...
    La passera non dura perchè Sypher la cattura!

    "No one like us we don't care, we are millwall, super millwall, we are millwall from the DEN"

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.