Forum Informatika
Silahkan Login

Kami sarankan anda register atau daftar terlebih dahulu agar anda dapat mendownload atau membuka category forum secara keseluruhan....
karena ada beberapa forum yang tertutup untuk tamu dan dengan Login Anda bisa menggunakan fasilitas Chatting yang kami miliki.

Selamat Bergabung

Forum Informatika

Created By Hanafi Sukawa Ginting
 
HomeFAQPasang Iklanfacebook InformatikaRegisterLog inNew Tab Newscomputer

Share | 
 

 Aplikasi Random pemain futsal versi notebook (VISUAL BASIC)

View previous topic View next topic Go down 
AuthorMessage


Change Your Avatar -------------->


admin

Admin
Rank : Admin


My Pets :
Jumlah posting : 550
Point : 2147483647
Reputasi : 47
Join date : 2010-04-23
Age : 24
Lokasi : indonesia

PostSubject: Aplikasi Random pemain futsal versi notebook (VISUAL BASIC)   Mon 26 Jul 2010, 19:46



Code:
Function RandomChar() As String
    Dim Char As Integer
    If Char = 1 Then RandomChar = Form2.Text1: Exit Function
    If Char = 2 Then RandomChar = Form2.Text2: Exit Function
    If Char = 3 Then RandomChar = Form2.Text3: Exit Function
    If Char = 4 Then RandomChar = Form2.Text4: Exit Function
    If Char = 5 Then RandomChar = Form2.Text5: Exit Function
End Function

Function RandomChar2() As String
    Dim Char As Integer
    If Char = 1 Then RandomChar2 = Form2.Text11: Exit Function
    If Char = 2 Then RandomChar2 = Form2.Text12: Exit Function
    If Char = 3 Then RandomChar2 = Form2.Text13: Exit Function
    If Char = 4 Then RandomChar2 = Form2.Text14: Exit Function
    If Char = 5 Then RandomChar2 = Form2.Text15: Exit Function
End Function
Function RandomChar3() As String
    Dim Char As Integer
    If Char = 1 Then RandomChar3 = Form2.Text6: Exit Function
    If Char = 2 Then RandomChar3 = Form2.Text7: Exit Function
    If Char = 3 Then RandomChar3 = Form2.Text8: Exit Function
    If Char = 4 Then RandomChar3 = Form2.Text9: Exit Function
    If Char = 5 Then RandomChar3 = Form2.Text10: Exit Function
End Function
Function RandomChar4() As String
    Dim Char As Integer
    If Char = 1 Then RandomChar4 = Form2.Text16: Exit Function
    If Char = 2 Then RandomChar4 = Form2.Text17: Exit Function
    If Char = 3 Then RandomChar4 = Form2.Text18: Exit Function
    If Char = 4 Then RandomChar4 = Form2.Text19: Exit Function
    If Char = 5 Then RandomChar4 = Form2.Text20: Exit Function
End Function

Private Sub Command1_Click()

    Dim A As String

    A = RandomChar
    B = RandomChar
    C = RandomChar
    D = RandomChar
    E = RandomChar

    Text1 = A
    Text2 = B
    Text3 = C
    Text4 = D
    Text5 = E
   
        If Text1.Text = Text2.Text Then
    ElseIf Text2.Text = Text3.Text Then
    ElseIf Text3.Text = Text4.Text Then
    ElseIf Text4.Text = Text5.Text Then
    ElseIf Text5.Text = Text2.Text Then
    ElseIf Text1.Text = Text3.Text Then
    ElseIf Text2.Text = Text4.Text Then
    ElseIf Text3.Text = Text5.Text Then
    ElseIf Text4.Text = Text2.Text Then
    ElseIf Text5.Text = Text3.Text Then
    ElseIf Text1.Text = Text4.Text Then
    ElseIf Text2.Text = Text5.Text Then
    ElseIf Text3.Text = Text2.Text Then
    ElseIf Text4.Text = Text3.Text Then
    ElseIf Text5.Text = Text4.Text Then
    ElseIf Text1.Text = Text5.Text Then
    Else
    List1.AddItem Text1
    List2.AddItem Text2
    List3.AddItem Text3
    List4.AddItem Text4
    List1.AddItem Text5
    Command1.Enabled = False
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    End If
   
   
End Sub


Private Sub Command2_Click()
Dim A As String

    A = RandomChar2
    B = RandomChar2
    C = RandomChar2
    D = RandomChar2
    E = RandomChar2

    Text1 = A
    Text2 = B
    Text3 = C
    Text4 = D
    Text5 = E
   
        If Text1.Text = Text2.Text Then
    ElseIf Text2.Text = Text3.Text Then
    ElseIf Text3.Text = Text4.Text Then
    ElseIf Text4.Text = Text5.Text Then
    ElseIf Text5.Text = Text2.Text Then
    ElseIf Text1.Text = Text3.Text Then
    ElseIf Text2.Text = Text4.Text Then
    ElseIf Text3.Text = Text5.Text Then
    ElseIf Text4.Text = Text2.Text Then
    ElseIf Text5.Text = Text3.Text Then
    ElseIf Text1.Text = Text4.Text Then
    ElseIf Text2.Text = Text5.Text Then
    ElseIf Text3.Text = Text2.Text Then
    ElseIf Text4.Text = Text3.Text Then
    ElseIf Text5.Text = Text4.Text Then
    ElseIf Text1.Text = Text5.Text Then
    Else
    List1.AddItem Text1
    List2.AddItem Text2
    List3.AddItem Text3
    List4.AddItem Text4
    List4.AddItem Text5
    Command2.Enabled = False
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    End If
   
