![]() Then it will get the position just below the main menu. If there is a menu in the MDI form, drag and drop “ FormTitileBar” control on to the menu. If you want to change the appearance of the control, You have to modify images used in FormTitleBar and Control Box controls.įew more tricks. Once you set the form properties as shown above, you will get the form with your own title bar. You can choose form border style none or you can do some tricks to remove the title bar like setting: Once you set the Doc property to "Top", you have to remove the traditional windows title using the FormBorderStyle Property. Because you have the code of the title bar control, you can easily overcome this situation by making some modifications. ![]() I will provide an enhanced version in the near future. Displaying area of the title bar is fixed. There is a limitation of displaying the text. You can set those properties and can customize as you want. In your property dialog box, you can see Title, Title Font, Title Forecolor, TitleBackColor properties for the title bar control. As I explained above, add the control to your toolbox using "choose items.".ĭrag and drop the title bar control to your application and set the Doc property of the control to "top". How to Use the Title Bar in your ApplicationĬopy the two DLL files to your application source folder which was produced as the compilation of TitleBarControl project. With the help of both, I am quite sure you can create your own title bar. Here I have attached both projects which create a title bar and control box. Then drag and drop this control on to your project Windows form. From there, you browse this DLL and click OK. What you have to do is right click on the tool box pane in C# and click on “choose items…”. You can simply use that DLL in your next control creation project as a visual control. This is all you have to perform in order to create a “control box” control. To highlight the button when the cursor moves over, we have to capture the mouse move event of each label control and add the following code segment. Put three label controls on to the control form and assign images for those. This control provides the same functionality as the Windows control box does.Ĭreate a C# “Windows Control Library” project and you can do all these wonders. Though you have the code with this article, you can change the appearance as you want. ![]() Then I will move on with the title bar which easier to develop. I will explain how to create a control box for a form. In this creation, I have used my previous control of control box to create this title bar. This is to make you understand how easy it is to create such a control in C#. Another thing is, this is not fully customizable yet. With my findings and using my knowledge, I will present to you a customizable title bar control which will save you time. ![]() If I find them again, I will put those references in my article. But I should pay my great respect for them. I am sorry I could not remember where I picked some of those points from. But while searching, I have picked some key points to make my own title bar. I have spent a lot of time on the web to find such a title bar, but I couldn't. I would like to give you another sweet title bar which will make your applications beautiful.
0 Comments
Leave a Reply. |