Programalama > VISUAL BASIC

form için;
Dim ort As Integer
Dim a As Long
Private Sub Command1_Click()
Print
Show
Label5.Caption = (" " & Combo1.Text & " " & " " & ort & " ")
ort = (Val(Text1) + Val(Text2) + Val(Text3) + Val(Text4) + Val(Text5)) / 5
If ort < 45 Then kötü = MsgBox("dereceniz çok kötü", vbOKOnly + vbCritical, "biraz daha çalisin")

End Sub

Private Sub Command2_Click()
'Aşağıdaki rakamı değiştirebilirsiniz
Call ImplodeForm(Me, 3000)
End
Set Form1 = Nothing
End Sub


Private Sub Form_Load()
'Aşağıdaki rakamı değiştirebilirsiniz
Call ExplodeForm(Me, 5000)
Combo1.AddItem "visual basic"
Combo1.AddItem "paket programlama"
Combo1.AddItem "mikro islemci"
Combo1.AddItem "matematik"
Combo1.AddItem "felsefe"
Combo1.AddItem "edebiyat"
Combo1.AddItem "inkilap"
Combo1.AddItem "rehberlik"
Combo1.AddItem "dim kültürü"
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'Aşağıdaki rakamı değiştirebilirsiniz
Call ImplodeForm(Me, 6000)
End Sub
Private Sub Text1_Change()
If Val(Text1) > 100 Or 0 > Val(Text1) Then
MsgBox "GIRDIGINIZ SAYI 0 ILE 100 ARASI OLMALIDIR"
Text1.Text = ""
End If
End Sub

Private Sub Text2_Change()
If Val(Text2) > 100 Or Val(Text2) < 0 Then
MsgBox "GIRDIGINIZ SAYI 0 ILE 100 ARASI OLMALIDIR"
Text2.Text = ""
End If

End Sub

Private Sub Text3_Change()
If Val(Text3) > 100 Or 0 > Val(Text3) Then
MsgBox "GIRDIGINIZ SAYI 0 ILE 100 ARASI OLMALIDIR"
Text3.Text = ""
End If

End Sub

Private Sub Text4_Change()
If Val(Text4) > 100 Or 0 > Val(Text4) Then
MsgBox "GIRDIGINIZ SAYI 0 ILE 100 ARASI OLMALIDIR"
Text4.Text = ""
End If

End Sub

Private Sub Text5_Change()
If Val(Text3) > 100 Or 0 > Val(Text3) Then
MsgBox "GIRDIGINIZ SAYI 0 ILE 100 ARASI OLMALIDIR"
Text3.Text = ""
End If
End Sub

Private Sub Timer1_Timer()
Form1.Caption = Right(Form1.Caption, 1) & _
Left(Form1.Caption, Len(Form1.Caption) - 1)
End Sub



Private Sub Timer2_Timer()
Line (800, 800)-(800, 800 + a), Int(Rnd * 65000)
Line (2000, 800)-(2000, 800 + a), Int(Rnd * 65000)
Line (3000, 800)-(3000, 800 + a), Int(Rnd * 65000)
Line (4000, 800)-(4000, 800 + a), Int(Rnd * 65000)
Line (5000, 800)-(5000, 800 + a), Int(Rnd * 65000)
Line (6000, 800)-(6000, 800 + a), Int(Rnd * 65000)
Line (7000, 800)-(7000, 800 + a), Int(Rnd * 65000)
Line (8000, 800)-(8000, 800 + a), Int(Rnd * 65000)
Line (9000, 800)-(9000, 800 + a), Int(Rnd * 65000)
Line (10000, 800)-(10000, 800 + a), Int(Rnd * 65000)
Line (11000, 800)-(11000, 800 + a), Int(Rnd * 65000)
Line (12000, 800)-(12000, 800 + a), Int(Rnd * 65000)
Line (13000, 800)-(13000, 800 + a), Int(Rnd * 65000)
Line (14000, 800)-(14000, 800 + a), Int(Rnd * 65000)
Line (15000, 800)-(15000, 800 + a), Int(Rnd * 65000)
Line (800, 800)-(800 + a, 800), Int(Rnd * 65000)
Line (800, 2000)-(800 + a, 2000), Int(Rnd * 65000)
Line (800, 3000)-(800 + a, 3000), Int(Rnd * 65000)
Line (800, 4000)-(800 + a, 4000), Int(Rnd * 65000)
Line (800, 5000)-(800 + a, 5000), Int(Rnd * 65000)
Line (800, 6000)-(800 + a, 6000), Int(Rnd * 65000)
Line (800, 7000)-(800 + a, 7000), Int(Rnd * 65000)
Line (800, 8000)-(800 + a, 8000), Int(Rnd * 65000)
Line (800, 9000)-(800 + a, 9000), Int(Rnd * 65000)
Line (800, 10000)-(800 + a, 10000), Int(Rnd * 65000)
Line (800, 11000)-(800 + a, 11000), Int(Rnd * 65000)
a = a + 50
End Sub

