Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2007
    Messaggi
    119

    [vb6] Problema evento keypress (messaggi windows?)

    Nel seguente codice ho un problemino tanto banale quanto irritante..

    codice:
    Private Sub txtValue_KeyPress(Index As Integer, KeyAscii As Integer)
    Dim val As String
    val = txtValue(Index).Text
    If KeyAscii = 44 Then
        txtValue(Index).Text = val
        MsgBox "Use - . - insted of - , -", vbInformation
        Exit Sub
    ...
    Tutto bene in fase di debug (debug.print), peccato che però poi la virgola la metta lo stesso..

    Perchè tutto cio? E' una questione di "messaggeria" di Windows?
    Come si può fare?

    Grazie.

  2. #2
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480

    Re: [vb6] Problema evento keypress (messaggi windows?)

    codice:
    Private Sub txtValue_KeyPress(Index As Integer, KeyAscii As Integer)
    Dim val As String
    val = txtValue(Index).Text
    If KeyAscii = 44 Then
        txtValue(Index).Text = val
        MsgBox "Use - . - insted of - , -", vbInformation
        KeyAscii = 0
        Exit Sub
    ...

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2007
    Messaggi
    119
    scusate per la banalità, ma ormai ero in loop infinito...

    Grazie Oregon, sei più veloce della mia connessione (UMTS) VVoVe:

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.