home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 January (DVD)
/
VPR980100.ISO
/
OLS
/
WIN16
/
ESAVER04
/
ESAVER04.LZH
/
ESSRC04.LZH
/
ESMAIN.FRM
< prev
next >
Wrap
Text File
|
1995-06-03
|
3KB
|
106 lines
VERSION 2.00
Begin Form ESMain
BackColor = &H00000000&
BorderStyle = 0 'なし
ClipControls = 0 'False
ControlBox = 0 'False
Height = 1815
Icon = ESMAIN.FRX:0000
Left = 2445
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 540
ScaleWidth = 540
Top = 3540
Width = 3480
WindowState = 2 '最大表示
Begin Timer Timer1
Interval = 200
Left = 2280
Top = 360
End
End
Dim CurPos As POINTAPI
Dim Counter
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
'キーが押されたら終了
SaverEnd
End Sub
Sub Form_Load ()
Dim Rtn
Counter = 0
'マウスカーソルの非表示
Rtn = ShowCursor(False)
'セーバーのバックになる自分自身を最上位に押し上げて
Rtn = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
End Sub
Sub Form_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
'マウスボタンが押されたら、終了
SaverEnd
End Sub
Sub Timer1_Timer ()
Dim EXEPos As POINTAPI
Dim NewCurPos As POINTAPI
Dim RunhWnd(), i, j
If Counter = 0 Then
'起動時のカーソルの位置を保存
Call GetCursorPos(CurPos)
'ランダム移動しないものは、ここで最上位に押し上げておく
If MoveCheck = " " Then
'セーバーで起動したプログラムを最上位に押し出す
Rtn = GetRun_hWnd(RunhWnd(), i)
If Rtn = True Then
Rtn = SetWindowPos(RunhWnd(0), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
End If
For j = 1 To i
Rtn = SetWindowPos(RunhWnd(j), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
Next j
End If
End If
'マウスの現在の位置を取得
Call GetCursorPos(NewCurPos)
'もしマウスカーソルが動いていたら
If NewCurPos.x <> CurPos.x Or NewCurPos.y <> CurPos.y Then
'終了する
SaverEnd
End If
'もしランダム移動が指定されていたら
If MoveCheck = "×" Then
'Counterが規定数に達しているとき
If Counter Mod 25 = 0 Then
'Top.Leftを生成
EXEPos.x = Rnd * Screen.Width / Screen.TwipsPerPixelX * .8
EXEPos.y = Rnd * Screen.Height / Screen.TwipsPerPixelY * .8
'実行したプログラムの位置を変更
If ESErrBox.Visible = True Then
Rtn = SetWindowPos(ESErrBox.hWnd, HWND_TOPMOST, EXEPos.x, EXEPos.y, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE)
Else
Rtn = GetRun_hWnd(RunhWnd(), i)
If Rtn = True Then
Rtn = SetWindowPos(RunhWnd(0), HWND_TOPMOST, EXEPos.x, EXEPos.y, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE)
End If
For j = 1 To i
Rtn = SetWindowPos(RunhWnd(j), HWND_TOPMOST, EXEPos.x, EXEPos.y, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE)
Next j
End If
End If
End If
Counter = Counter + 1
End Sub