forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Taskbar Button

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Thu Mar 21, 2002 4:42 pm    Post subject: Taskbar Button Reply with quote

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
View user's profile Send private message
bjdavis
Valued Newbie


Joined: 03 Jan 2002
Posts: 28
Location: Jacksonville, FL

PostPosted: Thu Mar 21, 2002 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Thu Mar 21, 2002 5:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
bjdavis
Valued Newbie


Joined: 03 Jan 2002
Posts: 28
Location: Jacksonville, FL

PostPosted: Thu Mar 21, 2002 5:23 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Henrik
Valued Newbie


Joined: 09 Jul 2000
Posts: 35
Location: Copenhagen, Denmark

PostPosted: Fri Mar 22, 2002 4:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Mar 22, 2002 5:01 am    Post subject: Reply with quote

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
View user's profile Send private message
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Sat Mar 23, 2002 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Newbie2k2
Newbie


Joined: 17 Mar 2002
Posts: 11

PostPosted: Sat Mar 23, 2002 5:19 pm    Post subject: OT ;) Reply with quote

@Henrik

your Avatar is awesome Smile
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Mar 24, 2002 5:17 am    Post subject: Re: OT ;) Reply with quote

Newbie2k2 wrote:
@Henrik

your Avatar is awesome Smile


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
View user's profile Send private message
bjdavis
Valued Newbie


Joined: 03 Jan 2002
Posts: 28
Location: Jacksonville, FL

PostPosted: Mon Mar 25, 2002 4:04 pm    Post subject: Reply with quote

maybe we shouldn't know about these things that are probably unexplainable !!! Confused
_________________
B.J. Davis, MCSE
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Jun 02, 2004 11:11 am    Post subject: Reply with quote

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 ... Wink

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Jun 02, 2004 11:33 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jun 03, 2004 10:11 am    Post subject: Reply with quote

that is also what i do quite effectively, jules

what do they say about great minds??!?!

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Thu Jun 03, 2004 10:52 am    Post subject: Reply with quote

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 Wink 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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group