Dot Net WindowsForms Interview Preparation Guide

Sharpen your Dot Net WindowsForms interview expertise with our handpicked 21 questions. Our questions cover a wide range of topics in Dot Net WindowsForms to ensure youre well-prepared. Whether youre new to the field or have years of experience, these questions are designed to help you succeed. Get the free PDF download to access all 21 questions and excel in your Dot Net WindowsForms interview. This comprehensive guide is essential for effective study and confidence building.
Tweet Share WhatsApp

21 Dot Net WindowsForms Questions and Answers:

1 :: How to get records from a database?

You have to get the "dotnet driver" of the database (or any
other datasource) you want to access to.

For example:
MySQL: Connector/Net
Access: Microsoft Access Driver
Oracle: Oracle Data Access Components (ODAC)

Afterwards you build a connection string to tell your
programm which driver you want to use and where the
datasource can be found, for example:

public const string DB_CONN_STRING =
"Driver={Microsoft Access Driver (*.mdb)}; "+
"DBQ=D:\\CS\\TestDbReadWrite\\SimpleTest.mdb";

Afterwards you just have to open a connection to the
database using the previously created connection string and
send a query to the database to get the record:

ADOConnection conn = new ADOConnection(DB_CONN_STRING);
conn.Open();
ADODataReader dr;
ADOCommand cmd = new ADOCommand( "SELECT * FROM <table>",
conn );
cmd.Execute(out dr);
while (dr.Read()){
....}
Download PDFRead All Dot Net WindowsForms Questions

2 :: How barcode create in the report?

Its very easy.
1-Take a barcode font like we used Arial, Time new Roman
2-Install this font at window fonts directory
3-Use Steric (*) at both ends of a field of Report with the
help of double/single commas
4.Change this field Font Like from Time new roman to
Barcode font
e.g Bar is field that contain digit from 1 to 8 as shown
below
*12345678*
After changing font these digit were converted into Black
Lines mean barcode
|||||||||||||||

5-Take print of barcode and enjoy.

3 :: How save rerecord in the database?

Dim Query
Query="insert into TableName(username)values('" &
txt_username.text & "')"
Dim cmd as sqlclient.sqlcommand=new
sqlclient.sqlcommand(Query,connection)
cmd.ExecuteNonquery()

4 :: How insert record in the database?

insert into <tablename> values (Parm1,parm2....)

5 :: What are the new events in textbox that has been included in VB?

validate event to cntrl
Download PDFRead All Dot Net WindowsForms Questions

6 :: What is the Difference between listbox and combo box?

In List Box we have to choose one of the option from the
drop down list
In Combo just like radio button we have to choose any one

7 :: Which property of menu cannot be set at run time?

Item property cannot be set at runtime.

8 :: What is the difference between Listindex and Tab index?

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.

9 :: What is the need of z-order method?

Z order method is the use of the show the design of the
output form to use z order technique.
z order technique is Show view of the Z corner to print the
z style.
Z order is Access the data in the two dimension Array to
access data
Ex:
1234
5678
9065
call Z order method to pass order For ex: pass 3
then output is
1396 to Access four corner of the z order

10 :: Which property is used to lock a textbox to enter data?

TextBox.Enabled = True;

This property is used to lock the text box to enter data.
Download PDFRead All Dot Net WindowsForms Questions