Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
28/08/08 17:16
Due
Nel mio programma ho una textbox chiamata "txt_Main".
Ora voglio che il programma scriva su questa textbox 2 stringhe, ma la seconda deve essere scritta a capo.
Il problema è che non so come imitare la pressione del tasto invio..ho provato così
txt_Main.Text = stringa1 & keys.enter & stringa2

e non ha funzionato: mi scrive le due stringhe di seguito intermezzate da un "13".
Poi ho provato a scrivere:
txt_Main.Text = stringa1
SendKeys.Send("{enter}")
txt_Main.Text = txt_Main.Text & stringa2

e mi scrive semplicemente le stringhe appiccicate...come posso fare?
aaa
28/08/08 17:38
manvb.net
puoi usare la costante vbcrlf oppure puoi usare chr (10) & chr(13).

stringa1 & vbcrlf & stringa2
oppure
stringa1 & chr (10) & chr(13) & stringa2
Ultima modifica effettuata da manvb.net 28/08/08 17:41
aaa
28/08/08 18:21
Due
Funziona!! grazie :k:
aaa