Transparency in splash screen - windows

I saw the splash screen of the Corel-Draw 12 application and lost my mind!
What technique do they use?
On application start-up they load a transparent image, use windows api or what?
How do they achieve this transparency?

Here is a demo project for both VB.NET & C#.

If you are using winforms with vb.net you can modify the opacity of any form by setting the Form.Opacity property. I am not familiar with the splash screen you are speaking about but it shouldn't be too difficult to achieve a similar effect.

If you're using WPF, set the AllowsTransparancy, WindowStyle and Background attributes on the Window object:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
AllowsTransparency="True"
WindowStyle="None"
Background="Transparent">
<!-- more -->
</Window>

I am also unfamiliar with this flash screen... but if it slowly fades or something, then I would go with Quintin's answer here. Opacity at a certain percentage will show another form through yours.
If the splash screen is just an image and some of it is see-through and some of it isn't, then you can set the transparency key on your form to a certain color, then set the form's background color equal to that, and then whatever image you wish to display should be loaded into a picture box. Make sure you use a .GIF image though! or some other format that supports deleting out the background. JPG's and BMP's are worthless here since their "empty" color becomes white instead of transparent.

Related

Transparent image background on WP7 HubTile

I have a collection of HubTiles with user-selected images. If an image with transparency is selected, the HubTile's background color (PhoneAccentBrush) shows through. Is there a way to style just the photo background to Transparent without altering the animation backgrounds? (Although if the Title is displayed on a transparent background, that's acceptable, but I'd still like the flipside to use the accent color.)
I've done some searching on styling the HubTile, but haven't been successful.
Apparently the fastest way to find an answer on the interwebs is to post your question to SO. I found this not two minutes after posting.
Konstantinos Kyriakopoulos has a blog post with the template styling I was looking for. I couldn't set the image background to Transparent, but I was able to set it to PhoneBackgroundBrush, which works just as well.
Specifically, I set the Background of the Border in the TitlePanel Grid.

How shadow TextBlock in Wp7 Mango

In windows phone mango, how can i set a shadow on a TextBlock?
There's no a DropShadowEffect I'm afraid.
You could try out something like this though:
With the image you can just simply create a drop shadow in Photoshop/Gimp etc (works well for me) and save it as .png.
With TextBlock it is a bit harder. For instance, create a half-transparent image with the shadow and place both TextBlock and the Image inside the Canvas. Change the Canvas.ZIndex="integer" attached property to place them in a specific order - image has to be underneath. Also shadow should be blurred.
The drawbacks are:
Shadow is static.
Doesn't really suit metro UX.

Transparent rounded window but with opaque controls

I am trying to make a HUD with a transparent rounded window with opaque controls as is commonly seen in apps such as Xcode popups, the native volume control, etc.
I'm using the technique detailed here: How to implement HUD-style window like Address Book's "Show in Large Type"
but this renders controls in the view transparent. I've tried setAlphaValue:1.0 on the controls but that has no effect. Searches for other solutions point to Matt Gemmell's RoundedFloatingPanel component. I can't open the project in Xcode 4, but looking at the code as far as I can tell the only difference seems to be in Matt's code he sets the alpha of the window to 1.0 and uses a transparent fill for the NSRect in the view. I tried this but still end up with transparent controls.
So unsurprisingly, Matt Gemmell's code works just fine and I had made a mistake. I forgot that I was also messing with the alpha of the window elsewhere in my code in order to make it fade out on close.
To to sum it up for others running into this issue, if you set the alpha on the NSWindow the controls in that window will also be transparent. Instead set the alpha on the NSBezierPath fill color in the NSView. Just like Matt Gemmell's code does. :)

QT QPushButton with an icon and overlaid centered text

I recently took to Qt Programming and want to port my app to Qt.
I'm fiddling with QPushButtons and I've managed to display an image into the button and to set some text to the button but, whatever I do, with or without the designer,
I have the same problem, the text is aligned right to the icon instead of being overlaid over the icon.
addButton = new QPushButton();
addButton->setIcon(QIcon(":/AddButton.png"));
addButton->setText(tr("+"));
addButton->setFlat(true);
addButton->setIconSize(QSize(100,90));
What am I missing ?
I know there is the toolButton but it doesn't seem to have the "flat" property.
Any idea please ?
Thanks a lot,
Mike
If you are trying to use your image as a background image, you can use a style sheet:
addButton->setStyleSheet("background-image: url(:/AddButton.png);"
"background-repeat: no-repeat;"
"background-position: center center");
You'll just have to make sure the size of your button is at least as big as the image.

How to make an image as transparent in BlackBerry?

I am new to BlackBerry Java application development. My scenario is: In my application a gallery list of images will be displayed in a small icons. If I click on any image it will display in a large mode. Here I need to provide controls like front and back buttons. On clicking on those buttons the background image should change. In addition to that those buttons should be highlighted and the back ground large image should be transparent. How to do this?
Please guide me.
You can use Graphics.setGlobalAlpha() on paint() or to modify bitmap before preview.
Don't forget to set back normal global alpha value after bitmap drawing.

Resources