Thursday, June 19, 2008

Develop the User Interface!

Adding controls and polishing the user interface is as easy as dragging and dropping with the Visual Studio IDE. Lets add a picture your dad likes to the form.

1.Use the PictureBox Control to add a picture.

Click on the PictureBox control in the ToolBox, and drag it onto your form. In the background, the IDE has added code to Form1.Designer.cs for a new picture control.

second

2. Set the PictureBox to Zoom mode

Every control on your form has properties that you can set. Click the little black arrow for a control to access these properties. Change the PictureBox's Size property to "Zoom" to see how this works!

3. Now Insert the Picture:

Now to insert your Dad's favourite Picture, click on the PictureBox properties arrow and select Choose Image. Click Import, find your picture on the hard drive and you're all set!!!

fourth

Visual Studio, Behind the Scenes!

Every time you do something in the VS IDE, the IDE is writing code for you! When you inserted the picture and told the Visual Studio to use the image from your hard disk, VS created a resource and associated it with your application. a resource is any graphics file, audio file, icon or other kind of data file that gets bundled with your application. The graphic file gets integrated into the program, so that when its installed on another computer, the graphic is bundled with your application. The graphic file gets integrated into the program, so that when its installed on another computer, the graphic is installed along with it and the PictureBox can use it.

When you dragged the PictureBox control onto your Form, the IDE automatically created a resource file called Form1.resx to store that resource and keep it the project. Double click on this file on the Solution Explorer tab and you'll be able to see the newly imported image!

Add to the Auto-Generated Code!

The IDE creates a lotta code for you, but you'l still want to get into the code and add to it! Let's set the picture and show an About message when the users double click on it.

Make sure you've got your form showing in the IDE and double click on the PictureBox Control. You should see some code pop up that looks like this:

sixth

You are ready to run your application!

Press F5 to run your application or click the green arrow button on the toolbar to check out what you've done so far. This is called Debugging which just means running your program from the IDE. You can stop the debugging by pressing the Stop Debugging from the Debug menu or clicking the toolbar Stop button.

seventh

Yay!! We've built a form and created a PictureBox which pops out a message box when its clicked on! In the next post, we'll add all the other fields from the card like contact name and address and for that we need to create a database. So, we're going to jump from the .NET Visual objects straight to the Data Storage section!!

56 comments:

--xh-- said...

good going.. :)

lotto 649 said...

To the owner of this blog, how far youve come?You were a great blogger.

Anonymous said...

nice blog isnt it?


loansrestructuring

online lottery said...

Considering the fact that it could be more accurate in giving informations.

Anonymous said...

viagra rx female use of viagra which is better cialis or viagra which is better cialis or viagra viva viagra song new viagra viagra for sale without a prescription instructions for viagra use buy sublingual viagra online can viagra causes legs to ache can women take viagra levitra vs viagra soma and viagra prescriptions free viagra viagra pill

Anonymous said...

