|
-
Sep 21st, 2007, 08:09 PM
#1
Thread Starter
Lively Member
How can I put a TextBox on the title bar of my application?
Hello, I saw an example(not designed with .Net)
which has a TextBox on the title bar of the window
(next to system buttons - min, max, close )
can I do that in .Net and any how to do that?
any help or code is appreciated.
-
Sep 21st, 2007, 08:18 PM
#2
Re: How can I put a TextBox on the title bar of my application?
There is no managed way to do that, so you'd do it essentially the same way it was done in your unmanaged example.
-
Sep 21st, 2007, 09:49 PM
#3
Thread Starter
Lively Member
Re: How can I put a TextBox on the title bar of my application?
aha, do you think that GDI+ can make sense for me?
I mean to put that control in there.
-
Sep 21st, 2007, 10:09 PM
#4
Re: How can I put a TextBox on the title bar of my application?
Firstly, GDI+ will draw shapes but it's not going to help you create a TextBox. Secondly, the title bar is part of the non-client area of the form so GDI+ can't help you. To access the non-client area you need to use unmanaged code, which is why I said so in my last reply.
-
Sep 21st, 2007, 11:10 PM
#5
Hyperactive Member
Re: How can I put a TextBox on the title bar of my application?
I'm not a real good programer, but couldn't you hide the "real" Title bar and make your own on the form. You would have to create all the functionality of the real one, but would be able to add your own stuff.
Visual Studio .NET 2005/.NET Framework 2.0
-
Sep 22nd, 2007, 04:51 AM
#6
Re: How can I put a TextBox on the title bar of my application?
This is not easy. and as jmcilhinney correctly mentioned, there is no managed way to do this, that means we will need APIs
I did something similar, but I added a button to the window's title bar - the whole logic surrounding it will be the same.
There are plenty of examples on the internet on how to do this, If you say you couldn't find an example, you simply haven't looked hard enough. Check out this thread :
http://www.codeguru.com/forum/showth...itlebar+button
VB.NET MVP 2008 - Present
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|