- Entrou
- Set 24, 2006
- Mensagens
- 981
- Gostos Recebidos
- 0
Boas,
venho aqui animar aqui a parte de programação com uma pequena brincadeira feita por mim.
O euromilhões em Visual Basic.
Fica aqui o código se tiverem dúvidas:
Cumprimentos,
VMX
venho aqui animar aqui a parte de programação com uma pequena brincadeira feita por mim.
O euromilhões em Visual Basic.
Fica aqui o código se tiverem dúvidas:
Código:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000009&
Caption = "Form1"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
BeginProperty Font
Name = "MS Sans Serif"
Size = 24
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 11070
ScaleWidth = 15240
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox Picture36
Height = 855
Left = 11160
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 44
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture35
Height = 855
Left = 9840
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 43
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture34
Height = 855
Left = 8520
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 42
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture33
Height = 855
Left = 7200
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 41
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture32
Height = 855
Left = 5880
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 40
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture31
Height = 855
Left = 4560
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 39
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture30
Height = 855
Left = 3240
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 38
Top = 6000
Width = 855
End
Begin VB.PictureBox Picture29
Height = 855
Left = 11160
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 37
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture28
Height = 855
Left = 9840
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 36
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture27
Height = 855
Left = 8520
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 35
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture26
Height = 855
Left = 7200
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 34
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture25
Height = 855
Left = 5880
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 33
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture24
Height = 855
Left = 4560
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 32
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture23
Height = 855
Left = 3240
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 31
Top = 5040
Width = 855
End
Begin VB.PictureBox Picture22
Height = 855
Left = 11160
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 30
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture21
Height = 855
Left = 9840
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 29
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture20
Height = 855
Left = 8520
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 28
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture19
Height = 855
Left = 7200
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 27
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture18
Height = 855
Left = 5880
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 26
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture17
Height = 855
Left = 4560
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 25
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture16
Height = 855
Left = 3240
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 24
Top = 4080
Width = 855
End
Begin VB.PictureBox Picture15
Height = 975
Left = 3840
ScaleHeight = 915
ScaleWidth = 2955
TabIndex = 20
Top = 7080
Width = 3015
End
Begin VB.Frame Frame1
Caption = "Apostas"
Height = 4695
Left = 240
TabIndex = 16
Top = 2160
Width = 2895
Begin VB.OptionButton Option5
Caption = "5 Apostas"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 23
Top = 3840
Width = 2655
End
Begin VB.OptionButton Option4
Caption = "4 Apostas"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 22
Top = 3000
Width = 2655
End
Begin VB.OptionButton Option3
Caption = "3 Apostas"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 21
Top = 2160
Width = 2655
End
Begin VB.OptionButton Option2
Caption = "2 Apostas"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 120
TabIndex = 18
Top = 1320
Width = 2655
End
Begin VB.OptionButton Option1
Caption = "1 Aposta"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 555
Left = 120
TabIndex = 17
Top = 600
Width = 2535
End
End
Begin VB.PictureBox Picture14
Height = 855
Left = 11160
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 15
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture13
Height = 855
Left = 9840
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 14
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture12
Height = 855
Left = 8520
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 13
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture11
Height = 855
Left = 7200
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 12
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture10
Height = 855
Left = 5880
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 11
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture9
Height = 855
Left = 4560
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 10
Top = 3120
Width = 855
End
Begin VB.PictureBox Picture8
Height = 855
Left = 3240
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 9
Top = 3120
Width = 855
End
Begin VB.CommandButton Command2
Caption = "Nova Rodagem"
Enabled = 0 'False
Height = 855
Left = 7320
TabIndex = 8
Top = 360
Width = 3495
End
Begin VB.PictureBox Picture7
Height = 855
Left = 11160
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 7
Top = 2160
Width = 855
End
Begin VB.PictureBox Picture6
Height = 855
Left = 9840
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 6
Top = 2160
Width = 855
End
Begin VB.PictureBox Picture5
Height = 855
Left = 8520
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 5
Top = 2160
Width = 855
End
Begin VB.PictureBox Picture4
Height = 855
Left = 7200
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 4
Top = 2160
Width = 855
End
Begin VB.PictureBox Picture3
Height = 855
Left = 5880
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 3
Top = 2160
Width = 855
End
Begin VB.PictureBox Picture2
Height = 855
Left = 4560
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 2
Top = 2160
Width = 855
End
Begin VB.CommandButton Command1
Caption = "Gerar Números"
Enabled = 0 'False
Height = 855
Left = 3120
TabIndex = 1
Top = 360
Width = 4095
End
Begin VB.PictureBox Picture1
Height = 855
Left = 3240
ScaleHeight = 795
ScaleWidth = 795
TabIndex = 0
Top = 2160
Width = 855
End
Begin VB.Label Label3
BackColor = &H8000000E&
Caption = "Marco Matos"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 9360
TabIndex = 46
Top = 8520
Width = 2655
End
Begin VB.Label Label2
BackColor = &H8000000E&
Caption = "Um programa desenvolvido por: "
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 9360
TabIndex = 45
Top = 7920
Width = 2655
End
Begin VB.Label Label1
Caption = "Preço a Pagar"
Height = 975
Left = 240
TabIndex = 19
Top = 7080
Width = 3255
End
Begin VB.Image Image3
Height = 1770
Left = 360
Picture = "Formulario.frx":0000
Top = 240
Width = 2520
End
Begin VB.Image Image2
Height = 765
Left = 11160
Picture = "Formulario.frx":14AD
Top = 1320
Width = 855
End
Begin VB.Image Image1
Height = 765
Left = 9840
Picture = "Formulario.frx":19F8
Top = 1320
Width = 855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim V1, V2, V3, V4, V5, E1, E2 As Integer
If Option1.Value = True Then
Option2.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
Option5.Enabled = False
Randomize
V1 = Int(Rnd() * 49) + 1
Picture1.Print V1
V2 = Int(Rnd() * 49) + 1
Picture2.Print V2
V3 = Int(Rnd() * 49) + 1
Picture3.Print V3
V4 = Int(Rnd() * 49) + 1
Picture4.Print V4
V5 = Int(Rnd() * 49) + 1
Picture5.Print V5
E1 = Int(Rnd() * 9) + 1
Picture6.Print E1
E2 = Int(Rnd() * 9) + 1
Picture7.Print E2
Picture15.Print "2,00 €"
ElseIf Option2.Value = True Then
Option1.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
Option5.Enabled = False
Randomize
V1 = Int(Rnd() * 49) + 1
Picture8.Print V1
V2 = Int(Rnd() * 49) + 1
Picture9.Print V2
V3 = Int(Rnd() * 49) + 1
Picture10.Print V3
V4 = Int(Rnd() * 49) + 1
Picture11.Print V4
V5 = Int(Rnd() * 49) + 1
Picture12.Print V5
E1 = Int(Rnd() * 9) + 1
Picture13.Print E1
E2 = Int(Rnd() * 9) + 1
Picture14.Print E2
V1 = Int(Rnd() * 49) + 1
Picture1.Print V1
V2 = Int(Rnd() * 49) + 1
Picture2.Print V2
V3 = Int(Rnd() * 49) + 1
Picture3.Print V3
V4 = Int(Rnd() * 49) + 1
Picture4.Print V4
V5 = Int(Rnd() * 49) + 1
Picture5.Print V5
E1 = Int(Rnd() * 9) + 1
Picture6.Print E1
E2 = Int(Rnd() * 9) + 1
Picture7.Print E2
Picture15.Print "4,00 €"
ElseIf Option3.Value = True Then
Option1.Enabled = False
Option2.Enabled = False
Option4.Enabled = False
Option5.Enabled = False
Randomize
V1 = Int(Rnd() * 49) + 1
Picture8.Print V1
V2 = Int(Rnd() * 49) + 1
Picture9.Print V2
V3 = Int(Rnd() * 49) + 1
Picture10.Print V3
V4 = Int(Rnd() * 49) + 1
Picture11.Print V4
V5 = Int(Rnd() * 49) + 1
Picture12.Print V5
E1 = Int(Rnd() * 9) + 1
Picture13.Print E1
E2 = Int(Rnd() * 9) + 1
Picture14.Print E2
V1 = Int(Rnd() * 49) + 1
Picture1.Print V1
V2 = Int(Rnd() * 49) + 1
Picture2.Print V2
V3 = Int(Rnd() * 49) + 1
Picture3.Print V3
V4 = Int(Rnd() * 49) + 1
Picture4.Print V4
V5 = Int(Rnd() * 49) + 1
Picture5.Print V5
E1 = Int(Rnd() * 9) + 1
Picture6.Print E1
E2 = Int(Rnd() * 9) + 1
Picture7.Print E2
V1 = Int(Rnd() * 49) + 1
Picture16.Print V1
V2 = Int(Rnd() * 49) + 1
Picture17.Print V2
V3 = Int(Rnd() * 49) + 1
Picture18.Print V3
V4 = Int(Rnd() * 49) + 1
Picture19.Print V4
V5 = Int(Rnd() * 49) + 1
Picture20.Print V5
E1 = Int(Rnd() * 9) + 1
Picture21.Print E1
E2 = Int(Rnd() * 9) + 1
Picture22.Print E2
Picture15.Print "6,00 €"
ElseIf Option4.Value = True Then
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
Option5.Enabled = False
Randomize
V1 = Int(Rnd() * 49) + 1
Picture8.Print V1
V2 = Int(Rnd() * 49) + 1
Picture9.Print V2
V3 = Int(Rnd() * 49) + 1
Picture10.Print V3
V4 = Int(Rnd() * 49) + 1
Picture11.Print V4
V5 = Int(Rnd() * 49) + 1
Picture12.Print V5
E1 = Int(Rnd() * 9) + 1
Picture13.Print E1
E2 = Int(Rnd() * 9) + 1
Picture14.Print E2
V1 = Int(Rnd() * 49) + 1
Picture1.Print V1
V2 = Int(Rnd() * 49) + 1
Picture2.Print V2
V3 = Int(Rnd() * 49) + 1
Picture3.Print V3
V4 = Int(Rnd() * 49) + 1
Picture4.Print V4
V5 = Int(Rnd() * 49) + 1
Picture5.Print V5
E1 = Int(Rnd() * 9) + 1
Picture6.Print E1
E2 = Int(Rnd() * 9) + 1
Picture7.Print E2
V1 = Int(Rnd() * 49) + 1
Picture16.Print V1
V2 = Int(Rnd() * 49) + 1
Picture17.Print V2
V3 = Int(Rnd() * 49) + 1
Picture18.Print V3
V4 = Int(Rnd() * 49) + 1
Picture19.Print V4
V5 = Int(Rnd() * 49) + 1
Picture20.Print V5
E1 = Int(Rnd() * 9) + 1
Picture21.Print E1
E2 = Int(Rnd() * 9) + 1
Picture22.Print E2
V1 = Int(Rnd() * 49) + 1
Picture23.Print V1
V2 = Int(Rnd() * 49) + 1
Picture24.Print V2
V3 = Int(Rnd() * 49) + 1
Picture25.Print V3
V4 = Int(Rnd() * 49) + 1
Picture26.Print V4
V5 = Int(Rnd() * 49) + 1
Picture27.Print V5
E1 = Int(Rnd() * 9) + 1
Picture28.Print E1
E2 = Int(Rnd() * 9) + 1
Picture29.Print E2
Picture15.Print "8,00 €"
ElseIf Option5.Value = True Then
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
Randomize
V1 = Int(Rnd() * 49) + 1
Picture8.Print V1
V2 = Int(Rnd() * 49) + 1
Picture9.Print V2
V3 = Int(Rnd() * 49) + 1
Picture10.Print V3
V4 = Int(Rnd() * 49) + 1
Picture11.Print V4
V5 = Int(Rnd() * 49) + 1
Picture12.Print V5
E1 = Int(Rnd() * 9) + 1
Picture13.Print E1
E2 = Int(Rnd() * 9) + 1
Picture14.Print E2
V1 = Int(Rnd() * 49) + 1
Picture1.Print V1
V2 = Int(Rnd() * 49) + 1
Picture2.Print V2
V3 = Int(Rnd() * 49) + 1
Picture3.Print V3
V4 = Int(Rnd() * 49) + 1
Picture4.Print V4
V5 = Int(Rnd() * 49) + 1
Picture5.Print V5
E1 = Int(Rnd() * 9) + 1
Picture6.Print E1
E2 = Int(Rnd() * 9) + 1
Picture7.Print E2
V1 = Int(Rnd() * 49) + 1
Picture16.Print V1
V2 = Int(Rnd() * 49) + 1
Picture17.Print V2
V3 = Int(Rnd() * 49) + 1
Picture18.Print V3
V4 = Int(Rnd() * 49) + 1
Picture19.Print V4
V5 = Int(Rnd() * 49) + 1
Picture20.Print V5
E1 = Int(Rnd() * 9) + 1
Picture21.Print E1
E2 = Int(Rnd() * 9) + 1
Picture22.Print E2
V1 = Int(Rnd() * 49) + 1
Picture23.Print V1
V2 = Int(Rnd() * 49) + 1
Picture24.Print V2
V3 = Int(Rnd() * 49) + 1
Picture25.Print V3
V4 = Int(Rnd() * 49) + 1
Picture26.Print V4
V5 = Int(Rnd() * 49) + 1
Picture27.Print V5
E1 = Int(Rnd() * 9) + 1
Picture28.Print E1
E2 = Int(Rnd() * 9) + 1
Picture29.Print E2
V1 = Int(Rnd() * 49) + 1
Picture30.Print V1
V2 = Int(Rnd() * 49) + 1
Picture31.Print V2
V3 = Int(Rnd() * 49) + 1
Picture32.Print V3
V4 = Int(Rnd() * 49) + 1
Picture33.Print V4
V5 = Int(Rnd() * 49) + 1
Picture34.Print V5
E1 = Int(Rnd() * 9) + 1
Picture35.Print E1
E2 = Int(Rnd() * 9) + 1
Picture36.Print E2
Picture15.Print "10,00 €"
Else
MsgBox "Deve seleccionar uma das opções"
End If
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
Picture1.Cls
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
Picture8.Cls
Picture9.Cls
Picture10.Cls
Picture11.Cls
Picture12.Cls
Picture13.Cls
Picture14.Cls
Picture15.Cls
Picture16.Cls
Picture17.Cls
Picture18.Cls
Picture19.Cls
Picture20.Cls
Picture21.Cls
Picture22.Cls
Picture23.Cls
Picture24.Cls
Picture25.Cls
Picture26.Cls
Picture27.Cls
Picture28.Cls
Picture29.Cls
Picture30.Cls
Picture31.Cls
Picture32.Cls
Picture33.Cls
Picture34.Cls
Picture35.Cls
Picture36.Cls
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
Option4.Enabled = True
Option5.Enabled = True
Command1.Enabled = False
End Sub
Private Sub Option1_Click()
Command1.Enabled = True
End Sub
Private Sub Option2_Click()
Command1.Enabled = True
End Sub
Private Sub Option3_Click()
Command1.Enabled = True
End Sub
Private Sub Option4_Click()
Command1.Enabled = True
End Sub
Private Sub Option5_Click()
Command1.Enabled = True
End Sub
Cumprimentos,
VMX