home *** CD-ROM | disk | FTP | other *** search
-
- 'CALLDLL5.BAS - make various API calls to play wave files, track
- 'the mouse position, and move a window around
-
- struct point, x as short, y as short
-
- open "kernel" for dll as #kernel
- open "user" for dll as #user
- open "mmsystem" for dll as #mmsystem
- open "Me" for window as #aWindow
-
- print str$(playMode)
-
- wavefile$ = "chimes.wav"
- playMode = 0
- calldll #mmsystem, "sndPlaySound", wavefile$ as ptr, playMode as ushort, result as boolean
-
- hndl = hwnd(#aWindow)
-
- for i = 1 to 150
-
- calldll #user, "GetCursorPos", _
- point as struct, _
- result as void
-
- x = point.x.struct
- y = point.y.struct
-
- calldll #user, "MoveWindow", _
- hndl as word, _
- x as short, _
- y as short, _
- 100 as short, _
- 100 as short, _
- 1 as word, _
- result as void
-
- next x
-
- input r$
-
- progname$ = "notepad.exe"
- code = _SW_SHOWNA
-
- notice str$(code)
-
- calldll #kernel, "WinExec", _
- progname$ as struct, _
- code as word, _
- result as word
-
- print result
-
- input r$
-
- close #kernel
-
- input r$
-
- 'WinConstants
-