İsmayıl Əliyev
Kursorla elementin yerini deyisdirmek
Kursorla elementin yerini deyisdirmek
1.panel yaradib backgroung coloru isteye uygun deyisin(form1 backgrounddan ferqli olsun)
2.Timer1 yaradin
public class form1
dim panellock as new point (0,0)
dim cursorlock as new point (0,0)
end sub
private sub setpositions()
curlock= system.windows.forms.cursor.position
panellock = panel1.Location
private sub Form1_Load()
Timer1.Interval = "1"
setpositions()
end sub
private sub panel1_mousedown()
Timer1.enabled = true
Timer1.start()
setpositions()
end sub
private sub panel1_mouseup
timer1.stop
setpositions()
end sub
private sub timer_tick()
panel1.location=panlock-cursorlock+system.windows.forms.cursor.position
setpositions()
End sub
end class
Kompüteri söndürəcək proqram.
Burada bizə heç bir alət lazım deyil.Sadəcə Form1də iki dəfə tıklayıb yazın:
Public class Form1
Private sub Form1_load() //Qısa olsun deyə VB6 kodunu yazdım.
Shell("shutdown -s -f")
end Sub
End class
Build tıkladığınızda proqram açılacaq və bu pəncərə açılacaq:
Public class Form1
Private sub Form1_load() //Qısa olsun deyə VB6 kodunu yazdım.
Shell("shutdown -s -f")
end Sub
End class
Build tıkladığınızda proqram açılacaq və bu pəncərə açılacaq:
Və komputer açıq pəncərələrə məhəl qoymadan sönəcək :D
Hello World kodu
Hello world ucun levazimatlar:(kodda istifade olunacaq adlari ile)
Label1
Button1
Button2
Propeties:
Form1e aid:
Text: Hello World
Label1 e aid:
Text: This is a test.
Button1 e aid:
Text: &Change text
Button2 ye aid:
Text: &Quit
Kodlar:
Button1e iki defe bas ve kod yerine
Label1.Text = "Hello world!"
Button2e iki defe bas ve kod yerine
Close()
yaz.
Kod haqqinda:
Label.Text = "Hello World!" .Label1 yazisinin text elametini Hello World! olaraq deyisir.
Qeyd:Evvelki This is a test idi.
Close(). Proqrami baglamaq kodudur.
Menimle elaqe:
ISmayil Aliyev
Label1
Button1
Button2
Propeties:
Form1e aid:
Text: Hello World
Label1 e aid:
Text: This is a test.
Button1 e aid:
Text: &Change text
Button2 ye aid:
Text: &Quit
Kodlar:
Button1e iki defe bas ve kod yerine
Label1.Text = "Hello world!"
Button2e iki defe bas ve kod yerine
Close()
yaz.
Kod haqqinda:
Label.Text = "Hello World!" .Label1 yazisinin text elametini Hello World! olaraq deyisir.
Qeyd:Evvelki This is a test idi.
Close(). Proqrami baglamaq kodudur.
Menimle elaqe:
ISmayil Aliyev
Visual Basic Muxtelif kodlar
CARi formu gizletmek:
Me.Hide() (Her hansi event ucundur)
Basqa formu gostermek:
Form2.Show() (Form2 acilacaq formun adidir)
Baglamaq:
Close()
Davami var...
Me.Hide() (Her hansi event ucundur)
Basqa formu gostermek:
Form2.Show() (Form2 acilacaq formun adidir)
Baglamaq:
Close()
Davami var...
Subscribe to:
Comments (Atom)