home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
tool
/
various
/
noboot
/
nbsample.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
4KB
|
139 lines
VERSION 2.00
Begin Form NBSample
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "No Boot Sample"
ClientHeight = 2025
ClientLeft = 2280
ClientTop = 2625
ClientWidth = 6465
Height = 2550
Left = 2220
LinkTopic = "Form1"
ScaleHeight = 2025
ScaleWidth = 6465
Top = 2160
Width = 6585
Begin MabryNoBoot NoBoot1
Height = 420
Left = 600
Top = 1440
Width = 420
End
Begin Timer Timer1
Enabled = 0 'False
Interval = 1
Left = 120
Top = 1440
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "While this sample is running, try to use Ctrl-Alt-Del. You can exit this sample by pressing the Space bar."
ForeColor = &H00FFFFFF&
Height = 195
Left = 120
TabIndex = 1
Top = 120
Width = 8865
End
Begin Label Label1
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Mabry Software. Software nuts and bolts -- no screws."
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H0000C000&
Height = 360
Left = 240
TabIndex = 0
Top = 840
Width = 7575
End
End
Option Explicit
Declare Function ShowCursor Lib "User" (ByVal bShow As Integer) As Integer
Dim CursorCount As Integer
Dim QuitFlag As Integer
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
If KeyCode = Asc(" ") Then
QuitFlag = True
End If
End Sub
Sub Form_Load ()
NoBoot1 = False
Randomize
On Error Resume Next
If UCase(Command$) <> "/S" Or App.PrevInstance Then End
If UCase(Command$) = "/C" Then
MsgBox "This screen saver has no options.", 64, "NoBoot Sample Saver"
End
End If
QuitFlag% = False
CursorCount = ShowCursor(False) + 1
Do While ShowCursor(False) >= -1
Loop
Do While ShowCursor(True) < -1
Loop
NBSample.Move 0, 0, Screen.Width, Screen.Height
DoEvents
Me.Show
timer1.Enabled = True
End Sub
Sub Form_Unload (Cancel As Integer)
NoBoot1 = True
Unload NBSample
' reset cursor to its old state
Do While ShowCursor(False) >= CursorCount
Loop
Do While ShowCursor(True) < CursorCount
Loop
End
End Sub
Sub Timer1_Timer ()
Static xLast
If QuitFlag = True Then Unload NBSample
If xLast = 0 Then
xLast = NBSample.Width
Label1.Top = ((NBSample.Height - Label1.Height) * Rnd)
Else
xLast = xLast - NBSample.TextWidth(" ")
If xLast = 0 Then
xLast = -1
ElseIf xLast + Label1.Width < 0 Then
xLast = NBSample.Width
Label1.Top = ((NBSample.Height - Label1.Height) * Rnd)
End If
End If
Label1.Left = xLast
End Sub