VERSION 5.00 Begin VB.Form frmFlip Caption = " Flip" ClientHeight = 4560 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 4560 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdFlip Caption = " Flip" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2520 TabIndex = 0 Top = 3480 Width = 1215 End Begin VB.Label lblTailCaption Alignment = 1 'Right Justify Caption = "Tails" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 1080 TabIndex = 6 Top = 2520 Width = 1215 End Begin VB.Label lblTails Alignment = 1 'Right Justify BackColor = &H00FFFFFF& Caption = "0" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2640 TabIndex = 5 Top = 2520 Width = 1215 End Begin VB.Label lblHeadCaption Caption = "Heads" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 1080 TabIndex = 4 Top = 1440 Width = 1215 End Begin VB.Label lblHeads Alignment = 1 'Right Justify BackColor = &H00FFFFFF& Caption = "0" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2640 TabIndex = 3 Top = 1560 Width = 1215 End Begin VB.Label lblTotalCaption Alignment = 1 'Right Justify Caption = "Total" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 960 TabIndex = 2 Top = 600 Width = 1215 End Begin VB.Label lblTotal Alignment = 1 'Right Justify BackColor = &H00FFFFFF& Caption = " 0" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2640 TabIndex = 1 Top = 600 Width = 1215 End End Attribute VB_Name = "frmFlip" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' Flip - coin flip simulation ' ' 25-Apr-2000 J. Jacky Demo for CofC II Private Sub cmdFlip_Click() lblTotal.Caption = lblTotal.Caption + 1 ' ' Rnd returns a random number between 0.0 and 1.0 ' Int returns the integer portion of a number ' If Int(2 * Rnd()) Then lblHeads.Caption = lblHeads.Caption + 1 Else lblTails.Caption = lblTails.Caption + 1 End If End Sub