Thursday, 13 March 2008
Lotto Fun
Private Sub cmdOk_Click()
Dim i As Integer
Dim R As Integer, L As Integer, Num As Integer
Dim TMP As String, TMPcmp As String, TMPstr As String, Lot As String
Dim Con As Integer
Dim t As New ShapeRange
Dim PX As Double, PY As Double
ActiveDocument.Unit = cdrMillimeter
ActivePage.GetSize PX, PY
Num = txtNum.Value
If Num > 50 Then
Label2.Caption = "to 50 ..."
txtNum.Text = 50
Exit Sub
End If
For tic = 1 To Num
TMPstr = ""
Con = 0
Do Until Con = 6
Randomize
TMP = Int((49) * Rnd + 1)
If TMP < 10 Then
MPcmp = Space(1) & CStr(TMP)
Else
TMPcmp = CStr(TMP)
End If
If InStr(1, TMPstr, TMPcmp) = 0 Then
TMPstr = TMPstr & " " & TMPcmp
Con = Con + 1
End If
Loop
Lot = TMPstr & vbCrLf & Lot
Next tic
'20 + (tic * 4)
t.Add ActiveLayer.CreateArtisticText(PX / 2, PY - 20, Lot, _
, cdrCharSetGreek, "Arial", 12, cdrTrue, cdrFalse, , cdrCenterAlignment)
t.Add ActiveLayer.CreateArtisticText(PX / 2, PY - 10, "from Erato", _
, cdrCharSetGreek, "Arial", 12, cdrTrue, cdrFalse, , cdrCenterAlignment)
t.ApplyUniformFill CreateRGBColor(255, 0, 0)
End Sub
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment