BOX CONTROLS FAQ

How do I hide maximize, minimize and close box at the form title bar?

  1. To disable the maximize box at the form title bar, set the Maximize property of the form to false.
  2. To disable the minimize box at the form title bar, set the Minimize property of the form to false.
  3. You can not hide only the close box from the form title bar using the form’s property.
  4. Similarly, you can not only hide maximize or minimize boxes from the title window.
  5. You can hide maximize and minimize boxes from the title bar by setting the FormBorderStyle property of the form to the FixedToolWindow or the SizableToolWindow. But remember that with FormBorderStyle set to the FixedToolWindow or SizableToolWindow, the form will not be displayed in the Windows task bar or in the window that appears when the user presses ALT+TAB.
  6. You can hide the Control box from the title bar of the form by setting the ControlBox property of the form to false. This will hide the control box and system menu from the form window.
How do I make my form non-resizable or fixed length?

You can make your form non-resizable or fixed length by setting its FormBorderStyle property to Fixed3D or FixedSingle or FixedDialog

How do I change the icon of my form to be displayed at title bar?

You can change the icon of the form by changing its icon property.

Remember that this property will only change the icon of the form and not of the application. To change the icon of the application or assembly, change the icon from the property pages of the project. The property pages for the project are displayed when you right click the project and select properties.

How do I make my form not to appear in the task bar?

To make your form not to appear in the task bar, set the ShowInTaskbar property of the form to false.

How do I make and display a form without title bar?

To display your from without the title bar, set the FormBorderStyle property of the form to None

How do I close the form programmatically?

To close the form programmatically, call the Close() method of the form.

How do I display a message box in my form application?

To show the message box, call the MessageBox class’ Show() method. The message box is the modal form that notifies the user about certain event in the application and optionally takes the user feedback. The Show() is an static (C#) / Shared (VB.NET) method of the System.Windows.Forms.MessageBox class. It has a number of overloaded versions. The simplest one take the message text and display it in the message box.

How do I add another form into my win form application?

To add and design a new form at design time, right click the target project node in the Solution Explorer and select AddàAdd Windows Form… This will add a new form; design it by placing controls and setting necessary properties.
To show the new form at run time, instantiate the new form and call its Show() or ShowDialog() method.

How do I set the first form to be loaded at application startup?

The first form to be loaded at the application startup is called the startup or main form of the application. You can set the startup form of the application by right clicking the target project node and selecting properties. It will show you the property pages for the project. Here in the Common PropertiesàGeneral, you can set the startup form by selecting its name from the drop down list of ‘Startup Object’.

RELATED POST

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART ONE

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART TWO

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART THREE

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART FOUR

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART FIVE

ADO.NET INTERVIEW QUESTIONS AND ANSWERS PART ONE

ADO.NET INTERVIEW QUESTIONS AND ANSWERS PART TWO

You can also learn the concept of frame work concept in detail with questions and answers in the following place.

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART ONE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART TWO

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART THREE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART FOUR

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART FIVE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART SIX

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART SEVEN

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART EIGHT

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART NINE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART TEN

No comments:

Post a Comment