Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > General Discussion
  New Posts New Posts RSS Feed - Showing a png with transparency
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Showing a png with transparency

 Post Reply Post Reply
Author
Message
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Topic: Showing a png with transparency
    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 ?
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2008 at 11:11am

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

Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2008 at 2:46am
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,
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2008 at 10:00am
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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2008 at 11:21am

Oleg,

Could we have a function to add a progressbar to the popupcontrol? Splashscreen with a progressbar would be nice
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2008 at 7:19am
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 ?
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2008 at 3:37am
Oleg,
 
Where can I find the sample? I'm just curious how it looks.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2008 at 10:34am
Hi,
It will be in beta 4 this Monday.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2008 at 3:02pm
It's fine !!!
Can you explain to me how to put the popup on the center of the screen please ?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2008 at 1:22am
Hi,
Use Right and Bottom properties of PopupContol. There was formula in forums. try to search it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2008 at 5:34am
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) 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2008 at 6:56am
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.
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2008 at 9:22am
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.
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 2:22am
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)
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 6:35am

Nice! :)

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2008 at 3:42am
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 ?
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2008 at 5:08am
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...
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2008 at 9:18pm
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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2008 at 4:17pm
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

Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 7:20pm
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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2009 at 9:07pm
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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2009 at 8:42am
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

Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2009 at 6:12am
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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2010 at 10:03am
Added wndPopupSplash.SplashScreenMode = True
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2010 at 3:47pm
Fantastic - thanks a lot SuperMario!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.199 seconds.