تبليغاتX
رنگارنگ - Source Code ViusalBasid سورس كد ويژوال بيسيك (ScreenSaver)

رنگارنگ

نرم افزار با کرک.برنامه.کلیپ و بازی موبایل.والپیپر.طالع بینی.فال روز.فال قهوه.جک.sms.آموزش.ترفند

Source Code ViusalBasid سورس كد ويژوال بيسيك (ScreenSaver)

در صورتی که لینک دانلود ارور دارد به سایت www.pcmoj.com بیایید

Source Code ViusalBasid سورس كد ويژوال بيسيك

سورس کدی که در اینجا قرار دادم سورس یک اسکرین سیور گل هست که به اشکال مختلفی تغییر پیدا میکنه که شما سورس آن بهمراه تصویر و دانلود را در زیر میبینید . 

پسورد فايل زيپ : janbarkaff.blogfa

دانلود - 2 کیلوبایت  

                      Source Code ViusalBasid سورس كد ويژوال بيسيك

Option Explicit

Private Type POINTAPI
  X As Long
  Y As Long
End Type

Private Declare Function Polygon Lib "gdi32" _
  (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long

Private Elem(5) As Integer
Private cx(5) As Long
Private cy(5) As Long
Private dx(5) As Long
Private dy(5) As Long
Private ca(5) As Long
Private da(5) As Long
Private l1(5) As Long
Private l2(5) As Long
Private w(5) As Long
Private bnc(5) As Single
Private bnr(5) As Single
Private r(5) As Integer
Private g(5) As Integer
Private b(5) As Integer
Private dr(5) As Integer
Private dg(5) As Integer
Private db(5) As Integer

Private Px As Long
Private Py As Long

Const pi = 3.14159265

Private Sub Form_Load()
BorderStyle = 0
Caption = "Exploding Flowers"
WindowState = 2
FillStyle = 0
FillColor = 0
BackColor = 0
ScaleMode = vbPixels
Show
Randomize
Timer1.Interval = 10
End Sub

Private Sub Timer1_Timer()
Dim cnt As Integer
Dim angle As Integer
Dim Polyset(3) As POINTAPI
Dim i As Integer

i = Int(Rnd(1) * 100)
If i < 6 Then
    If Elem(i) = 0 Then
        Elem(i) = Int(Rnd(1) * 13) + 3
        cx(i) = Int(Rnd(1) * ScaleWidth)
        cy(i) = Int(Rnd(1) * ScaleHeight)
        Do
            dx(i) = Int(Rnd(1) * 9) - 4
            dy(i) = Int(Rnd(1) * 9) - 4
        Loop While dx(i) = 0 And dy(i) = 0
        ca(i) = Int(Rnd(1) * 360)
        da(i) = Int(Rnd(1) * 7) - 3
        l1(i) = Int(Rnd(1) * 400) + 20
        l2(i) = Int(Rnd(1) * (l1(i) * 0.8))
        bnc(i) = Rnd(1)
        bnr(i) = Rnd(1) / 20
        w(i) = Int(Rnd(1) * 25) + 1
        r(i) = Int(Rnd(1) * 253) + 2
        g(i) = Int(Rnd(1) * 253) + 2
        b(i) = Int(Rnd(1) * 253) + 2
        dr(i) = Int(Rnd(1) * 5) - 2
        dg(i) = Int(Rnd(1) * 5) - 2
        db(i) = Int(Rnd(1) * 5) - 2
    End If
End If


'Draw Flower(s)
For i = 0 To 5
    If Elem(i) > 0 Then
        For cnt = 0 To Elem(i) - 1
            angle = ca(i) + (360 / Elem(i) * cnt)
       
            Polyset(0).X = cx(i)
            Polyset(0).Y = cy(i)
           
            Polar l2(i) * bnc(i), angle + w(i)
   
            Polyset(1).X = cx(i) + Px
            Polyset(1).Y = cy(i) + Py
           
            Polar l1(i) * bnc(i), angle
     
            Polyset(2).X = cx(i) + Px
            Polyset(2).Y = cy(i) + Py
           
            Polar l2(i) * bnc(i), angle - w(i)
   

            Polyset(3).X = cx(i) + Px
            Polyset(3).Y = cy(i) + Py
           
            ForeColor = RGB(r(i), g(i), b(i))
            Polygon Me.hdc, Polyset(0), 4
        Next


        cx(i) = cx(i) + dx(i)
        cy(i) = cy(i) + dy(i)
        ca(i) = ca(i) + da(i)

        If ca(i) < 0 Then ca(i) = 360
        If ca(i) > 360 Then ca(i) = 0

        bnc(i) = bnc(i) + bnr(i)
        If bnc(i) > 1 Or bnc(i) < 0.05 Then bnr(i) = -bnr(i)

        r(i) = r(i) + dr(i)
        If r(i) > 254 Or r(i) < 2 Then dr(i) = -dr(i)
        g(i) = g(i) + dg(i)
        If g(i) > 254 Or g(i) < 2 Then dg(i) = -dg(i)
        b(i) = b(i) + db(i)
        If b(i) > 254 Or b(i) < 2 Then db(i) = -db(i)

        If cx(i) < -50 Or cx(i) > ScaleWidth + 50 Then Elem(i) = 0
        If cy(i) < -50 Or cy(i) > ScaleHeight + 50 Then Elem(i) = 0
   
    End If
Next


End Sub

Private Sub Polar(ByVal r, ByVal t)
t = (t Mod 360) * pi / 180
Px = r * Cos(t)
Py = r * Sin(t)
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Unload Me
End
End Sub

+ نوشته شده در  پنجشنبه 1387/01/08ساعت   توسط مجتبی  |