C#- VB.NET Winforms Interview Questions and Answers - 1

Question: 1

How is anchoring different from docking?

Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form.

Docking treats the component location as absolute and disregards the component size.

So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.

Question: 2

Write a simple windows Forms Message Box statement?

System.Windows.Forms.Message Box.Show (“Hello, Windows Forms”);

Question: 3

Define anchoring?

It allows controls to stay at a fixed distance from the side of the container, even when the control is resized.

Question: 4

Define docking?

It allows controls to extend themselves along the sides of their container (Form). When parent containers are resized, all controls move.

Question: 5

What is called intelligence feature?

It is an extremely useful feature in Visual Studio 2005.

This as you type the code, provides a list of options for making language references easily accessible and helps you in finding the information you need.

Related Questions