Results 1 to 28 of 28

Thread: Transparent Form

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Transparent Form

    Howdy.

    Could anyone point me in the right direction for proper transparency for forms ?
    I want to have a small form sitting on top of another form in my game, but I want people to still be able to see whats going on underneath ; thus the reason for the transparency.

    thanks,
    jamie.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    You could cheat and blit the image from the form behind to the form infront. Same effect really.
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  3. #3

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Yeah thats what I was doing except the game screen updates too often, and blitting forms every update slows down the game.
    But if I had a transparent form there'd be less overhead.

    Its for in game options , communications etc.
    You should use it too, instead of that grey box in sentience.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    You'd only need to update the form if something changes behind it or if the form is moved (ie a mobile menu). If nothing changes, no update is reequired.

    I can't really see what you're doing so I can't provide a real example. Got anything for me to look at?

    PS - The menu's in Sentience are being improved, but I'm trying to add game functionality first and make it pretty later. They do look pretty dire are the moment don't they...
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  5. #5

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well the idea is that if someone right clicks on another ship or whatever in space, or on a space station, that a menu can appear to give them options.

    What I would ideally want is to just print text onto the screen, but I need a checkbox too ; and I dont want to do it manually.
    So the only other way would be to create a transparent form.

    I suppose its kind of like a heads-up-display (HUD) in a fighter plane. It supplies the pilot with information, but its see-through.

    Ya follow ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  6. #6
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    If we look at the problem laterally, let's try and remove the need for the checkbox. As a checkbox is a simple boolean option you don't really need them.

    The way I've done the toggle with the RMV slurp (stop/start) is they both use the same label, they merely change the label text. When you click on the label, the variable is updated and the label is refreshed. Using a label, you can set the background to transparent, removing the need for another form.

    This help?
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  7. #7

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    No not really
    The reason I want a tickbox is to have somewhere specific for the user to click if they want to choose that option.
    I dont want them to click on the whole text.

    I could code it easily if I was just using labels and what not.
    Ah **** it.

    Transparency is a headache anyway. Ill stick to the labels
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  8. #8
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    Well, having somewhere specific to click merely irritates me when the whole of the text would be just a useful and provides a greater area to click. In a realtime game, trying to click on tiny checkboxes annoys the hell out of me, especially if there's a lot happening at that given moment.

    Why is it that you don't want them to click on the whole text?

    I know you could code it easily with labels, you're just a genius really.

    PS - is this for Craft? Have you finally resurrected it?
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  9. #9

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Because I dont like clicking on text

    And yes it is for craft.
    Ive been working on it lately.
    Full map support, better offscreen DCs, some AI, lotsa ****

    Ill probably work on it a lot over the summer too.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  10. #10
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    Excellent.

    It was looking pretty funky when I donloaded it, but it's good to see you're doing some work on it. Keep us posted of new versions. Maybe you should start a thread similar to our Sentience thread? The feedback we've had (off people like yourself) has been invaluable.

    Oh and trust me. Go with click on text, the majority of the younger generations are more familiar with this than check boxes / radio buttons etc because they're exposed to the web more than anything else. There's only us old timers who still like check boxes.

    If you want Craft to appeal to anyone younger than yourself, labels are the way forward...
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  11. #11

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Thanks for the good will
    Craft isnt really all that a serious project of mine.
    More like a hobby ; or something to do when im supposed to be studying


    Its also good for refining skills.
    Sloppy code is ok when doing normal desktop apps, but you need clean good code when programming games.
    So its like a little training room for me.


    Anyway yeah ill keep yiz all informed with craft.
    I can post the newest ver if ya want ...
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  12. #12
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    I'll look forward to it.
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    to speed up alpha blending routines you could
    1. Write them youself in C++
    2. use backbuffers for both front and back components of the area, and updating only front and back when either are changed. Summing them would be a very fast task, comparatively.

    a tip: don't replenish your resources with tons of offscreen DC's. Use the same one for all bitmaps and selectobject to switch between them. Other than that, good luck
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You can always rely on kedaman to come along, bladder some incomprehebsible dribble, wish you luck, and wander off

    Oh yeah and ked, would that be a kwisatz hedarach kinda prophet
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  15. #15
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Wink incomprehebsible to simpleminded maybe?

    i'm more like a xcviclöum söflazrw prophet
    maybe you giving up on alphablending now`?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  16. #16

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    I gave up on alphablending about 30 picoseconds after I posted this thread
    Im using a few labels instead. They look all right actually.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  17. #17
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    labels sucks bigtime, í guess i'm out of here in an attosecond
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  18. #18

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well what was going to happen was that there would be labels on (for example) Form2. And while the player is playing on Form1, then Form2 would appear over a particular area.
    But so that the user can see whats going on Form2 should be transparent.

    Now I've just taken the Form2 part out of the picture
    Just imagine Form2 is infinitely transparent
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  19. #19
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    Ok Ked, if labels suck bigtime what would you use?
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  20. #20
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    labels of course.

    Btw, for what purpose?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  21. #21

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Ill upload to members.fortunecity.com/plenderj
    Its the latest craft. When you play, right click on a stationary craft and its the menu that appears.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  22. #22
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    right-click-menu-popup sucks in RTS games, isn't too good in TBS either
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  23. #23

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Download the game from http://members.fortunecity.com/plenderj
    Its the "Latest Version" of Craft.
    You'll see why I want to use it.

    They used something like that in Frontier Elite.
    And its not quite a popup. When they right click on something, a few labels appear on the right hand side of the screen with options.

    It looks quite good actually.
    Im starting to like craft
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  24. #24
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by plenderj
    Download the game from http://members.fortunecity.com/plenderj
    Its the "Latest Version" of Craft.
    You'll see why I want to use it.

    They used something like that in Frontier Elite.
    And its not quite a popup. When they right click on something, a few labels appear on the right hand side of the screen with options.

    It looks quite good actually.
    Im starting to like craft
    i still haven't dl that crappy game, i guess i have to if you keep yelling at me like that. Yeah side menus options are much better than popupmenus, they don't get in the way. But i never use them, but hot keys (they should be shown in the menus).
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  25. #25

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Yeah go on download it or I'll set the fedaykin after ya !
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  26. #26
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    hehe (and you call that a game?) i ran around for some time and then i found that other craft but i couldn't kill it. Only say "hello" to it.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  27. #27
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    Ked,

    You know, countless times you have impressed us with your intelligence and problem solving abilities. Many times, you've drifted into a thread, talked utter bollocks for a few minuts, solved the problem and then wandered out again, leaving us all dumbfound and not a little confused.

    But you know what....

    I don't think I've seen you actually create anything that does something. I mean, we've all got little projects and things, some of us even have big ones like Sentience or Craft. What have you ever made that people can associate with you?

    I'm beginning to think you can't.

    [conspiracy theory]

    I reckon Kedaman's merely a prototype of a super advanced government AI program. Fantastic at solving problems that confuse us mere mortals but lacking the required attributes to create anything.

    [/conspiracy theory]

    Prove it otherwise....
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  28. #28
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    what kind of thing are you looking for Arbiter? I gave you the most advanced set of type structured database system components, and you haven't even looked at them? Or maybe just said, "how does this thing work?" and then put it aside and continued on Sentience. Well it's my most recent project and the most advanced and wellstructured, took me 4 months, so i can't give you anything better.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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