Drawing, Graphics, and Images VB6: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
* RoundRect 220,300,350,400 | * RoundRect 220,300,350,400 | ||
* Line 250,400,500,400 | * Line 250,400,500,400 | ||
| |||
== Animation and API Calls == | |||
=== BitBlt === | |||
Option Explicit | |||
Private 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 | |||
Private Sub cmdBitBlt_Click() | |||
Me.Cls | |||
BitBlt Me.hDC, 0, 0, picBitBlt.ScaleWidth, picBitBlt.ScaleHeight, picBitBlt.hDC, 0, 0, vbSrcCopy | |||
End Sub | |||
| |
Revision as of 23:18, 10 February 2008
Controls
PictureBox: Picture Box Control
pMainShip.Picture = LoadPicture(Trim(App.Path) & "\" & "sc001.bmp")
Draw
- Rectangle 100,100,200,200
- Ellipse 110,110,190,190
- RoundRect 220,300,350,400
- Line 250,400,500,400
Animation and API Calls
BitBlt
Option Explicit Private 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 Private Sub cmdBitBlt_Click() Me.Cls BitBlt Me.hDC, 0, 0, picBitBlt.ScaleWidth, picBitBlt.ScaleHeight, picBitBlt.hDC, 0, 0, vbSrcCopy End Sub