Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Has anyone seen the adobe splash screens?

 

 

 

has anyone got any idea how they manage this?

 

http://www.ch010a0005.pwp.blueyonder.co.uk/extreme/adobe.jpg

 

chris

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

It�s always funny until someone gets hurt� Then it become hilarious!

Posted

yeah but you can not make a form transparent, as far as I am aware... I have been trying to make a form transparent, but it errors on everything i do.

 

c

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

It�s always funny until someone gets hurt� Then it become hilarious!

Posted

I started with the basic click on the background properties of the form and selected web transparent... It then stated Invalid property statement.

 

I then added to Load form

       Dim s As New Splashscreen
       s.BackColor = Color.FromArgb(0, 0, 0, 0)

 

I then get....

 

Additional information: This control does not support transparent background colors.

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

It�s always funny until someone gets hurt� Then it become hilarious!

  • 1 month later...
Posted

Setting the Transparent pixel is nice and all but it's not exactly what Adobe did. If you look closely at the splash screen you will knotice Alpha Blending being used.

 

Does anyone know how to DrawImage with alpha blending for a splash screen?

 

 

It could be quite cool to create a splash screen with some faded out areas.

Posted

Ok, I got the answer we've all been waiting desperately for. :D

 

It's all in the Icons... Yes, that's it Icons render correctly using the Alpha Channel. So, now you want to know how to make a large enough icon right?

 

Goto this web site and download this program. It supports super large icons.

 

http://www.gamani.com/

 

Render the Icon with alpha and create whatever cool effects you want.

 

See ya....

  • 2 weeks later...
Posted

General Instructions on *.ico (Icon) files...

 

 

Icons... Like *.ico files... It's a type of image file.

 

Go to this web site...

 

http://www.gamani.com/

 

Use this program to make an Icon image file. Set the Alpha in the image so some areas are transparent and some areas are partially transparent. Then use Visual Studio.Net, load the Icon image.

 

Override the OnPaint & OnPaintBackground events in the splash screen forms you want to use.

 

EXAMPLE:

 

Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)

 

' Don't do anything here.

 

End Sub

 

 

Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)

 

Dim gfx As dra.Graphics = pevent.Graphics

 

gfx.DrawIcon(IMA.icoSplashScreen, 0, 0)

 

End Sub

 

 

 

That's it... Now you too have an Adobe Cool Effect Splash Screen. If you can draw that is, I surly can't but I've got friends that can. :P

Posted (edited)

Ok ok ok ok ok ok ok okkkkk

 

Per request here is an example written using Visual Basic.net 2003

 

It's the one I'm currently using for the company I work for.

:p

 

:-\

 

:cool:

 

 

 

Ack, busted for using *.exe..... Ok then here is a non-exe version...

 

Phew...

Icon.zip

Edited by DameonBlack
Posted
Considering the only image format that supports alpha blending is PNG, Adobe somehow (I'm assuming) is using a PNG as their splash loadup, and not an .ICO trick, like everybody else here is suggesting.
Experience is something you don't get until just after the moment you needed it
Posted

What did you use to create the .ICO file. The .ICO Photoshop plugin I have follows the spec which limits .ICO to a width of 255 pixels or less so I cannot create a suitable sized ICO file to use your code.

 

Otherwise the example works fine.

Experience is something you don't get until just after the moment you needed it
Posted

Umm OK

 

Hi, I posted an address to an Icon creator program that you could use to make larger icon files. Use the program I suggested... Also, Icon files DO use alpha blending... Check it out in my example. If it dosen't work then check your hardware.

 

:D

 

 

 

Use the program here to make the icon file or download a good icon creator that will make larger icon files:

 

http://www.gamani.com/

  • *Gurus*
Posted

Using 32bit icons is not a good way of achieving this effect.

 

I have written and posted an example of how to create splash screens like the ones in Adobe products using layered windows and alpha blending. The sample is downloadable from the Code Library.

 

http://www.xtremedotnettalk.com/showthread.php?t=83910

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • *Gurus*
Posted (edited)

Ok.

 

1) 32bit icons are supported only in Windows XP. No previous version of Windows will identify or cope with an alpha channel in an icon.

2) Large icon sizes are also only supported in Windows XP. 128x128 is the highest supported size, although as you have shown it can work with larger.

