PDA

Click to See Complete Forum and Search --> : Displaying objects on the screen but not on a form???


rino_2
Nov 2nd, 1999, 03:08 AM
Hi,

I have a label calles lblMessage and I would some how like to display it on the screen all by itself if you catch my meaning? I know this is possible because I have a program made in Visual Basic 4 that does just that, the problem is it has been compiled and I don't think there is a way I can open it up? If you have any ideas I will be happy to hear them.

Thank!

jritchie
Nov 2nd, 1999, 06:01 AM
Maybe look at the invisible or transparent properties of the form

Serge
Nov 2nd, 1999, 05:43 PM
Take a look at This Tip (http://www.vb-world.net/tips/tip76.html)


Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com

icebrain
Jun 30th, 2004, 09:54 AM
Take a look at This Tip

That link doesn't work anymore.... can you
explaine me the method, plz?

dsheller
Jun 30th, 2004, 10:09 AM
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim Ret As Long
'Set the window style to 'Layered'
Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
'Set the opacity of the layered window to 128
SetLayeredWindowAttributes Me.hWnd, 0, 128, LWA_ALPHA
End Sub


Try that.

mike2
Jun 30th, 2004, 10:19 AM
Originally posted by icebrain
That link doesn't work anymore.... can you
explaine me the method, plz?
Take a look at a backup of this link here: http://web.archive.org/web/20020219124308/http://vb-world.net/tips/tip76.html

kebo
Jun 30th, 2004, 10:25 AM
A quick and clean work around

create a form with a label on it and set the boardersytle = 0,none then set the label properties:With Label1
.Left = 0

.Top = 0
.Width = Me.Width
.Height = Me.Height
End With

kevin

icebrain
Jun 30th, 2004, 10:32 AM
thanks for the reply, guys