Sub Form_Activate ()
Dim CX, I, J, K, L, M, Msg, Offset' Declare variables. ' Cls' Clear form. ' Width = 7200 ' Set form width.' Height = 5000 ' Set form height. ' BackColor = QBColor(1)' Set background color. ' For I = 1 To 3 Select Case I Case 1' First time.' ForeColor = QBColor(9)' Set foreground color. ' K = 1: L = 9: M = 1 Msg = "By"' Set message.' CX = 0' Set position variable. ' Case 2' Second time.' K = 1: L = 9: M = 1 Msg = "ZoNe" CX = ScaleWidth Case 3' Third time. ' ForeColor = QBColor(15) K = 9: L = 1: M = -1 Msg = "EnIgMaTiC " CX = ScaleWidth / 2 End Select For J = K To L Step M Select Case J ' Change font size. ' Case 1: Fontsize = 8 Case 2: Fontsize = 10 Case 3: Fontsize = 12 Case 4: Fontsize = 14 Case 5: Fontsize = 18 Case 6: Fontsize = 20 Case 7: Fontsize = 24 Case 8: Fontsize = 36 Case 9: Fontsize = 48 Case 10: Fontsize = 60 Case 11: Fontsize = 72 Case 12: Fontsize = 90 Case 13: Fontsize = 100 Case 14: Fontsize = 150 End Select If I = 1 Then Offset = 0' Text On left. ' ElseIf I = 2 Then Offset = TextWidth(Msg)' Text On right. ' Else Offset = TextWidth(Msg) / 2' Text in center. ' End If CurrentX = CX - Offset Print Msg ' Print message. ' Next J CurrentY = 0 ' Reset to top of form. ' Next I End Sub |