Showing a png with transparency |
Post Reply |
Author | |
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
Posted: 08 April 2008 at 6:25am |
Hi !
I'm using VB6 and i try to find a way to show a PNG file on the screen with transparency as a splash screen...
I've found a method to make transparent some colors on a form but not to show a PNG (with levels of transparency)...
In fact i wish to "simply" show a PNG (with transparency) on the top of the screen, like Windows Live Mail :
It is real PNG with levels of transparency :
Any idea ?
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, You could use a popupcontrol for this. You can set the transparency as well. Adding icons, buttons and hyperlinks is an option. It's worth trying |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Thanks, but i think on popcontrol you can only use one level of transparency.
In fact a need many levels of transparency on the same form at the same time (0% on center and more on borders).
I found a way (api) to use a color which would be transparent (pink for example) but no way to use levels of transparency (like in a png file). I'll keep searching and tell you if i find something.
Regards,
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Actually sound like good suggestion for our PopupControl. We added it, and updated sampe to show how use.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Oleg, Could we have a function to add a progressbar to the popupcontrol? Splashscreen with a progressbar would be nice
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Hi !
Oleg : Thanks a lot !
I'm agree with aaron, progress bar on splash screen would be nice and usefull when then app need to load a lot of things...
Some news about the release date of v12 ?
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Oleg,
Where can I find the sample? I'm just curious how it looks.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
It will be in beta 4 this Monday.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
It's fine !!!
Can you explain to me how to put the popup on the center of the screen please ?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Use Right and Bottom properties of PopupContol. There was formula in forums. try to search it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Try this:
wndPopupControl.SetSize 300, 500
wndPopupControl.Bottom = Screen.Height / Screen.TwipsPerPixelY / 2 + wndPopupControl.Height / 2 wndPopupControl.Right = Screen.Width / Screen.TwipsPerPixelX / 2 + wndPopupControl.Width / 2 Note: setting a different display resolution your "splashscreen" size has to be adjusted to fit the display (if size of splashscreen is bigger than display resolution)
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I was playing around with the popupcontrol myself and if I may say so myself, its a splendid idea. It could be a nice feature for all of us having a transparent splashscreen. When using a background image the borders are even transparent, so you are able to make an irregelar shaped splashscreen !!!! and you can even drag the splashscreen !!!!
Now, this is for Oleg:
To make it even nicer could it be possible to have the option to add CUSTOM items. I think the same way as you attach a control to a commandbardropdown. If this is too much to ask, could we have just the progressbar option.
In my case the startup takes some time to load all the data and I want to show the user that there's something happening and I think I'm not alone with this.
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
I agree ! It's a splendid idea :)
Now that I have exactly what I wanted I looks forward to the release of official V12 to deploy. Let us hope that it will not be long any more!
Thank you for everything.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
When you have to build a splashscreen from scratch it will be difficult to get the buttons and images on the right place. But maybe this will give you an example how to create a splashwindow.
Start application will show splashscreen and after 10 sec the splashscreen will fade and application will be closed.
Adjust the controls in frmSplash and see what happens or add labels / pictureboxes (don't forget to load an image)
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Nice! :) |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Hello !
I've just noticed a problem about this...
The popup control reacted like a... popup control and not really like a splash screen...
For example, if you let the cursor on the "splash screen" the popup control will never unload... try with the "layer" sample in the samples folder.
Any ideas ?
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
I've found a solution by using a timer calling the "close" function of the popup control. Not perfect but it works...
It will be great if CJ can add a "Enabled" (or other...) in order to disable the "mouse over" detection...
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I agree with Lodep59 as there is another problem - not only will the control not close automatically, but it will go to 0% transparency on mouse over...this can cause a distracting flicker when the image fades in if the mouse is over the picture area. Some way to turn off the mouse detection is required for splash screen use.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
It would be great if we had a property to ignore mouse-over on the PopupControl so that it will not jump to 0% transparency for use in splash screens. Any chance of this for 12.1?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
Using PopUp Control as a Splash screen.
This works well -- thanks Aaron. When run under the IDE, the PopUp form reacts to mouseOver -- transparency goes to zero and the buttons light up. But when compiled the form does not react to mouse over. As if it was not enabled So the buttons do not work. Has anyone else found this difference between IDE and compiled program.? |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
In my tests the popupcontrol transparency goes to zero even in the compiled program, and I find this behaviour very distracting for the purposes of a splash screen.
Any chance that we can either: 1) Have a property to ignore the mouse over transparency change, or 2) Have access to the Hwnd so that we can subclass the PopupControl and consume the mouse messages? Thanks a lot. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Pretty please with sugar on top? It can't be more than an IF block and a boolean property declaration to get this to work can it?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
Hi All!
I vote for this little feature to be implemented. I tried to use the Region of the FormExtender control for this reason but it generates an error if we select a png file. |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2 Language: Visual Basic 6 SP6 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Added wndPopupSplash.SplashScreenMode = True
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Fantastic - thanks a lot SuperMario!
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |