Neurochirurgie minim invazivă
"Primum non nocere" este ideea ce a deschis drumul medicinei spre minim invaziv. Avansul tehnologic extraordinar din ultimele decenii a permis dezvoltarea tuturor domeniilor medicinei. Microscopul operator, neuronavigația, tehnicile anestezice avansate permit intervenții chirurgicale tot mai precise, tot mai sigure. Neurochirurgia minim invazivă, sau prin "gaura cheii", oferă pacienților posibilitatea de a se opera cu riscuri minime, fie ele neurologice, infecțioase, medicale sau estetice. www.neurohope.ro |
TEXTBox + Button
Last Updated: Jun 08 2011 16:34, Started by
cristi_ursu
, Jun 08 2011 07:34
·
0
#1
Posted 08 June 2011 - 07:34
Pls Heeelp,
am 4 Textboxuri si un Buton intr-un Form. In momentul in care 1. selectez Textbox1,apoi 2. fac click pe button vreau sa-mi adauge un text in Textbox1 (de exemplu litera "G") 3. selectez Textbox2,apoi 4. fac click pe button vreau sa-mi adauge un text in Textbox2 (aceeasi litera "G") 5.la fel pt. toate cele 4 Textboxuri din form. Multumesc anticipat. |
#2
Posted 08 June 2011 - 09:09
cristi_ursu, on 8th June 2011, 08:34, said: Pls Heeelp, am 4 Textboxuri si un Buton intr-un Form. In momentul in care 1. selectez Textbox1,apoi 2. fac click pe button vreau sa-mi adauge un text in Textbox1 (de exemplu litera "G") 3. selectez Textbox2,apoi 4. fac click pe button vreau sa-mi adauge un text in Textbox2 (aceeasi litera "G") 5.la fel pt. toate cele 4 Textboxuri din form. Multumesc anticipat. Ai mai jos codul : Public Class Form1 Dim txt As TextBox Private Sub TextBox1_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus txt = TextBox1 End Sub Private Sub TextBox2_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus txt = TextBox2 End Sub Private Sub TextBox3_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.GotFocus txt = TextBox3 End Sub Private Sub TextBox4_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.GotFocus txt = TextBox4 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click txt.Text = "G" End Sub End Class Atasat exemplu... Attached Files |
#3
Posted 08 June 2011 - 09:22
Si daca dau click din prima pe buton, fara sa dau focus vre-unui textbox in prealabil, ce se intampla?
Edited by tatarduka, 08 June 2011 - 09:22. |
#4
Posted 08 June 2011 - 09:51
tatarduka, on 8th June 2011, 10:22, said: Si daca dau click din prima pe buton, fara sa dau focus vre-unui textbox in prealabil, ce se intampla? Nimic:D Decat o eroare... Modifica codul... Pune in Form1_Load TextBox1.Focus... Daca nu vrei sa iti mai dea eroarea aia... SAU Apare un MsgBox care te informeaza ca nu ai completat nici o caseta! Cod : Public Class Form1 Dim txt As TextBox Private Sub TextBox1_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus txt = TextBox1 End Sub Private Sub TextBox2_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus txt = TextBox2 End Sub Private Sub TextBox3_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.GotFocus txt = TextBox3 End Sub Private Sub TextBox4_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.GotFocus txt = TextBox4 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If txt Is Nothing Then MsgBox("Nici o caseta selectata!") Else txt.Text = "G" End If End Sub End Class Fisier atasat. Attached FilesEdited by mihaieparu, 08 June 2011 - 10:00. |
#5
Posted 08 June 2011 - 10:34
Multumesc mihaieparu,
este super dar la executie este selectat automat primul textbox (textbox1). cum pot face sa nu fie nimic selectat? multumesc. |
#6
Posted 08 June 2011 - 16:34
cristi_ursu, on 8th June 2011, 11:34, said: Multumesc mihaieparu, este super dar la executie este selectat automat primul textbox (textbox1). cum pot face sa nu fie nimic selectat? multumesc. Acum, la pornire selecteaza automat Button1... Public Class Form1 Dim txt As TextBox Private Sub TextBox1_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus txt = TextBox1 End Sub Private Sub TextBox2_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus txt = TextBox2 End Sub Private Sub TextBox3_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.GotFocus txt = TextBox3 End Sub Private Sub TextBox4_Focus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.GotFocus txt = TextBox4 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If txt Is Nothing Then MsgBox("Nici o caseta selectata!") Else txt.Text = "G" End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ActiveControl = Button1 End Sub End Class Dar tie pentru ce iti trebuie acest program? Attached Files |
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users