473,224 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

New icon in ControlBox

Hello,

I Would like to add a new icon near the close/minimiez/maximize button in a
winfor
Did someone know how to do it ?

Thanks in advance
Franck

Jul 28 '08 #1
1 1569
There's no built-in functionality for doing this. You need to override the
WM_NCPAINT message, allow the non-client area to paint, and then paint your
button on top of it. You'll also need to handle WM_NCLBUTTONDOWN/UP, etc.
Basically, it's like a special-case custom control. I've never done this
from .NET, so yo may be able to do this from OnNcPaint and OnNcLButtonDown,
etc...

But it's not like adding a button to a form at all. Also, your button won't
pick up theme settings, so your button may look completely wrong. One way of
dealing with it is to somehow create a screenshot of one of the existing
buttons (minimize, close, maximize) and then use that to determine how to
draw the button similar to the theme.

"Franck FJ. Jobard" <Fr***********@PIERREMAUCHAMP.COMwrote in message
news:OL**************@TK2MSFTNGP02.phx.gbl...
Hello,

I Would like to add a new icon near the close/minimiez/maximize button in
a winfor
Did someone know how to do it ?

Thanks in advance
Franck

Jul 28 '08 #2

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

Similar topics

0
by: Microsoft | last post by:
How to make a sizable form with a title and a close button, but no icon and not ControlBox=false ??? Thank
8
by: Adrian | last post by:
How do I put an icon on a form using code? Thank you.
1
by: Rookie | last post by:
Hi, In the title bar of the form, there is an icon displayed. How do I get rid of it? I tried programmatically doing : this.Icon=null; (this refers to the form) That didn't work. Is there...
4
by: Jacob | last post by:
What's the best way to put an Icon in the client area of a form (not in the ControlBox)? Everything I've tried seems to produce unsatisfactory results. A picture box doesn't give me the icon size I...
2
by: Tim | last post by:
Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Min, Max, and Close buttons 3. No icon in the upper left hand corner All of this can be accomplished using...
13
by: Sylo | last post by:
Hi, I'm french and I don't find the answer at my question. You are my last chance and sorry for my english... I'm in VB .NET 2002 I have a MDI form with the property ControlBox at FALSE. When...
3
by: krishna | last post by:
Hi, I would like to disable the close icon on the form which will be available at the right most corner of the form in VB.NET which property i have to set. Regards, Krishna.
2
by: Peter Stojkovic | last post by:
I have programmed a window with an icon. Now I want, that this window has NO Icon. But I can not remove the icon within VS.NET. I can only select an other ICON ! How can I remove the icon...
1
by: Saso Zagoranski | last post by:
Hi, In .NET 2.0 I have a MDI (parent) form with a menu and a toolbar. I also have a MDI child form displayed in the mdi parent form. The problem is, that when I maximize the child form it's...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

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.