Custom WindowShape and Windows TaskBar

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Custom WindowShape and Windows TaskBar

Post by joel.epsteinBUS31vi » Wed Jul 03, 2013 3:10 am

Hi all -

I don't use Windows much, so excuse me if I'm not using the correct terminology.

Here's my problem:

If I create a Windows standalone that has a custom WindowShape, the icon for the application does not show up in the Windows TaskBar (or is it called System Tray?). If I create the exact same application, but do not apply a custom WindowShape, when I launch the application, I can see its icon down there at the bottom of the screen in whatever area that's called. When the application has a custom WindowShape, it's icon does not appear in that area.

I'd be ever so grateful if someone could please provide me a workaround, because for this particular application, I really need both the custom window shape and the icon in that area.

Thanks so much.

Joel

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Custom WindowShape and Windows TaskBar

Post by shaosean » Wed Jul 03, 2013 5:06 am

I believe this is just the way Windows works.. If a window does not have a title bar, it does not appear in the task bar (the part that shows all the open applications [the system tray is that little area beside the clock]) The workaround for this, is to have a hidden window with a title bar so something appears in the task bar and then handle the events in the hidden window and make the custom window behaviour properly.. Best thing to do, is to make the hidden window the same rect as the visible custom window so nothing looks overly weird when using the keyboard move command..

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Custom WindowShape and Windows TaskBar

Post by joel.epsteinBUS31vi » Wed Jul 03, 2013 2:16 pm

Thanks for the helpful information.

A couple quick follow-up questions - and sorry to be such a n00b here.

- When you say that I should have another hidden window with a title bar, I'm not sure exactly what that means. Because if I make a substack of my main stack, and have it have a title bar, but set its visible property to false, then the icon still does not appear in the task bar (but, for testing purposes, I set the visible property to true, the icon does appear in the task bar).

- If I figure out the above dilemma, I then wonder how I redirect users back to the main window if they click on the icon in the task bar - it seems to just activate that sub-stack's window?

- What do I do to insure that the icon for that hidden window matches the icon of the application?

I appreciate any advice you can provide.

Peace.

Joel
Last edited by joel.epsteinBUS31vi on Wed Jul 03, 2013 3:56 pm, edited 1 time in total.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Custom WindowShape and Windows TaskBar

Post by shaosean » Wed Jul 03, 2013 3:52 pm

joel.epsteinBUS31vi wrote:- When you say that I should have another hidden window, does that mean that my main stack should have a sub-stack, or is there another way to implement that other hidden window?
You can use a sub-stack or another main stack, really your preference..

Code: Select all

go invisible to stack "hiddenStack" in a new window
set the rect of stack "hiddenStack" to (the rect of stack "customStack")
joel.epsteinBUS31vi wrote:- And then, if users click on the hidden window icon in the Windows task bar, how do I redirect them back to the main window?
in the stack script of the hidden stack, you would just need to trap a few of the handlers and then dispatch them to the custom stack
resumeStack
suspendStack
iconifyStack
unIconifyStack
joel.epsteinBUS31vi wrote:- What do I do to insure that the icon for that hidden window matches the icon of the application?
So long as it is part of your application, I believe it will get the icon automatically (been a while since I used Rev and/or Windows)

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Custom WindowShape and Windows TaskBar

Post by joel.epsteinBUS31vi » Wed Jul 03, 2013 4:12 pm

Wow! I really appreciate you hanging in there with me and all my questions.

I tried to implement things just like you said - but the problem is that when the window is set to invisible, the icon gets hidden from the task bar. I verified this by implementing a button to simply toggle the visible property of the window to true or false and could watch the icon appear and disappear from the task bar.

Any ideas how to proceed?

Thanks again for all your help.

Peace.

Joel

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Custom WindowShape and Windows TaskBar

Post by shaosean » Thu Jul 04, 2013 6:39 am

Make the stack as small as possible (width and height = 0 or 1)
Check against the screenRects to see where you can move the window so it is not on someone's monitor

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Custom WindowShape and Windows TaskBar

Post by joel.epsteinBUS31vi » Thu Jul 04, 2013 4:21 pm

Good plan. I tried it and that seems to do the trick.

Thanks so much.

Joel

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Custom WindowShape and Windows TaskBar

Post by shaosean » Fri Jul 05, 2013 5:48 am

No problem.. Just make sure that on suspendStack you make your custom window the front stack so people do not use the ctrl-esc to get the window menu and move your "hidden" window onscreen ;)

Post Reply

Return to “Windows”