473,834 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding a "minimize-to-tray" box to main form

hi all,

i was wondering how is it possible to add an extra box ( i think they are
called boxes: upper right corner ...) in a form that will minimize it in the
system tray?
You know some applications have a 4th one (apart from the square , bar and
X ) which contains a dot and once u click it minimizes the application to
the tray.

TIA

-steve
Nov 20 '05 #1
4 4104
I think you can get that done with a NotifyIcon control on your form. Look
it up in the docs and see what you think.

HTH
Steve

"steve" <noemail.@try.c om> wrote in message
news:iw******** *************@w eber.videotron. net...
hi all,

i was wondering how is it possible to add an extra box ( i think they are
called boxes: upper right corner ...) in a form that will minimize it in the system tray?
You know some applications have a 4th one (apart from the square , bar and
X ) which contains a dot and once u click it minimizes the application to
the tray.

TIA

-steve

Nov 20 '05 #2

"steve" <noemail.@try.c om> wrote in message
news:iw******** *************@w eber.videotron. net...
i was wondering how is it possible to add an extra box ( i think they are
called boxes: upper right corner ...) in a form that will minimize it in the system tray?
You know some applications have a 4th one (apart from the square , bar and
X ) which contains a dot and once u click it minimizes the application to
the tray.


I've never seen an application that provides this. I'm not disputing that
they exist, but I think it's a non-standard thing to do. First off, adding a
button to the title bar is not a trivial task. Second, most of the programs
that I've seen that offer this ability make it a user option, so that
minimizing (with the normal minimize box) either sends the app to the
taskbar or the tray, as opposed to having two buttons which do different
things.
Nov 20 '05 #3
The Old API Viewer had this extra Caption Button as did GetRight, and I'm
sure several other programs.

I wrote code for this back in my old VB6 days the source of which you will
find on PlanetSourceCod e.
It was a lot of code for a simple button and it will not be much easier to
do in dotnet since it involves drawing to the forms Non Client Area, which
is not supported by the framework. I have not attempted to repeat this task
in dotnet as it is much simpler and more common to attach the option to the
existing Minimize Button.

If you really want the appearance, and your form has no menu, then I would
suggest removing the TitleBar from the form and simulating it with a Docked
Panel and some buttons using the Marlett font.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Jeff Johnson [MVP: VB]" <i.***@enough.s pam> wrote in message
news:eq******** *****@TK2MSFTNG P11.phx.gbl...

"steve" <noemail.@try.c om> wrote in message
news:iw******** *************@w eber.videotron. net...
i was wondering how is it possible to add an extra box ( i think they are called boxes: upper right corner ...) in a form that will minimize it in the
system tray?
You know some applications have a 4th one (apart from the square , bar and X ) which contains a dot and once u click it minimizes the application to the tray.


I've never seen an application that provides this. I'm not disputing that
they exist, but I think it's a non-standard thing to do. First off, adding

a button to the title bar is not a trivial task. Second, most of the programs that I've seen that offer this ability make it a user option, so that
minimizing (with the normal minimize box) either sends the app to the
taskbar or the tray, as opposed to having two buttons which do different
things.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #4
So I remembered correctly, but hard to do... oh well, it`s not important.

Thanx all of you for your kind responses! I love this newsgroup. Very
knowledgeable and kind people giving advice at roughly (what ?...) 95% of
the questions.
Excellent work.
Thanx again
"Mick Doherty"
<EX***********@ AND.REMOVE.SQUA REBRACKETS.[mdaudi100#ntlwo rld.com]> a écrit
dans le message de news:OB******** ******@tk2msftn gp13.phx.gbl...
The Old API Viewer had this extra Caption Button as did GetRight, and I'm
sure several other programs.

I wrote code for this back in my old VB6 days the source of which you will
find on PlanetSourceCod e.
It was a lot of code for a simple button and it will not be much easier to
do in dotnet since it involves drawing to the forms Non Client Area, which
is not supported by the framework. I have not attempted to repeat this task in dotnet as it is much simpler and more common to attach the option to the existing Minimize Button.

If you really want the appearance, and your form has no menu, then I would
suggest removing the TitleBar from the form and simulating it with a Docked Panel and some buttons using the Marlett font.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Jeff Johnson [MVP: VB]" <i.***@enough.s pam> wrote in message
news:eq******** *****@TK2MSFTNG P11.phx.gbl...

"steve" <noemail.@try.c om> wrote in message
news:iw******** *************@w eber.videotron. net...
i was wondering how is it possible to add an extra box ( i think they are called boxes: upper right corner ...) in a form that will minimize it
in
the
system tray?
You know some applications have a 4th one (apart from the square , bar and X ) which contains a dot and once u click it minimizes the application to the tray.
I've never seen an application that provides this. I'm not disputing

that they exist, but I think it's a non-standard thing to do. First off,

adding a
button to the title bar is not a trivial task. Second, most of the

programs
that I've seen that offer this ability make it a user option, so that
minimizing (with the normal minimize box) either sends the app to the
taskbar or the tray, as opposed to having two buttons which do different
things.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3342
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text field called . It gets populated based on what the user selects in a field on the sub form (code in the AfterUpdate Event). Here's the issue. If the user deletes a subform record. The field on the main form shows null even if there is a value in the preceding subform record. What I'd like it to do is immediately refresh to
30
8924
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the format to display currency. This text box is called "SubformTotal", and is visible property is set to "No". On the main form I have made another text box and set its control source to "=.Form!SubformTotal". When I enter some parts everything works...
1
3548
by: RahimAsif | last post by:
Hi guys, I am developing a C# application using VS .NET 2003. Its a typical windows SDI application with a menu and toolbar at the top, treeview on the left and a status bar at the bottom. In my tree-view, I show a list of panels, and expanding the panel displays the list of projects for that panel. in my menu, I have options for the user to add/edit panels and projects which bring up the appropriate dialogs. Here is what I am trying to...
3
518
by: tlyczko | last post by:
I have a main form with 2 subforms, each subform references different data in the same table. How do I make sure each subform only creates NEW records in the referenced table and do not overwrite or change data in previously created rows?? Otherwise I have to use two different tables, with similar kinds of data, for each subform, which may well be the way to go even though it's not really normalized, to make the data entry easier and...
4
3278
by: Jason | last post by:
Hi all, I am developing a windows application. After the main form is displayed, I want to immediately pop up a message box e.g. MsgBox("Hello"). However, if I place the MsgBox code inside MainForm_Load(,) MyBase.Load, the message box will appear before the display of the main form. So in which form event or method we can know the main form has just been displayed?
0
1948
by: Richnep | last post by:
Hi all,. I have a small issue I would like to resolve with VBA. I have a form which it's fields are bound to a table. Within that form is a subform which is a subtable. Tables relationship is a one to many from the main table to the sub table.
1
1536
by: vvasnm | last post by:
Hi This is surya, I am struggling with one issue regarding the updation of the value in the sub form ,when the related data has been deleted from the data sheet view of the main form. I am handling as application built in MS Access,where user updates some information say for example expenses, and the expenses entered will be summed up for every transaction and that total will be shown in a sub form which is integrated in the main form.If...
0
732
by: jivangoyal | last post by:
I'm working on a project that has a requirement is a Look-In window. and this is the small part of the main form to navigate a list of files and folders from local and mapped machines. But the same functionality exists in OpenDialogBox. but problem is that I want to this dialog functionality to be existing in my main form as part of the form not as popup dialog. I tried to rebuild the all the needed functions too but after long time too I'm...
3
1552
scootaman
by: scootaman | last post by:
I have a main form for adding or changing events called Trianing Events Details. On that form there is a subform that is tied to the Start Date field of the main form. I have the form setup this way to mimic a day view in a calendar. I would like to be able to click on a start time of a record in the subform and have it show in the main form. I expect a day may come when I intering an event I may need to change the start time of one of the...
0
1647
by: Anton Melamed | last post by:
Hi, I would very much appreciate any help give. Im creating database for handling stock of shoes with different sizes and orders. I have main form - Stock with a subform - Orders Each forms have fields with size range (5, 5½, 6, 6½ etc) In the main form (Stock) shows size range and number of shoes currently in stock in store for each size.
0
9800
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9651
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10225
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9340
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6961
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5630
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5802
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3987
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.