modüles için;

#If Win16 Then
Type RECT
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type
#Else
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
#End If

#If Win16 Then
Declare Sub GetWindowRect Lib "User" (ByVal hwnd As Integer, lpRect As RECT)
Declare Function GetDC Lib "User" (ByVal hwnd As Integer) As Integer
Declare Function ReleaseDC Lib "User" (ByVal hwnd As Integer, ByVal hdc As Integer) As Integer
Declare Sub SetBkColor Lib "GDI" (ByVal hdc As Integer, ByVal crColor As Long)
Declare Sub Rectangle Lib "GDI" (ByVal hdc As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer)
Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer
Declare Function SelectObject Lib "GDI" (ByVal hdc As Integer, ByVal hObject As Integer) As Integer
Declare Sub DeleteObject Lib "GDI" (ByVal hObject As Integer)
#Else
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Declare Function SelectObject Lib "user32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
#End If

Sub ExplodeForm(f As Form, Movement As Integer)
Dim myRect As RECT
Dim formWidth%, formHeight%, i%, X%, Y%, Cx%, Cy%
Dim TheScreen As Long
Dim Brush As Long
GetWindowRect f.hwnd, myRect
formWidth = (myRect.Right - myRect.Left)
formHeight = myRect.Bottom - myRect.Top
TheScreen = GetDC(0)
Brush = CreateSolidBrush(f.BackColor)
For i = 1 To Movement
Cx = formWidth * (i / Movement)
Cy = formHeight * (i / Movement)
X = myRect.Left + (formWidth - Cx) / 2
Y = myRect.Top + (formHeight - Cy) / 2
Rectangle TheScreen, X, Y, X + Cx, Y + Cy
Next i
X = ReleaseDC(0, TheScreen)
DeleteObject (Brush)
End Sub

Public Sub ImplodeForm(f As Form, Movement As Integer)
Dim myRect As RECT
Dim formWidth%, formHeight%, i%, X%, Y%, Cx%, Cy%
Dim TheScreen As Long
Dim Brush As Long
GetWindowRect f.hwnd, myRect
formWidth = (myRect.Right - myRect.Left)
formHeight = myRect.Bottom - myRect.Top
TheScreen = GetDC(0)
Brush = CreateSolidBrush(f.BackColor)
For i = Movement To 1 Step -1
Cx = formWidth * (i / Movement)
Cy = formHeight * (i / Movement)
X = myRect.Left + (formWidth - Cx) / 2
Y = myRect.Top + (formHeight - Cy) / 2
Rectangle TheScreen, X, Y, X + Cx, Y + Cy
Next i
X = ReleaseDC(0, TheScreen)
DeleteObject (Brush)
End Sub





yapmanız gereken sadece form üzerine 5 adet textbox 6 adet label 1 tane command buton 2 tane timer ve bir tane combo bax eklemenizdir ondan sonra kopyala yapıştır işinizi görür şimdiden hayırlı olsun

zafer aslan&amp&amp#3541zasemim&amp&amp#3540
zasemim[hotmail.com


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.