How do I put a control on the non-client area of a form?
Can a component be painted onto the non-client area? (Bounds)
10 7188
They put it onto the non-client area of the form, and nothing looks wrong different with microsoft office (word, excel, powerpoint) or the codejock sample I got. So how did they put the control onto the non-client area of the form?
Was the answer to your question first time you asked not what you were looking for?
You really should keep to one thread per question.
It works, but when I put text box onto the control and type into it, anything's thats colored black will become transparent. And maximizing / restoring the window messes it up (although I'll try to solve that). So how do I not let the black color on the controls turn transparent?
@peepoohead7
Set the text color to something other than black?
Use the resize (SizeChanged, SizeChangedComplete, etc) events to relocate the text box.
MERGED.
Please don't double post.
MODERATOR
You want a textbox in the title bar? Interesting.
I would have just turned off the border/titlebar and made my own at that point i think.
Is there a picture/screenshot of what you are trying to do, that link only showed a colored titlebar,which i have also never seen really.
Here are some examples of what I'm trying to do: This and This.
Only Windows Vista can paint those windows, but somehow they got the orb and the toolbar onto the title bar. Tlhintoq, your link was what I was looking for, except for the problem I described previously. I'll do some more searching.
Oh so its a vista thing, no wonder i had never seen it
I read in this article that:
Office completely removes the non-client area, and renders everything in its client area, so it doesn't have a caption (except a fake one).
Notice how the glow and the text are different, it's because they're not rendered by the DWM.
I compared the pixels on the top left corner of Word and a program (same location, same size, same background) and it was a bit different.
If I set the text to a different color the text will still appear transparent :(
I got it! Using the link you gave me, I overrid the WndProc property like this: - protected override void WndProc(ref Message m)
-
{
-
if (m.Msg == 0x83)
-
{
-
Point point = new Point(m.LParam.ToInt32());
-
m.Result = new IntPtr(-1);
-
return;
-
}
-
-
Graphics g = Graphics.FromHwnd(Handle);
-
g.DrawString("String",
-
new Font("Lucida Console", 10f),
-
new SolidBrush(Color.Black),
-
PointF.Empty);
-
-
base.WndProc(ref m);
-
}
Now all I have to do is to remake the buttons and resizing.
Thanks for your help. :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dave Lambert |
last post by:
Hi, Hope someone can answer this, is it possible to have
some dates that the user is unable to select in the
Calendar, I am using the dayrender event to highlight
specific dates, but would like to...
|
by: Miyra |
last post by:
Hi. I'm working with an app that uses exceptions for control flow.
These are code blocks where exceptions are thrown/caught regularly. A
couple hundred exceptions occur per hour and they're caught...
|
by: lwickland |
last post by:
Non-visual C# objects on a webpage are not marked as "safe for scripting"
I'm developing .NET components in C# which are used as ActiveX-style
controls on web pages that are displayed inside a...
|
by: Konrad |
last post by:
Hi,
How to make a ListBox control non selectable? I could't find any property to do it.
Regards,
Konrad
|
by: None |
last post by:
Hello
In order to host and use an ActiveX control (non-GUI) in a WTL app, I
followed the following steps:
1. During project creation, the ActiveX Hosting option is enabled.
2. In the dialog...
|
by: Paul Kia |
last post by:
I have an ATL composite control which I drop into a tab control dialog page
of an MFC application. When I click on the composite control and then click
anywhere outside the MFC application, the...
|
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= |
last post by:
PEP 1 specifies that PEP authors need to collect feedback from the
community. As the author of PEP 3131, I'd like to encourage comments
to the PEP included below, either here (comp.lang.python), or...
|
by: rafalK |
last post by:
Hi All,
I have a big problem with STAThread attribute. I'm using XNA framework
connected with WinForms. XNA is working in non STAThread. I have a
problem with displaying CommonDialog forms e.g....
|
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= |
last post by:
Hello,
I have a custom control (not a listbox or other hierarchical or list
control) that I would like to bind to a specific row and column from a
DataTable.
Each row of the datatable will...
|
by: biswal.srikant |
last post by:
I've been trying to correct this error for approx 2 days and am
having
no luck.
In a page's button clickevent , i want to bind a infragistic grid
according to two dropdown value.
At the first...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
| |