Database Driven Development And Developing The User Interface Using C#

Introduction

In this article, I will demonstrate database driven development and developing the user interface using Windows Form and C#.

step 1

Create new project in Windows Form application and save the project in AGContactDirectory.



Step 2

Select the Assemblyinfo.cs. It will generate the code like this,



Resource.resx window has strings default. For exmple you can put any images in your form, resource.resx will be changed to images.



Settings window is like this; it has default string type.



Step 3

Now, you click on the Form1.cs and click to view code icon. and drag the code window to your right side for your convenience.







Step 4

Click Form1.Designer.cs; the window is like this,

Designer window already generates the code. Small changes in your program will be generate the code.



Rename the Form1.cs to AGContactDirectory.



The Form name will be changed into AGContactDirectory.



Step 5

Click on the Form and go to the property and change the text into AG Contact Directory. The Designer code text will be changed.



Here, the name and Text will be changed.



Step 6

Click your Form and go to the property. select the start position. It has Manual, Center screen, windowsDefaultLocation,
windowsDefaultBounds and centerParent. Choose the centerScreen option.



Run your program; the output window will be displayed in the center of the screen.



Step 7

Choose the picture box, click the arrow and it will be displayed on PictureBox Task. Click the choose image option and import the image for your company logo or any image you want, click ok.



Change the size mode to zoom because the size mode is in default for Normal mode.





Step 8

Resource.resx window is changed into images.



Step 9

Click the image and go to the property window. Click Event; change the click event for _imglogo_click. The coding window will be displayed for _imglogo_click.



Write the coding for MessageBox it will display the contact directory.



Step 10

Run the program. The output will be displayed. When you click on the picture box, the contact directory will be displayed.



Summary

In this article, I discussed how we can create database driven development and develop the user interface using Windows form and C#. We also saw how we can put  in the picture box and how it's stored in resourece.resx and database driven developing.Ffinally we got an output for displaying the contact directory.

I hope in this airticle has helped you to understand database driven development.

Up Next
    Ebook Download
    View all
    Learn
    View all