
| Play Wav-files | Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA"
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long)
As Long
This is the what the declaration look like and the parameters are:
Example: PlaySound App.Path & "\Bigclap1.wav", 0, SND_SYNC |
| Hide/Show Cursor | Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Parameters:
Example: Retcode = ShowCursor(False) |
| Elliptic objects | Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn"
(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
As Long
and Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long Notes: These functions is measured in pixels. Everything in your elliptic object will work as usually. You have to use both of these functions to make it work. Parameters for the first function:
Parameters for the second function:
Example:
|
| Change Wallpaper |
Declare Function SystemParametersInfo Lib "user32" Alias
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Notes:This function can perform many different things. It is worth testing a bit more but here will it only be used as a wallpaper changer. Some of the parameters is not used when changing wallpaper. You can only use bitmaps (*.bmp). Returns 0 if an error is found else will returns a value.
Parameters:
Example:
|
| Set Pixel / Get Pixel | Private Declare Function SetPixel Lib "gdi32"
(ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long)
As Long
and Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Notes: This funktion is used to manipulate pictures. It is very important
when you create mask when animating. You don't have to use both functons at the
same time.
Parameters in SetPixel:
Parameters in GetPixel:
Example:
|
| Move Form without CaptionBar | Declare Function ReleaseCapture Lib "user32" () As Long
and Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Notes: These functions are not created only for the purpose of moving forms so the parameters can be a bit odd. You have to use both functions. Put the function calls under Form_MouseDown. Parameters for the second function:
Example:
|
| Animating | Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long,
ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long,
ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long,
ByVal dwRop As Long) As Long
Notes: This is a long one. It is used for many different parts in Animating. See the Game Development section for further information. The part that is going to be explained here is how you copy a part of a bitmap into a Picturebox. If you do this rapidly it will appear as if it moved on its own. These parameters are hard to explain so try to figure it out by yourself, of course with these guidelines. Parameters:
Example:
|