Page 1 of 2

Task Bar Icon

Posted: Fri May 20, 2011 4:50 am
by BruceN
THis is probably a very simple thing for you wizards...

I have a screen (say customers) that I open from the main menu. I would like there to be an icon on the task bar for that window (with the icon i choose). I figure that would be something in the dcread options, but didn't see anythi ng there for it (perhaps I missed it).

A few of our windows (including the main menu) are std xbase (shudder), I can use ' awindow:icon:=1000 ' for them, but what for DC windows... as they aren't given exlicit names (like aWindow)?

thanks

Re: Task Bar Icon

Posted: Fri May 20, 2011 4:57 am
by Tom
DCGET OPTIONS ICON <nIconId>

Re: Task Bar Icon

Posted: Fri May 20, 2011 5:22 am
by BruceN
thanks, tom... but that didnt work. part of getoptions:

DCGETOPTIONS WINDOWWIDTH 800 WINDOWHEIGHT 575 WINDOWROW 25 NORESIZE NOMAXBUTTON;
nosupervise;
icon 1000;
bitmap m_bkg;
COLOR XBPSYSCLR_TRANSPARENT;

i put icon 1000 and id doesnt show.
awindow:icon:=1000
works for non dc windows.

Re: Task Bar Icon

Posted: Fri May 20, 2011 5:27 am
by Tom
That only works for non-modal windows. Modal windows don't have task bar entries.

Re: Task Bar Icon

Posted: Fri May 20, 2011 5:48 am
by BruceN
That presents a problem for me. Perhaps you can give me an alternative. Here's the situation.

We have a main menu with buttons and menu options that call the 'primary program function' (like customer screen, product screen, sales screen.) In the older version, when an option was selected, the menu stayed u in the background. On this version, I'd like to hide the menu and only have the child window display. Problem is, when people switch in and ut of other programs, our window can get lost in the clutter and be overlooked/forgotten. THen they'd think program was clsoe and open another copy.

Sales screen is native xbase and does have an icon on taskbar.

I wanted a task bar icon so they could see the program was open and easily switch to it.

thanks

Re: Task Bar Icon

Posted: Fri May 20, 2011 7:31 am
by rdonnay
Try DC_IconDefault(1000).

Re: Task Bar Icon

Posted: Fri May 20, 2011 7:48 am
by BruceN
my stupidity again...

put it in dcgetoptions and I get compile errors. put it in rcreadgui, same.

put it in standalone line just before the dcgetoptions and it compiles, but no taskbar icon. where does it go?

Re: Task Bar Icon

Posted: Fri May 20, 2011 7:59 am
by rdonnay
This is a FUNCTION.

You call it at the beginning of your program.

I suggest searching for the word "icon" in the eXpress++ help file.
It would have brought up DC_IconDefault().

Re: Task Bar Icon

Posted: Fri May 20, 2011 8:38 am
by BruceN
i now recall seeing and trying it.. it appeared to be the icon at the top left of the window title bar at the top of the window. not the icon that shows on the task bar at the bottom of the screen.

perhaps i'm not making myself clear.

Attached are 3 screen shots, with areas of interest highlighted by red markings.
1) screen with menu open ... icon on task bar
2) screen with customer screen open and menu hidden ( aWindow:Hide() ). no icon ontask bar.
3) screen for previous version of program with customer screen open and menu behind it. Icon on task bar.

On older version (screen3) if window gets hiden behind others, you can see its open from task bar and reselect it.
On newer version with menu hidden theres no icon showing and its easy to forget you had it open.

Is that clear?

Re: Task Bar Icon

Posted: Fri May 20, 2011 8:41 am
by BruceN
oops.. files didn't attach. This time I zipped them.

take 2: