Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Dim oP As POINTAPI
Dim fP As POINTAPI
Dim nP As POINTAPI
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
Private Const HWND_TOPMOST = -1
Private Sub Form_Load()
If App.PrevInstance Then Unload Me
If UCase(Command$()) <> "/S" Then End
GetCursorPos oP
SetCursorPos Screen.Width, Screen.Height
GetCursorPos fP
w.Navigate2 "http://www.lares.dti.ne.jp/%7Eyugo/storage/monocrafts_ver3/03/index.html"
End Sub
Private Sub Form_Resize()
Me.Move 0, 0, Screen.Width, Screen.Height
w.Move 0, 0, ScaleWidth, ScaleHeight
OnTop
End Sub
Private Sub Form_Unload(Cancel As Integer)
SetCursorPos oP.X, oP.Y
End Sub
Private Sub Timer1_Timer()
GetCursorPos nP
If nP.X <> fP.X Or nP.Y <> fP.Y Then Unload Me
fP = nP
End Sub
Public Sub OnTop()
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE Or SWP_SHOWWINDOW
End Sub