Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Creating see-thru forms?
 

Creating see-thru forms?

Hye!
I want to create an application in which your form's opacity should be less, but the controls im using on the forms such as pictureBox and buttons should have opacity 100%. Like the new Picasa. Where the picture is not transparent but the background is. Although that transperancy created by Picasa is artificial i.e. the form is not really transparent. They capture the screen, decrease the opacity and set it as form's background image.
But i want it to be real. When i try to decrease opacity of my form it decreaes the opacity of all other controls aswell. Plz help!
Jehanzeb_Malik  Friday, July 31, 2009 10:36 AM
In Vista and later you can use Glass, but for previous OS's it is a lot more complicated.

Using Glass in Vista:
http://www.codeproject.com/KB/vista/VGGlassIntro.aspx


For other OS's you will need to either create 2 forms (one with transparency and one without) and synchronise the two so that the non transparent one (which contains the controls)floats over the transparent one, or you will have to use a Layered Window and manually paint each child as it needs painting.

It's not C++ but there's an example of the latteron my Form tips page (although in Framework 1.1 there is no DrawtoBitmap() so you'll have to use WM_PRINT instead or other methods for controls, such as RichTextBox, where WM_PRINT is not supported.):
http://dotnetrix.co.uk/form.htm
Mick Doherty
http://dotnetrix.co.uk
Mick Doherty  Saturday, August 01, 2009 9:17 AM
http://www.c-sharpcorner.com/UploadFile/scottlysle/XparentFormsCS10282007212944PM/XparentFormsCS.aspx

Check this link.
Please mark the post as answer if it is helpfull to you because it boosts the members to answer more and more.
_SuDhiR_  Friday, July 31, 2009 10:54 AM
Hi! Sudhir.
Thanks for the reply but the link you provided tells how to create transparent background for classier look. I've already done that and know how to do that. What im trying to do here is not create 100% transparent forms. I want something like glassy look Vista provides. That the form should be like only 20% transparent but the controls should not be transparent. I know it has something to do with "Opacity" property of forms. But if you decrease opacity of form it decreases the opacity of complete form (including controls).

And sorry for not mentioning before but im using
Language - Visual C++
Compiler - Visual Studio 2003
Framework - .Net Framework 1.1

It was what my instructor wanted. So i dont have any other choice.
Jehanzeb_Malik  Friday, July 31, 2009 12:11 PM
In Vista and later you can use Glass, but for previous OS's it is a lot more complicated.

Using Glass in Vista:
http://www.codeproject.com/KB/vista/VGGlassIntro.aspx


For other OS's you will need to either create 2 forms (one with transparency and one without) and synchronise the two so that the non transparent one (which contains the controls)floats over the transparent one, or you will have to use a Layered Window and manually paint each child as it needs painting.

It's not C++ but there's an example of the latteron my Form tips page (although in Framework 1.1 there is no DrawtoBitmap() so you'll have to use WM_PRINT instead or other methods for controls, such as RichTextBox, where WM_PRINT is not supported.):
http://dotnetrix.co.uk/form.htm
Mick Doherty
http://dotnetrix.co.uk
Mick Doherty  Saturday, August 01, 2009 9:17 AM
Thanks Mick! Im using Vista and the first link was really helpful. Thankx!
Jehanzeb_Malik  Saturday, August 01, 2009 9:50 AM

You can use google to search for other answers

Custom Search

More Threads

• panel layout
• Form Inheritance and the designer
• How To Article for ControlDesigner?
• how can we have Image and corresponding text in ListBox
• Create custom Controls for Win Forms book, sample, etc
• VS 2005 Bug - Split Container and Tab Control
• How to use Toolstrip control in C#.Net?
• My Question about toolbar in VS2005
• Windows Form Designer Fails to Load
• Changing focus after cancelling validation