Results 1 to 8 of 8

Thread: Displaying objects on the screen but not on a form???

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    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!

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Maybe look at the invisible or transparent properties of the form

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Take a look at This Tip


    Regards,

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

    Serge

    Software Developer
    [email protected]
    [email protected]



  4. #4
    New Member
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    8

    Link doesn't work

    Take a look at This Tip
    That link doesn't work anymore.... can you
    explaine me the method, plz?
    I'm Portuguese.Little country in the extreme ocident of the Europe. if you're Portuguese too, email-me to [email protected]

  5. #5
    Fanatic Member
    Join Date
    Dec 2002
    Location
    North Carolina
    Posts
    734
    Code:
    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: [email protected]
        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.

  6. #6
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473

    Re: Link doesn't work

    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/200202191...ips/tip76.html

  7. #7
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762
    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:
    Code:
    With Label1
        .Left = 0
    
        .Top = 0
        .Width = Me.Width
        .Height = Me.Height
    End With
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  8. #8
    New Member
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    8

    thanks

    thanks for the reply, guys
    I'm Portuguese.Little country in the extreme ocident of the Europe. if you're Portuguese too, email-me to [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width