3) My method *does* work in previous versions of Windows, and you cannot tell the difference visually. The only restriction is that the window will not all be repainted if another window is moved across it.

 

I didn't realise backwards compatibility was an issue to you, but since it is I feel I need to remind you that your code will crash on any version of windows prior to XP, and mine will work with no visual difference whatsoever. I'm attaching a couple of screenshots comparing the output on Windows 98.

 

I did not mean to put your code down, but I also don't want people shipping applications using it and not realising that they will crash on pre xp systems :)

Edited by divil

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

Good Answer....

 

Ahh, good point about 32 bit Icons...

 

(I could have sworn I was using it on older OS's)

 

Oh well...

 

 

 

Of course Icons are still an easy method of doing this effect as long as it's XP & W2k + OS's ...

 

 

I of course will be looking into your method first thing Monday.. At work... Why in the world am I doing this at home in my free time?

 

 

 

 

 

Check ya later...

Posted (edited)

This is it! Seriously this time!!!

 

:eek: Did anyone knotice that PNG files render correctly?

 

I just spent 5 hours working on the layered windows only to find out that *.png files render correctly.

 

Attached you will find a full example using Visual Basic.net 2003.

 

I'm using embeded resources for the image...

 

 

This has not been tested on older opperating systems. However, since layered windows are using *.png files also this should work just fine.

 

P.S. This is a VERY easy way to accomplish this. Without using API calls and such messy stuff like that.

 

:-\

 

:eek:

 

:rolleyes:

Png.zip

Edited by DameonBlack
  • *Gurus*
Posted

Nice try, but the window will not repaint correctly when someone drags a window over it (see attached screenshot). You have addressed this by making the splash screen window topmost = true, and there are few things more annoying than splash screens that display over whatever you're trying to do.

 

One of the core things you need to make sure you do (as a windows programmer) is paint the whole of your window when asked to. The method you're using is not painting all of it, resulting in the background being left showing. This is fine until windows asks for a repaint or someone drags something over the form.

 

The layered approach draws the entire background - taking pixels from behind the window if necessary. Thus repainting is handled like it should be. Remember my example wasn't supposed to be easy, it was supposed to be the best way of doing it.

 

If you don't mind your splash screens being topmost and not necessarily repainting correctly, use Dameon's approach :)

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

Yep... :P

 

Yes, yes... You'll also knotice that my code removed the window when it gets deactivated. Therefor it dosen't matter if it is topmost. Also, it should be topmost when loading your application so the main window does not jump on top when it's loaded. (you should have mentioned that)

 

You'll knotice that Adobe dosen't exactly use the "correct?" method either.

 

 

 

So, if you want a sweet splash screen that's easy to create, looks good, dosen't use messy API calls (hell for future cross platforms)... Takes 5 minutes instead of hours to setup... Use my method. :D

  • *Gurus*
Posted

I disagree with your statement about splash screens having to be topmost. I haven't known an application do this for a few years, I assumed nobody did it anymore because it became widely accepted to be too annoying.

 

Splash screens should not be topmost. They should not even steal focus in the first place, let alone disappear when they lose it. Presumably if this is being used correctly the application will be loading its resources while the screen is displayed.

 

You think API calls are "messy"? Maybe someone needs an introduction to windows programming :)

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

hehe

 

:p

 

 

Hmm, windows API's huh... Yeah, I know them well. Well enough to say that they should be used as little as possible. We "should be" trying to stick to a cross platform environment. I imagine Microsoft would have made it easier to add API's if they wanted you to use them. (Like the API viewer in Visual Basic)...

 

When the application starts up the splash screen should come up first, then the application window should be loaded and displayed "Under" the splash screen. Then the splash screen is unloaded. ??? Makes sence to me how bout you?

 

I find it to be a nice interface to remove the splash screen when it gets deactivated. It's just my opinion.

 

If you want make it not topmost and whatever, not my concern. Keep in mind though that Adobe is doing it with the same so called "problems" that my way has. I'd say that the ease of use for my method far outweighs the ability to drag windows over the splash screen. If I wanted to make something as complex as your method I'd have considered DirectX and made some real splash screen effects.

 

But hey, what do I know? :-\

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...