View previous topic :: View next topic |
Author |
Message |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Thu Mar 21, 2002 4:42 pm Post subject: Taskbar Button |
|
|
I want to write a utility that displays a tray icon only, never a Taskbar icon. Anyone know how to do this? |
|
Back to top |
|
 |
bjdavis Valued Newbie

Joined: 03 Jan 2002 Posts: 28 Location: Jacksonville, FL
|
Posted: Thu Mar 21, 2002 4:50 pm Post subject: |
|
|
Code: |
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,TEXT,Hello,60,48,,,Hello There
Dialog Add, TaskIcon, TaskIconName,,,CLICK
:WaitEvent
Wait event
%E = @Event()
goto %E
:TaskIconNameClick
Dialog Popup, Show|Close
:Show
Dialog Show
goto WaitEvent
:Close
stop
|
_________________ B.J. Davis, MCSE |
|
Back to top |
|
 |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Thu Mar 21, 2002 5:07 pm Post subject: |
|
|
Thank you for the reply, but how does this eliminate the taskbar button? My util already has functional tray icon code via TASKICON, but a taskbar button appears whenever the GUI is showing. |
|
Back to top |
|
 |
bjdavis Valued Newbie

Joined: 03 Jan 2002 Posts: 28 Location: Jacksonville, FL
|
Posted: Thu Mar 21, 2002 5:23 pm Post subject: |
|
|
try this
Set your dialog to have no title
and make sure you put a button or someway to close the window
Code: |
DIALOG CREATE,New Dialog,-1,0,240,160,NOTITLE
DIALOG ADD,TEXT,Hello,60,48,,,Hello There
DIALOG ADD,BUTTON,CLOSE,105,47,,,CLOSE
Dialog Add, TaskIcon, TaskIconName,,,CLICK
:WaitEvent
Wait event
%E = @Event()
goto %E
:TaskIconNameClick
Dialog Popup, Show|Close
:Show
Dialog Show
goto WaitEvent
:Close
:CloseButton
stop
|
_________________ B.J. Davis, MCSE |
|
Back to top |
|
 |
Henrik Valued Newbie

Joined: 09 Jul 2000 Posts: 35 Location: Copenhagen, Denmark
|
Posted: Fri Mar 22, 2002 4:55 am Post subject: |
|
|
Hi !
I think you can also set your dialog to have a SMALLCAP title if you still want it to have a title but don't want to show in the taskbar
Henrik _________________ Henrik Skov
Email: henrikskov@mail.dk |
|
Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Mar 22, 2002 5:01 am Post subject: |
|
|
You need to either use SMALLCAP or NOTITLE for your dialog and also make the TITLE different from the DIALOG CREATE's title... Like below
Code: | TITLE New Dialog1
DIALOG CREATE,New Dialog,-1,0,240,160,SMALLCAP
DIALOG SHOW
Wait Event
Exit |
Notice in the TITLE I use "New Dialog1" but in the DIALOG CREATE I use "New Dialog"?
That's how you tell VDS 4.5 to not display a Task Bar Icon.
This works also now with a NOTITLE dialog.
Best regards,
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
 |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Sat Mar 23, 2002 3:06 pm Post subject: |
|
|
The SMALLCAP idea works (although it would be nicer just to hide the taskbar button). Thank you for your replies and help. |
|
Back to top |
|
 |
Newbie2k2 Newbie
Joined: 17 Mar 2002 Posts: 11
|
Posted: Sat Mar 23, 2002 5:19 pm Post subject: OT ;) |
|
|
@Henrik
your Avatar is awesome  |
|
Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Mar 24, 2002 5:17 am Post subject: Re: OT ;) |
|
|
Newbie2k2 wrote: | @Henrik
your Avatar is awesome  |
I'd still like to know what Henrik's Avatar is holding in his hand!
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
 |
bjdavis Valued Newbie

Joined: 03 Jan 2002 Posts: 28 Location: Jacksonville, FL
|
Posted: Mon Mar 25, 2002 4:04 pm Post subject: |
|
|
maybe we shouldn't know about these things that are probably unexplainable !!!  _________________ B.J. Davis, MCSE |
|
Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Jun 02, 2004 11:11 am Post subject: |
|
|
VDSuser wrote: | The SMALLCAP idea works (although it would be nicer just to hide the taskbar button). Thank you for your replies and help. |
Here is a bit of code using VDSGUI Extension to do that - tested in VDS 5 - mostly works with older ones too.
VDSGUI Extension Help file wrote: |
Qn. How do I create a Normal Dialog without Taskbar Button in VDS 5 ?
A: Here is a small example as to how you can do it:
Code: |
EXTERNAL VDSGUI,DEMO
#DEFINE COMMAND,GUI
REM Create a NOTITLE dialog:
REM
DIALOG CREATE,GUI Window Style Demo,-1,0,247,255,,CLASS guiwin,NOTITLE
REM and apply the required styles one by one!
REM
GUI WINDOWSTYLE,ADD,#guiwin,TITLE
GUI WINDOWSTYLE,REMOVE,#guiwin,SMALLCAP
GUI WINDOWSTYLE,ADD,#guiwin,SIZEBOX
GUI WINDOWSTYLE,ADD,#guiwin,MINIMIZEBOX
REM
REM Now you have a normal looking VDS dialog but
REM without a Taskbar button!! |
|
BTW I know this topic is old and ...  _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Wed Jun 02, 2004 11:33 am Post subject: |
|
|
I've written many VDS tray icon apps (several of my Tech-Pro Utilities for example.) All I've ever done is to WINDOW HIDE the window. I usually use the window as the configuration dialog for the app, so I can just show (WINDOW NORMAL) and hide it as needed. If you're bothered that it flashes briefly on the screen, you can leave out the DIALOG SHOW so that the window isn't shown the first time, and set a variable so the first time it's wanted you execute the DIALOG SHOW, and on subsequent occasions you WINDOW NORMAL to un-hide it. or else you can create the window off-screen, and position it on-screen after it's hidden.
This assumes that you do want a task bar button when the window is showing, which I personally think is a good thing. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jun 03, 2004 10:11 am Post subject: |
|
|
that is also what i do quite effectively, jules
what do they say about great minds??!?!
serge _________________
|
|
Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Thu Jun 03, 2004 10:52 am Post subject: |
|
|
Yes in the situation the OP asked what Julian suggested is the right thing to do. But what I suggested was for someone who wants to rid that button BTW it is not so much advisabel unless you also use a ONTOP style else the window cannot be reached easily - should the user click on another window especially if he has dozens of windows open there. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|