ukjock Posted January 9, 2004 Posted January 9, 2004 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 Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
Administrators PlausiblyDamp Posted January 9, 2004 Administrators Posted January 9, 2004 I would imagine it is just a bitmap the size of the entire splash screen but with parts of it transparent. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ukjock Posted January 9, 2004 Author Posted January 9, 2004 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 Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
ukjock Posted January 9, 2004 Author Posted January 9, 2004 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. Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
Administrators PlausiblyDamp Posted January 9, 2004 Administrators Posted January 9, 2004 What have you done? What errors do you get? Find attached a really rushed and shoddy sample - probably better of replacing the included bitmap with another one.transparentform.zip Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ukjock Posted January 9, 2004 Author Posted January 9, 2004 hat off to you m8. Your an absolute genius. Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
FartNocker Posted January 10, 2004 Posted January 10, 2004 (edited) Take a look at his transparent form now (attached). All I did was added a list box with 10 lines of black text. After looking at it read my part of this post here: http://www.xtremedotnettalk.com/showthread.php?s=&threadid=80682 Transparent forms with this version (2003) of .NET is a waste of time...... Marktransparentform.zip Edited March 15, 2007 by PlausiblyDamp Quote
FartNocker Posted January 10, 2004 Posted January 10, 2004 I realize that the transparent part of this form is black but give it a try with any other color�. Same results Mark Quote
Administrators PlausiblyDamp Posted January 10, 2004 Administrators Posted January 10, 2004 If you don't set a transparency key for the form then it seems to display fine for me. What problems are you having? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
DameonBlack Posted February 24, 2004 Posted February 24, 2004 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. Quote
DameonBlack Posted February 24, 2004 Posted February 24, 2004 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.... Quote
ukjock Posted February 25, 2004 Author Posted February 25, 2004 One word for you DameonBlack... GENIUS!!! Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
DameonBlack Posted March 4, 2004 Posted March 4, 2004 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 Quote
DameonBlack Posted March 11, 2004 Posted March 11, 2004 (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 March 11, 2004 by DameonBlack Quote
travisowens Posted March 12, 2004 Posted March 12, 2004 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. Quote Experience is something you don't get until just after the moment you needed it
travisowens Posted March 12, 2004 Posted March 12, 2004 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. Quote Experience is something you don't get until just after the moment you needed it
DameonBlack Posted March 13, 2004 Posted March 13, 2004 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/ Quote
*Gurus* divil Posted March 13, 2004 *Gurus* Posted March 13, 2004 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 Quote 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* divil Posted March 13, 2004 *Gurus* Posted March 13, 2004 (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 March 13, 2004 by divil Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
DameonBlack Posted March 13, 2004 Posted March 13, 2004 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... Quote
DameonBlack Posted March 15, 2004 Posted March 15, 2004 (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 March 15, 2004 by DameonBlack Quote
*Gurus* divil Posted March 16, 2004 *Gurus* Posted March 16, 2004 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 :) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
DameonBlack Posted March 16, 2004 Posted March 16, 2004 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 Quote
*Gurus* divil Posted March 16, 2004 *Gurus* Posted March 16, 2004 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 :) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
DameonBlack Posted March 16, 2004 Posted March 16, 2004 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? :-\ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.