Results 1 to 6 of 6

Thread: How can i make a stand alone image without form for application?

  1. #1

    Thread Starter
    Lively Member Satangel's Avatar
    Join Date
    Aug 2000
    Location
    KL,Malaysia
    Posts
    85

    Question

    I am trying to do a screen mate with vb.
    and i just don't know how to do without a form and just
    the image object moving around in windows.

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    You need a form for this, but you can change the shape of the form to the shape of your screen mate.
    A good way to do this is to use vbAccelerator's Bitmap Region library. For more information, click here.

  3. #3
    Guest
    You could also make the form transparent.

    Code:
    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  
    
    
    Private Sub Form_Activate()
    SetWindowLong Me.hwnd, GWL_EXSTYLE, _
    WS_EX_TRANSPARENT
    SetWindowPos Me.hwnd, HWND_NOTOPMOST, _
    0&, 0&, 0&, 0&, SWP_SHOWME
    End Sub
    I hope you know, as in your other thread, you asked how to make a screen mate. A screen mate and a sprite are the same thing. So check out the link I gave you and download a few of the samples, you might learn something.

  4. #4

    Thread Starter
    Lively Member Satangel's Avatar
    Join Date
    Aug 2000
    Location
    KL,Malaysia
    Posts
    85

    Talking

    Matthew Gates

    i am a new user and a junior programmer.
    i mad about to make game in vb
    ,i have been doing a lot of research about vb game programming.
    I know you b4 you post to me for my answer in the
    busting forum about the "Wipe out the free sites banner",right?
    and the guy call gen X has a lot of idea about legacy.
    do you create a game b4 and are you a student in us now?
    i saw you everytime in vbsquare to help people thatn suffering from vb problem.that's why i think i can learn a lot from you.how long do you finised vb programming?


    it really didn't do a good job for the transparent form
    and i also cannot see my image object that inside the form.
    any other way to do with stand alone object without having a form for application?
    anyway, thanks for you information, i learned new things from you.

  5. #5

    Thread Starter
    Lively Member Satangel's Avatar
    Join Date
    Aug 2000
    Location
    KL,Malaysia
    Posts
    85

    Cool

    Thanks you yonatan for giving a helping hand.

  6. #6
    Guest
    Originally posted by Satangel
    Matthew Gates

    i am a new user and a junior programmer.
    i mad about to make game in vb
    ,i have been doing a lot of research about vb game programming.
    I know you b4 you post to me for my answer in the
    busting forum about the "Wipe out the free sites banner",right?
    and the guy call gen X has a lot of idea about legacy.
    do you create a game b4 and are you a student in us now?
    i saw you everytime in vbsquare to help people thatn suffering from vb problem.that's why i think i can learn a lot from you.how long do you finised vb programming?


    it really didn't do a good job for the transparent form
    and i also cannot see my image object that inside the form.
    any other way to do with stand alone object without having a form for application?
    anyway, thanks for you information, i learned new things from you.
    You referring to the thread that won't die?

    I have been programming since I was 12 (going to be 16 soon). I am self-taught. I haven't made a great game, as like something 3-D or DirectX. All I've made is a Ping Pong game and one of those games where your in a ship and you shoot the ships (or monstors) above and they shoot back and you can't get hit, and everytime you hit them, they disappear. (Unfortunately, like Windows does, it crashed and i lost it )

    If you would like to know vb programming, I suggest you stick to http://www.vb-world.net and it's forums (http://forums.vb-world.net). Or you could also ICQ me and I will help you.

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