End Sub

Private Sub Command3_Click()
Dim A As String

    A = RandomChar3
    B = RandomChar3
    C = RandomChar3
    D = RandomChar3
    E = RandomChar3

    Text1 = A
    Text2 = B
    Text3 = C
    Text4 = D
    Text5 = E

   
        If Text1.Text = Text2.Text Then
    ElseIf Text2.Text = Text3.Text Then
    ElseIf Text3.Text = Text4.Text Then
    ElseIf Text4.Text = Text5.Text Then
    ElseIf Text5.Text = Text2.Text Then
    ElseIf Text1.Text = Text3.Text Then
    ElseIf Text2.Text = Text4.Text Then
    ElseIf Text3.Text = Text5.Text Then
    ElseIf Text4.Text = Text2.Text Then
    ElseIf Text5.Text = Text3.Text Then
    ElseIf Text1.Text = Text4.Text Then
    ElseIf Text2.Text = Text5.Text Then
    ElseIf Text3.Text = Text2.Text Then
    ElseIf Text4.Text = Text3.Text Then
    ElseIf Text5.Text = Text4.Text Then
    ElseIf Text1.Text = Text5.Text Then
    Else
    List1.AddItem Text1
    List2.AddItem Text2
    List3.AddItem Text3
    List4.AddItem Text4
    List2.AddItem Text5
    Command3.Enabled = False
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    End If
End Sub

Private Sub Command4_Click()
Dim A As String

    A = RandomChar4
    B = RandomChar4
    C = RandomChar4
    D = RandomChar4
    E = RandomChar4
    G = RandomChar4

    Text1 = A
    Text2 = B
    Text3 = C
    Text4 = D
    Text5 = E
 
   
        If Text1.Text = Text2.Text Then
    ElseIf Text2.Text = Text3.Text Then
    ElseIf Text3.Text = Text4.Text Then
    ElseIf Text4.Text = Text5.Text Then
    ElseIf Text5.Text = Text2.Text Then
    ElseIf Text1.Text = Text3.Text Then
    ElseIf Text2.Text = Text4.Text Then
    ElseIf Text3.Text = Text5.Text Then
    ElseIf Text4.Text = Text2.Text Then
    ElseIf Text5.Text = Text3.Text Then
    ElseIf Text1.Text = Text4.Text Then
    ElseIf Text2.Text = Text5.Text Then
    ElseIf Text3.Text = Text2.Text Then
    ElseIf Text4.Text = Text3.Text Then
    ElseIf Text5.Text = Text4.Text Then
    ElseIf Text1.Text = Text5.Text Then
    Else
    List1.AddItem Text1
    List2.AddItem Text2
    List3.AddItem Text3
    List4.AddItem Text4
    List3.AddItem Text5

    Command4.Enabled = False
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    End If
End Sub

Private Sub Command5_Click()
If MsgBox("Anda yakin mau Keluar ?", vbQuestion + vbYesNo, simpan, simapn, simpan) = vbNo Then
        Cancel = 1
        Else
  End
End If
End Sub

Private Sub Command6_Click()

If MsgBox("Anda yakin mau disimpan ?", vbQuestion + vbYesNo, simpan, simapn, simpan) = vbNo Then
        Cancel = 1
        Else

xa = App.Path & "\Tim1.txt"
ya = App.Path & "\Tim2.txt"
xb = App.Path & "\tim3.txt"
yb = App.Path & "\tim4.txt"

Open xa For Output As #1
Open xb For Output As #2
Open ya For Output As #3
Open yb For Output As #4



For I = 0 To List1.ListCount - 1
Print #1, List1.List(I)
Print #2, List2.List(I)
Print #3, List3.List(I)
Print #4, List4.List(I)
Next



MsgBox "Penyimpanan Selesai", vbInformation, simpan, simpan, simpan

Close #1
Close #2
Close #3
Close #4

End If

End Sub
Private Sub Command7_Click()
Form3.Show
Form1.Visible = False
End Sub


mau tau lebih jelas kegunaanya silahkan DOWNLOAD
Back to top Go down
http://software-download1001.blogspot.com/
 

Aplikasi Random pemain futsal versi notebook (VISUAL BASIC)

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Forum Informatika ::  :: VB6-
Jump to:  

Free forum | © phpBB | Free forum support | Contact | Report an abuse | Free forum