![]() |
BLTing Onto Screen - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: BLTing Onto Screen (/showthread.php?tid=54) |
BLTing Onto Screen - Tutorial Bot - 01-06-2006 Author: William Difficulty: 3/5 To blt things onto the picScreen you can use: Code: Public 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 Code: BitBlt frmMirage.picScreen.hdc, picx, picy, 32, 32, frmMirage.PictureControl.hdc, tempx, tempy, vbSrcCopy You can also use: Code: Public Declare Function TransparentBlt Lib "msimg32.dll" (ByVal hdc 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 nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal crTransparent As Long) As Boolean Code: Call TransparentBlt(frmMirage.picScreen.hdc, picx, picy, 32, 32, frmMirage.PictureControl.hdc, tempx, tempy, 32, 32, RGB(0, 0, 0)) Another way is to use the image control, put it on the screen make it visible = false. Then on the top in the coding part add: Code: Dim NewElement As Integer Code: NewElement = 1 Code: Load Image1(NewElement) Code: Image1(NewElement).Top = Image1(NewElement).Top + 50 Code: Image1(NewElement).Left = Image1(NewElement).Left + 50 |