Windows Forms Dot Net Interview Questions it consists of set of interview questions which grabs the All levels from Intial Level to High Level definately it covers the potential stuff to all my viewers.
Windows Forms Dot Net Interview Questions all provides the list of all entitled elements which provides an integrity solutions to the all my aspirants.
"I Wish You All The Best...!To Crack Your Desired Position..."
Windows Forms Dot Net Interview Questions(68)
1.What
is the Base Class for inherit windows forms?
A)System.Windows.Forms.Form
2.What
is the use of IntializeComponent()?Is it Necessary?
A)Yes,it is necessary.It is used to
Invoke our Windows Form.
3.Can
we Invoke Button Click Event Code without clicking on button?
A)Yes it can be possible with
delegates
4.
What’s the difference between WindowsDefaultLocation and WindowsDefaultBounds? A)WindowsDefaultLocation
tells the form to start up at a location selected by OS, but with internally
specified size. WindowsDefaultBounds delegates both size and starting position
choices to the OS.
5.What
is Windows Service?
A) Windows Service is an set of
actions which automatically call by operating system irrespective of the user intervention.
E.G:Displaying Time at PC’s
6.What
is the template used for Windows Service creating?
A)Windows Service
7.What
is the command to install Windows service
A)Installutil ServiceName.exe
Installutil-u ServiceName.exe for uninstalling
We can type this commands in visual
studio command prompt.
8.What
is the Event Sequence of Button Control?
A)It should be in the following
hierarchy:
EnteràGotFocusàMouseDownàMouseUpàClick
9.What
is the Container Class for WindowsForm?
A)Form is the Container Class for
Windows Form
10.What
is the use of Opacity Property?
A)Opacity Property is used to set the
transparency of the control
11.What
is the property used for displaying window always top?
A)AlwaysVisibleTop property is used
to set true
12.What
is the class used for displaying shapes of an window?
A)Using System.Drawing
13.How
can we Close an Window through programmatically?
A)this.close
Or
Environment.Exit(0)
14.What
is the difference between Show() and ShowDialog()?
A)Show() is an modeless and
ShowDialog() is an model
15.What
is the use of autosize property?
A)This property is used to set
automatic size of an control accordingly.
E.G:if you consider a label it
default contains some width if you give some text default width exceeds we
manually increase the size instead of that if we set autosize property then it
automatically adjusts the size.
16.Can
we give Image for Button instead of an Text?
A)Yes by using “Image” property.
17.What
is the difference between anchoring and docking?
A)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.
18.What
is the Difference between Move and Location Changed?Resize and SizeChanged?
A)Both methods do the same.They are
language dependent names.
19.What
is the default event of an TextBox?
A) Checked Changed Event
20.How
can we restrict textbox without changing the data?
A)By setting “ReadMode” property to
true.
21.What
is the event used for restrict the test in TextBox?
A)KeyPress Event is used to restrict
the test in TextBox
22.What
is the Difference between TextBox and RichTextBox?
A)TextBox is used to accepts the data
dynamically enter by the user.Defaultly it can accepts single line data .
Rich TextBox is used to accepts the
data dynamically enter by the user.Defaultly it can accepts multi
line data .
23.Can
we create any control with out using tool box?
A)Yes by using the following
implementation.
E.G:
TextBox tb=new TextBox();
24.Can
we execute multiple buttons in Single Button Click Event?
A)Yes.
E.G:Button b1=(sender) as button;
25.How
can we add multilines in TextBox?
A)By using Multiline property.
TextBox1.MultiLine=true
26.How
can TextBox accepts password type text?
A)TextBox1.PasswordChar=’*’;
27.What
is the use of Masked Text Box?
A)It is used to accepts formatted
text as specified in the properties.
28.What
is the default event for MaskedTextBox?
A)TextRejection event
29.List
Some of the Component type of Controls?
A)Timer,ErrorProvider,BackGroundWorker,ImageList
etc…
30.Where
Component Controls are displayed at runtime?
A)Component Controls are displayed at
Component Tray at bottom of the Form at runtime
31.How
can you restrict the text in a textbox?
A)By using the length property in an
textbox and it can be applicable for richtextbox.
32.Name
some of the methods associated with the Rich Text Box?
A)For Copying of data
RichTextBox1.Copy()
RichTextBox1.Cut()
RichTextBox1.Paste()
RichTextBox1.Undo()
RichTextBox1.Redo()
are some of the methods associated
with rich text box.
33.What
is the Use of Tool Tip?
A)Tool Tip provides the description
for a particular control.It provides a glance of an control.
34.Define
Windows Form?
A)Windows Forms provides
GUI(Graphical User Interface) .It provides a properties,methods and events for
the controls it contains.
35.What
is an Event?
A)When an action is performed,this
action is noticed by the computer application based on which the displayed.
36.When
displaying fonts,what’s the difference between pixels,points and ems?
A)A pixel is the lowest-resolution point
which dot the computer monitor supports.Its size depends on users settings and
monitor size.A point is always 1/72 of an inch.An em is the number of pixels
that it takes to display the letter M.
37.List
Some of the Collection related Controls?
A)ListBox,ComboBox,ListView,TreeView
etc…
38.What
is the difference between ListBox and ComboBox?
A)In ListBox we have to choose one of
the option from the List.
In ComboBox just like radio button we
have to choose any one of the given option.
39.List
some of the methods in Collection related Controls?
A)It contains the following
Add()
Insert()
Remove()
RemoveAt()
These are the different types of
methods in collection related controls
40.What
is the namespace using for MessageBox?
A)System.Windows.Forms.MessageBox.Show
41.What
is the difference between Add() and Insert() methods?
A)Add(object o):This method is used
to add the item in to the container i.e either list or combobox etc..
Insert(int index,object o):This
method is used to add the item in an desired position.
42.How
can you Check all items in the CheckedListBox?
A)for(int
i=0;i<checkedListBox.Items.Count;i++)
{
checkedListBox.SetItemChecked(I,true);
}
43.What
is the difference between Listindex and Tab index?
A)Listindex:This property is used to
check the index value of the items in the ListBox.
Tabindex:This property is used to set
the flow of controls in the form when we press the tab button.
44.How
many number of events does Timer Controls?
A)2 events,one is disposed,second one
is tick event.
45.What
is the default event for Timer Control?
A)Tick
46.
Does a Timer control appear at run time?
A) Timer is a component; therefore,
it does not appear at run time.
47.When
Tick Event Fires or Raises?
A)Depends on Interval property
usually in (1000 milliseconds) we also flexibility to change the value.
48.How
Timer Control raises or Invokes?
A)By setting the property of Enabled=true.
49.Does a Timer Control appear at runtime?
A)No timer cannot appear at
runtime.It is an component
50.What
is the Use of ProgressBar Control?
A) ProgressBar Control is used to display
the progress status to the user.
51.What
the important properties of ProgressBar Control?
A)Minimum,Maximum,Increment
52.What
does DialogResult property of Button Control infer?
A) DialogResult property retrieves or
sets a value that is returned to the parent form when the button is clicked.
53.Which
method provides the functionality to display a dialog box at runtime?
A)ShowDialog() method is used to
display the dialog box at runtime.
54.List
some of the Dialog Results?
A)Color Dialog
Font Dialog
FolderBrowser Dialog
OpenFile Dialog
SaveDialog
Print Dialog etc..
55.
What does the OpenFile() method of the OpenFileDialog control do?
A) The OpenFile() method opens the
file selected by the user with read-only permission. The file is specified by
the FileName property.
56.
What is the function of MinDate and MaxDate properties of the MonthCalender
control?
A) The MinDate and MaxDate properties
allow users to get and set the minimum and maximum allowable date.
57.
What does the Checked property of the DateTimePicker control do?
A) The Checked property holds either
true or false value. It holds true, when the Value property hold a valid
date-time value and is updatable; otherwise, false.
58.
What does the Checked property of the DateTimePicker control do?
A) The Checked property holds either
true or false value. It holds true, when the Value property hold a valid
date-time value and is updatable; otherwise, false.
59.How
many ContextMenuStrip in a form have?
A)Many as per the requirement.
60.How
many MainMenuStrip in a form contains?
A)Only one
61.
What is the difference between a MenuStrip control and a ContextMenuStrip
control?
A) The difference between a MenuStrip
control and a ContextMenuStrip control is that a MenuStrip control is associated
with the Windows Form.whereas, a ContextMenuStrip control is associated with a
control, which is added to the Windows Form.
62.
What is the use of a toolstrip container?
A) A toolstrip container is used to
contain controls, such as ToolStrip, MenuStrip, and StatusStrip, so that these
controls can be docked and moved at the run time.
63.
How can you display an icon at runtime on the StatusStrip control?
A) The following code snippet shows
the code to display an icon at runtime on the StatusStrip control:
toolStripStatusLabel2.Image =
Bitmap.FromFile("D:\\Indiabix\\Images\\1.bmp");
64.
Consider a situation where you have added panels in a StatusBar control;
however, they are not displayed at run time. What could be the reason for this?
A) To display panels in the StatusBar
control, the ShowPanels property needs to be set to true.
65.
What is the difference between the Panel and GroupBox control?
A) The Panel and GroupBox controls
both can be used as a container for other controls, such as radio buttons and
check box. The main differences between a Panel and a GroupBox control are as
follows:
Panel does not display captions,
while GroupBox do
Panel has scrollbar, while GroupBox
does not
66.
What is the use of the Panel control? Does it display at runtime?
A) Panels acts as a container to
group other controls. It is an important control, when you want to show/hide a
group of controls and relocate a number of controls simultaneously.
67.Which
control cannot be placed in MDI?
A)The controls that do not have
events.
Another MDI Container.
68.What
is the Use of MDI?
A)It is used for maintaining multiple
number of forms.
When you generate a new control at
runtime, it works as a container control. As we know, it is a container
control; therefore, it is not displayed at runtime.
0 comments:
Post a Comment