All Basic

Sanal Alemin En Büyük Vb Kod Arşivi

Visual Basic

Visual Basic, Microsoft tarafından, Basic programlama dili üzerinde geliştirilmiş, olay yönlendirmeli, üst seviye, nesne tabanlı ve görsel bir programlama dilidir.

AllBasic

Animasyonlu açılış formu

Animasyonlu Açılış Formu


Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Type POINTAPI
        X As Long
        Y As Long
End Type

Dim xx, yy
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then xx = X: yy = Y: Timer1.Enabled = False
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
splash.Move splash.Left + (X - xx), splash.Top + (Y - yy)
End If
End Sub
Sub YILDIZ()
On Error GoTo hata:
Static Q
Dim deger, pi, k, radyan, xx(40) As POINTAPI, SONUC As Long, Z
pi = Atn(1) * 4:
For c = 0 To 185 Step 5
    radyan = Q * 180 / pi
    xx(Z).X = (Me.ScaleWidth / 2 + Cos(radyan) * Me.ScaleWidth / 2)
    xx(Z).Y = (Me.ScaleHeight / 2 + Sin(radyan) * Me.ScaleHeight / 2)
Q = Q + 5: Z = Z + 1
Next
SONUC = CreatePolygonRgn(xx(0), 38, WINDING)
SONUC = SetWindowRgn(splash.hWnd, SONUC, True)
Exit Sub
hata:
Q = 0
End Sub

Sub içyıldız()
splash.Show
splash.DrawWidth = 2
r1 = Int(Rnd * 250) + 2: r2 = Int(Rnd * 250) + 4
r3 = Int(Rnd * 250) + 6: a1 = 2: a2 = 4: a3 = 6
pi = Atn(1) * 4
For c = 360 To 0 Step -0.5
If r1 <= 3 Or r1 > 255 Then a1 = -a1
If r2 <= 5 Or r2 > 255 Then a2 = -a2
If r3 <= 7 Or r3 > 255 Then a3 = -a3
r1 = r1 + a1: r2 = r2 + a2: r3 = r3 + a3
radyan = c * pi / 180
a = (Me.ScaleWidth / 2 + Cos(radyan) * Me.ScaleWidth / 2)
b = (Me.ScaleHeight / 2 + Sin(radyan) * Me.ScaleHeight / 2)
a5 = (Me.ScaleWidth / 2 + Cos(radyan) * ((Me.ScaleWidth / 2) - (Me.ScaleWidth / 10)))
b5 = (Me.ScaleHeight / 2 + Sin(radyan) * ((Me.ScaleHeight / 2) - (Me.ScaleHeight / 10)))
splash.Line (ScaleWidth / 2, ScaleHeight / 2)-(a5, b5), RGB(r1, r2, r3)
Next
End Sub

Sub dışyıldız()
splash.DrawWidth = 2
r1 = Int(Rnd * 250) + 2: r2 = Int(Rnd * 250) + 4
r3 = Int(Rnd * 250) + 6: a1 = 2: a2 = 4: a3 = 6
pi = Atn(1) * 4
For c = 0 To 360 Step 0.5
If r1 <= 3 Or r1 > 255 Then a1 = -a1
If r2 <= 5 Or r2 > 255 Then a2 = -a2
If r3 <= 7 Or r3 > 255 Then a3 = -a3
r1 = r1 + a1: r2 = r2 + a2: r3 = r3 + a3
radyan = c * pi / 180
a = (Me.ScaleWidth / 2 + Cos(radyan) * Me.ScaleWidth / 2)
b = (Me.ScaleHeight / 2 + Sin(radyan) * Me.ScaleHeight / 2)
a5 = (Me.ScaleWidth / 2 + Cos(radyan) * ((Me.ScaleWidth / 2) - (Me.ScaleWidth / 10)))
b5 = (Me.ScaleHeight / 2 + Sin(radyan) * ((Me.ScaleHeight / 2) - (Me.ScaleHeight / 10)))
splash.Line (a, b)-(a5, b5), RGB(r1, r2, r3)
Next
End Sub

Private Sub Form_Load()
Randomize Timer
Me.FontSize = 22
Me.ForeColor = QBColor(0)
Me.FontBold = True
Me.Show
içyıldız
dışyıldız
For k = -3 To 5 Step 0.5
CurrentY = k + (splash.ScaleHeight / 2) - (splash.TextHeight("HAKSOFT") + 5)
CurrentX = k + (splash.ScaleWidth - splash.TextWidth("HAKSOFT")) / 2: Print ("HAKSOFT")
CurrentX = k + (splash.ScaleWidth - splash.TextWidth("YAZILIM")) / 2: Print ("YAZILIM")
Next
splash.ForeColor = QBColor(14)
CurrentY = 6 + (splash.ScaleHeight / 2) - (splash.TextHeight("HAKSOFT") + 5)
CurrentX = 6 + (splash.ScaleWidth - splash.TextWidth("HAKSOFT")) / 2: Print ("HAKSOFT")
CurrentX = 6 + (splash.ScaleWidth - splash.TextWidth("YAZILIM")) / 2: Print ("YAZILIM")
splash.FontSize = 14
splash.FontBold = False
CurrentY = Me.ScaleHeight / 2 + 28
splash.ForeColor = QBColor(0)
CurrentX = 6 + ((splash.ScaleWidth - splash.TextWidth("Hakan TOPTAŞ")) / 2): Print ("Hakan TOPTAŞ")
YILDIZ
Me.Show
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then Timer1.Enabled = False: Unload Me:  Exit Sub
Timer1.Enabled = True
End Sub

Private Sub Form_Unload(Cancel As Integer)
Unload splash
End Sub

Private Sub Timer1_Timer()
Static S
S = S + 1
If S = 60 Then Timer1.Enabled = False: Unload Me:  Exit Sub
YILDIZ
End Sub