Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2006

Tip: Looking for answers? Try searching our database.

Tiny Window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martijn Mulder - 21 Nov 2006 10:14 GMT
I want to implement a tiny window in my application, one that you typically
invoke via the menu-option Window -> Toolbar. It must be floating, not
restricted to the client area of the controlling form. It has a tiny
close-button on the right-hand corner. How do I implement this?
Marc Gravell - 21 Nov 2006 11:00 GMT
This do?

   static void Main()
   {
       using (Form form = new Form())
       using (Form tool = new Form())
       {
           tool.FormBorderStyle = FormBorderStyle.FixedToolWindow;
           tool.Text = "Tool";
           tool.Owner = form;
           tool.Size = new Size(60, 80);
           tool.Show();
           Application.Run(form);
       }
   }

Marc
Dave Sexton - 21 Nov 2006 11:10 GMT
Hi,

Try creating a new Form and setting the FormBorderStyle property to
FixedToolWindow or SizableToolWindow.

In an event handler for a Button.Click event, for example, open your Form:

private void button1_Click(object sender, EventArgs e)
{
   TinyForm form = new TinyForm();
   form.Show(this);
}

Signature

Dave Sexton

>I want to implement a tiny window in my application, one that you typically
>invoke via the menu-option Window -> Toolbar. It must be floating, not
>restricted to the client area of the controlling form. It has a tiny
>close-button on the right-hand corner. How do I implement this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.