Showing posts with label c#. Show all posts
Showing posts with label c#. Show all posts

Friday, October 14, 2011

Validation in windows application in C#

Whenever we create an application, some forms need specific entries. For example, phone numbers must be all numeric, whilst email ID must have a @ symbol followed somewhere by a . symbol. For these purposes, no automatic validators are provided for windows applications. Hence, we must manually give validations to these fields.

There are many logical routes to valication. The following is the validation code that I follow. Hope it helps you too. In case of any doubts or suggestions, kindly feel free to comment or mail me at nardz07@gmail.com.


Tuesday, October 11, 2011

Add a Splash Screen to Your C# Windows Application Project


How to create a splash screen in C#

Tutorial: How to create a splash screen in C#
Time: 5 minutes
Experience needed: Basic understanding of Threads and the flow of applications

In this tutorial you will learn how to create an application that displays a splash form for x seconds.
The benefits for this are: if you have a form that takes a while to load up (for insastance one that does a lot of Database interaction) the user will sit there wondering why your app is not open yet.

With a splash screen you can give the user something pretty to look at to keep them happy.

Friday, October 7, 2011

Connecting a Database II

In the last edition I showed how to define a connection string. i.e. How to tell the application the type and location of said database. Here I shall detail how to use said string in the coding. Please feel free to comment on my posts with your doubts and suggestions or mail me at nardz07@gmail.com.


Saturday, October 1, 2011

Connecting a database I

Any application that needs to store or retrieve data, needs to use databases. Since we developers make the application layer, it is for us to connect the application to the database and to provide the queries to affect the data.

Here is what little insight i can provide into the databases and their connecting schema. For any suggestions or doubts, please contact me at nardz07@gmail.com.

First and foremost, databases may be operating system dependent, like MS ACCESS and SQL SERVER, or independent like ORACLE or MYSQL.


In this post, let us simply look at these databases and how to define a generic database connection using the MS Visual Studio tools.

Friday, September 30, 2011

Uploading a picture at runtime

I was trying an addressbook application, and then it struck me... wouldn't it be awesome, if we could add pictures to each entry, so one can also look at a contact? The following is the coding for uploading a picture into a PictureBox using open file dialog control. For any doubts, or suggestions, please mail me at nardz07@gmail.com.

Here's the basic cs code - explained :


Thursday, August 18, 2011

Calculator

Hi guys. This is the first full fledged application i made using c# on MS visual studio 2008.

This is also the first application on which i tried setup and deployment. If you have any doubts on the logic in the coding, please mail me at nardz07@gmail.com.

Here's the basic cs code for you: