gfb_cnn_1907
👑Efsanevi Grafiker👑
- Katılım
- 9 Mar 2009
- Mesajlar
- 2,173
- Tepkime puanı
- 42
Form üzerinde 2 adet textbox nesnesi bulunmaktadır. 1. textbox a girilen karakterleri tersten 2. textbox nesnesine yazdıran Visal Basic programını yazınız.
Private Sub Text1_Change()
Text2 = ""
uz = Len(Text1)
ters = uz
For i = 1 To uz
harf = Mid(Text1, ters, 1)
Text2 = Text2 & harf
ters = ters - 1
Next
End Sub
Form üzerinde 5 adet textbox ve bir adet button bulunmaktadır. Butona basıldığında textbox1’n içeriğini textbox2’ye aktaran, textbox2’nin genişliğini textbox3’e yazdıran, textbox3’ün arka plan rengini kırmızı yapan, textbox4’ün arka plan rengi ne ise textbox5’in arka plan rengini de aynısı yapan, textbox5’in genişliğini textbox4’e yazdıran Visal Basic programını yapınız.
Private sub command1_click()
text2.text=text1.text
text3=text2.width
text3.width=vbred
text5.backcolor=text4.backcolor
text4=text5.width
End Sub
2 label ve 1 butonun yer aldığı bir formda butona tıklandığında label nesnelerindeki değerlerin yerlerini değiştiren Visal Basic programını yazınız.
private sub commad1_click
a=label1
b=label2
label2=a
label1=b
end sub
Butona basıldığında 1 ile 100 arasında rasgele sayı üretilen 10 sayıdan 50 ve altında kaç sayı üretildiğini tespit edip sonucu msgbox ile bildiren Visal Basic programını yapınız.
private sub command1_click()
for i=1 to 10
randomize timer
sayi=rnd()*100
if sayi<50 then
toplam=toplam+1
end if
next i
msgbox(toplam)
end sub
:smile::smile::smile:
Private Sub Text1_Change()
Text2 = ""
uz = Len(Text1)
ters = uz
For i = 1 To uz
harf = Mid(Text1, ters, 1)
Text2 = Text2 & harf
ters = ters - 1
Next
End Sub
Form üzerinde 5 adet textbox ve bir adet button bulunmaktadır. Butona basıldığında textbox1’n içeriğini textbox2’ye aktaran, textbox2’nin genişliğini textbox3’e yazdıran, textbox3’ün arka plan rengini kırmızı yapan, textbox4’ün arka plan rengi ne ise textbox5’in arka plan rengini de aynısı yapan, textbox5’in genişliğini textbox4’e yazdıran Visal Basic programını yapınız.
Private sub command1_click()
text2.text=text1.text
text3=text2.width
text3.width=vbred
text5.backcolor=text4.backcolor
text4=text5.width
End Sub
2 label ve 1 butonun yer aldığı bir formda butona tıklandığında label nesnelerindeki değerlerin yerlerini değiştiren Visal Basic programını yazınız.
private sub commad1_click
a=label1
b=label2
label2=a
label1=b
end sub
Butona basıldığında 1 ile 100 arasında rasgele sayı üretilen 10 sayıdan 50 ve altında kaç sayı üretildiğini tespit edip sonucu msgbox ile bildiren Visal Basic programını yapınız.
private sub command1_click()
for i=1 to 10
randomize timer
sayi=rnd()*100
if sayi<50 then
toplam=toplam+1
end if
next i
msgbox(toplam)
end sub
:smile::smile::smile: