Dot Net WindowsForms Interview Preparation Guide
Download PDF
Add New Question

Dot Net WindowsForms frequently Asked Questions by expert members with experience in Dot Net WindowsForms. So get preparation for the Dot Net WindowsForms job interview

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()){
....}
Post Your Answer

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.
Post Your Answer

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()
Post Your Answer

4 :: How insert record in the database?

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

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

validate event to cntrl
Post Your Answer

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
Post Your Answer

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

Item property cannot be set at runtime.
Post Your Answer

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.
Post Your Answer

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
Post Your Answer

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.
Post Your Answer
Add New Question