using vb6
i can make the form transparent and
controls visible at runtime, but im not using controls
on this form.
im adding only a picture(bmp) to it.
is there a way to make the picture (bmp) visible?
Printable View
using vb6
i can make the form transparent and
controls visible at runtime, but im not using controls
on this form.
im adding only a picture(bmp) to it.
is there a way to make the picture (bmp) visible?
Just create a rectrgn with the pictures coordinates and combine it to the form rgn
I'm not sure if you need this or not, but here is how to make the Form Transparent.
Code for a module
Add a commandbutton with following code to Form1Code:Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_TRANSPARENT = &H20&
Public Const SWP_FRAMECHANGED = &H20
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_SHOWME = SWP_FRAMECHANGED Or _
SWP_NOMOVE Or SWP_NOSIZE
Public Const HWND_NOTOPMOST = -2
Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
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
The ShowInTaskbar property should be set to False and the BorderStyle to 0-None.Code:Private Sub Command1_Click()
SetWindowLong Me.hwnd, GWL_EXSTYLE, _
WS_EX_TRANSPARENT
SetWindowPos Me.hwnd, HWND_NOTOPMOST, _
0&, 0&, 0&, 0&, SWP_SHOWME
End Sub