Best Online Casinos tyuueooru
Free Casino Bonus
In fact, there is no risk at all.
[url=http://www.nhgaa.org/]Best Online Casino[/url]
So, it is vital to be able to find a right online casino website for you if you don't want your online gambling experience to be annoying and regretting.
http://www.nhgaa.org/ - Free Online Casino
For this purpose, you may require checking out the lists of good gambling websites that are offered on various sites in the form of ratings, reviews, etc.

Anonymous said...

Tough of carry the day Our Unclear Prices at www.Pharmashack.com, The Famed [b][url=http://www.pharmashack.com]Online Dispensary [/url][/b] To [url=http://www.pharmashack.com]Buy Viagra[/url] Online ! You Can also Unexpected Prominent Deals When You [url=http://www.pharmashack.com/en/item/cialis.html]Buy Cialis[/url] and When You You [url=http://www.pharmashack.com/en/item/levitra.html]Buy Levitra[/url] Online. We Also Number a Lowering Generic [url=http://www.pharmashack.com/en/item/phentermine.html]Phentermine[/url] Pro the extra of Your Victuals ! We Rig elsewhere M‚echelon look at [url=http://www.pharmashack.com/en/item/viagra.html]Viagra[/url] and Also [url=http://www.pharmashack.com/en/item/generic_viagra.html]Generic Viagra[/url] !

Anonymous said...

Hi Guys,Just registered here and looking to have a great time. I am looking for the best cash gifting program out there in the internet. Can you guide me?

Below are some sites that I found and I am not sure how much they are going to help me.
[url=http://www.squidoo.com/Residual-Cash-Forever-Cash-Gifting-System]cash gifting[/url]
[url=http://www.squidoo.com/Residual-Cash-Forever-Cash-Gifting-System]join cash gifting[/url]
[url=http://www.squidoo.com/Residual-Cash-Forever-Cash-Gifting-System]best cash gifting program[/url]

Anonymous said...

It isn't hard at all to start making money online in the undercover world of [URL=http://www.www.blackhatmoneymaker.com]blackhat money making[/URL], Don’t feel silly if you don't know what blackhat is. Blackhat marketing uses little-known or misunderstood ways to produce an income online.

Anonymous said...

hi every person,

I identified geekunderconstruction.blogspot.com after previous months and I'm very excited much to commence participating. I are basically lurking for the last month but figured I would be joining and sign up.

I am from Spain so please forgave my speaking english[url=http://submityournewsck.info/forum].[/url][url=http://mothehottesttopics.info/forum].[/url][url=http://grcoolnewideas.info/forum].[/url]

Anonymous said...

It is my first post here, so I would like to say hallo to all of you! It is really comfort to join your community!

Anonymous said...

this is very good for you, ybg :)

Anonymous said...

torebki skórzane
to torebki , torebki damskie , torebki batycki . torebki skórzane damskie , kazar sklep internetowy ?

Anonymous said...

david jones
to david jones , david jones , . torebki david jones , ?

Anonymous said...

projektowanie wnetrz warszawa
to projektowanie wnetrz warszawa , projektant wnetrz , . projektowanie wnetrz , ?

Anonymous said...

Поздравления с днем святого Валентина sms
[url=http://idimka.ru/pozdravlenie_%D1%81_day_%D1%81%D0%B2%D1%8F%D1%82%D0%BE%D0%B3%D0%BE_valentina]Поздравления с днем святого Валентина[/url]
Поздравления с днем святого Валентина

Anonymous said...

cheap xanax what is xanax 0.5mg - xanax drug for sleep

Anonymous said...

generic viagra viagra 25mg - order viagra professional

Anonymous said...

generic viagra viagra online legal - buy viagra us next day delivery

Anonymous said...

viagra online without prescription purchase female viagra online - viagra online no script

Anonymous said...

buy soma online do soma pills expire - soma 180 pills

Anonymous said...

soma price soma cost street - soma san diego silversun pickups

Anonymous said...

soma 350 mg soma drug slang - soma muscle relaxer street price

Anonymous said...

buy soma online soma muscle relaxer medication - do drug test test soma

Anonymous said...

buy soma soma drug news - buy soma us

Anonymous said...

buy soma soma 250 drug interactions - dosage for soma muscle relaxant

Anonymous said...

soma muscle relaxant buy soma online cod - buy soma online

Anonymous said...

soma carisoprodol soma brand vs generic - where to buy soma online

Anonymous said...

soma buy ver argento soma online - valium and soma drug interactions

Anonymous said...

buy cialis cialis online to usa - reviews viagra cialis levitra

Anonymous said...

buy cialis online generic cialis walmart - buy cialis online usa

Anonymous said...

tramadol 50mg tramadol 50 mg hcl narcotic - buy tramadol online usa

Anonymous said...

buy cialis online cialis online overnight - cialis daily available nhs

Anonymous said...

buy xanax online no prescription overnight street value for xanax 1mg - xanax generic no prescription

Anonymous said...

xanax drug pictures of xanax generic pills - xanax withdrawal when does it start

Anonymous said...

tramadol 50 tramadol hcl snorting - tramadol 50mg tablets identification

Anonymous said...

buy tramadol buy tramadol with a mastercard - tramadol hcl 25mg dogs

Anonymous said...

buy carisoprodol soma carisoprodol same - many carisoprodol overdose

Anonymous said...

buy tramadol buy tramadol online us pharmacy - can you buy tramadol

Anonymous said...

xanax online xanax bars drug test - can you order xanax online

Anonymous said...

generic xanax xanax bars definition - xanax used opiate withdrawal

Anonymous said...

buy tramadol how tramadol addiction is treated - what is better tramadol or ultram

Anonymous said...

xanax online xanax 1 mg apteka - xanax effects

Anonymous said...

buy cialis online order cialis in usa - xlpharmacy generic cialis

Anonymous said...

order cialis online no prescription cialis coupon 30 tablets free - buy cialis online in australia

Anonymous said...

cialis online cialis daily free sample - cialis how it works

Anonymous said...

xanax online buy xanax online cod - generic xanax thailand

Anonymous said...

learn how to buy tramdadol tramadol hcl 25mg dogs - get over tramadol addiction

Anonymous said...

http://buytramadolonlinecool.com/#73892 tramadol withdrawal can't sleep - tramadol er 100mg side effects

Anonymous said...

http://buytramadolonlinecool.com/#28875 tramadol hcl 100mg er - tramadol 325 mg dosage

Anonymous said...

http://landvoicelearning.com/#57594 tramadol headache - buy tramadol online prescription

Anonymous said...

buy tramadol online buy tramadol online australia - buy tramadol without prescriptions

Anonymous said...

klonopin medication klonopin and alcohol fun - klonopin online overnight

Anonymous said...

klonopin cost klonopin .125 wafers - hydrocodone klonopin erowid

Anonymous said...

http://southcarolinaaccidentattorney.com/#31862 carisoprodol dosage erowid - carisoprodol vs soma

Anonymous said...

http://southcarolinaaccidentattorney.com/#61879 carisoprodol vs soma - carisoprodol 350 mg dan