Article View: free.it.visual-basic
Article #1713eccoti servito
From: daniele
Date: Sat, 21 Feb 2004 20:26
Date: Sat, 21 Feb 2004 20:26
57 lines
2416 bytes
2416 bytes
"Max" <ozitalyNOSPAMM@giovani.it> ha scritto nel messaggio news:vQMZb.10072$HO2.5006@news.edisontel.com... > Avrei bisogno di un piccolo aiuto: > > Ho 2 valori da inserire, entrambi hanno 3 caratteri alfanumerici: > esempio: > in una text1.text il valore (TG1) ed in text2.text il valore (TG2) > domanda: > Come faccio ad inserire di seguito i 6 caratteri (TG1+TG2=6 > caratteri)passando cio� dal text1.text al text2.text senza che utilizzi il > tasto TAB o l'enter della tastiera? > Per questo tipo di input � giusto usare un textbox come da esempio? > Oppure per rendere sensibile al numero di caratteri max inseribili per poi > passare automaticamente nella textbox2 si deve fare in altra maniera usando > un altra funzione? > Ringrazio chiunque mi aiuti > Max > > > Supponendo di avere textbox1 con tabindex=1 e textbox1 con tabindex=2 fai cos�: imposti una variabile globale ad esempio Dim a as int16 Poi ti metti nell'evento TextBox1_KeyPress Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress a += 1 If a = 3 Then TabIndex = 1 TextBox1.Enabled = False End If End Sub In questa maniera tutto quello che scrivi dentro a tb1 di 3 caratteri alfanumerici dopo il 3 carattere il cursore si sposta sul secondo textbox mettendo TextBox1 a "enabled" Prego Daniele
Technical Details
Message-ID:
<S9PZb.23048$Kc3.694813@twister2.libero.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mailReferences:
<vQMZb.10072$HO2.5006@news.edisontel.com>Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII X-Google-Thread: f94ee,c6510669cf28c2d1 X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2004-02-21 12:26:27 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail From: "daniele" <danielesabaini@libero.it> Newsgroups: free.it.visual-basic References: <vQMZb.10072$HO2.5006@news.edisontel.com> Subject: eccoti servito Lines: 59 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <S9PZb.23048$Kc3.694813@twister2.libero.it> Date: Sat, 21 Feb 2004 20:26:26 GMT NNTP-Posting-Host: 151.30.36.189 X-Complaints-To: abuse@libero.it X-Trace: twister2.libero.it 1077395186 151.30.36.189 (Sat, 21 Feb 2004 21:26:26 MET) NNTP-Posting-Date: Sat, 21 Feb 2004 21:26:26 MET Organization: [Infostrada]