Step 1 Create new windows application ‘language does not matter C# or VB’
Step 2 Adding images in your resources: in solution explorer right-click on your application name >> then >> Properties >> then >> on your left hand click Resources >> then >> click Images >> then >> from the next icon ‘Add Resource’ choose ‘Add Existing Files ..’.
Step 3 Adding connection string in your application setting: like step 2 but here you will click on ‘Setting’ on your left hand, it is the second button bellow ‘Resources’ >> then >> you will see control like DataGrid, write what name you want to call your connection string, we can call it ‘con_Northwind’, from type select (Connection string), then on value field the wizard will help you to configure your connection easily.
Step 4 save your change and be ready for coding.
by the way I will give you the code in simple example that will help you to know how to read those values, on form1 load event write the following code, by the way code will change [icon form], [text form] and picture I have dragged from toolbox, and I will give it its Image by code.
VB code:
Me.Icon = My.Resources.heart
Me.PictureBox1.Image = My.Resources.cartoon_police
Me.Text = My.Settings.con_Northwing.ToString()
C# code:
this.Icon = CSharp_WinApp.Properties.Resources.heart;
pictureBox1.Image = CSharp_WinApp.Properties.Resources.cartoon_police;
this.Text = Properties.Settings.Default.con_Northwind.ToString();
Notes :
1- you can add pictures as many as you want.
2- You can choose icon, audio file or any type of files you want to use in your application.
I hope it was simple and clear enough for you.
No comments:
Post a Comment