client4.png

Knowing Visual Studio for absolute beginners

Today we will be discussing Visual Studio 2013. Microsoft Visual Studio has a very important role in making developers’ life easy and it is irritating to work on other IDE’s if someone like me is addicted to Visual Studio environment. This is a very big topic that will be covered in many articles but if you are looking for the very basics then you have come to the right place.

So let’s get started with familiarizing ourselves with MS Visual Studio 2013

Programming Languages Support:

If you have VS 2013 Ultimate installed, go to “file” in menu bar, select “New” and then select “New project”; you will see variety of languages in which you can work and complete your work.

Some of them are:

  • Visual Basic
  • Visual C#
  • Visual C++
  • Visual F#
  • JavaScript
  • Python

projects

Project Types:

For every single language you have multiple types of projects that help programmers by auto generating code structure. For example, for Visual C#, you can make:

  • Console Application
  • Form Application
  • Class Libraries
  • WPF Application
  • ASP.Net Web Application and many more

Once you have selected you desired programming language and its project type, you have to enter project name, location and solution name. “Location” indicates the path on your storage device where your project will reside and “Solution name” is the name of workspace (called solution here) in which you can make multiple projects. Once all the information is entered, click “ok” so that visual studio will set your working environment ready according to your selected options.

Solution Explorer:

Now your screen is divided into multiple blocks. The main area (text editor) is the area where you write code. You have “Solution Explorer” on the right side; if not, go to “View” and select “Solution Explorer” or press “Ctrl + Alt + L” in windows. “Solution Explorer” has the complete directory and file wise view of your project. That is, the top most thing is your solution (workspace) under which there are projects and under projects there are files of that project.

Whenever you add file in your project without visual studio, that is using file explorer, you have to refresh the solution explorer.

solution explorer in visual studio

By right clicking on the project you can see a list of options including:

  • Building project
  • Cleaning Project
  • Adding new files in project
  • Adding new instance of Solution explorer
  • Loading/Unloading project
  • Deleting/renaming project
  • Opening project in file explorer
  • Opening in Blend if supported and many more

Screenshot (76)

 

Inside the Text Editor:

Now in the code area you can do many things, out of which few are listed below:

  • You can add “break point” on any line of code by double clicking in the left most bar in the IDE (Integrated Development Environment) or the code area and a red dot will appear as shown in the screen shot below. This red dot means that when you run the code in debug mode, it will stop at this line and then you can debug the code line by line by pressing F10 (step over). For going into the function call or some thing related to it, press F11 (step into) and for moving out of the function definition, press shift + F11 (step out). The major benefit of it is that you can see the values of every variable used in the bottom panel or by just hovering the mouse pointer over the variable whose value you want to check. You can also change the value at run time for testing purposes. While debugging, on the right side, you will see “IntelliTrace” which is the stack for all the exceptions and other related event triggers.
  • By right clicking on any function and selecting “Go to Definition”, visual studio opens the definition of the function for you.
  • You can select one word in the code and visual studio will highlight all the words matching it in the code file for you and you will know where that word is being used.
  • You can email the code snippet by right clicking and selecting “Email code snippet”.
  • You can insert snippet (like if statement, for loop, while loop, foreach loop etc.) by right clicking anywhere in the code area and selecting “Insert Snippet” and then selecting your desired snippet.
  • You can also surround the selected code structure by right clicking, selecting “Surround with…” and then selecting your desired snippet (for example, surround it with if condition, try catch block, for loop etc.).

MS Visual Studio Productivity Power Tools

Productivity Power Tools is a set of extensions for visual studio professional and above to improves developers’ productivity. You can download it here. Once you have installed it, you will find it under “Tools”, under “Options” and under “Productivity Power Tools”. It has about 19 different extensions in it. Few of them are listed below:

  • Ctrl + Click Go to Definition
    • By doing this a dialogue box will open which will include the details about the work you clicked.
  • Peek Help
    • By right clicking and selecting peek help, it will open relevant section for you from MSDN website.
  • Solution Explorer Errors
    • Enabling this extension will help you detect errors by underlining the project and the file that have an error in it. And by hovering on the file in solution explorer it will give you the immediate response and show you the line number and the error it contains.
  • Double click to maximize window
    • By double clicking on any of the windows, you can maximize it and by double clicking again,you can restore it to its original size.
  • Match Margin
    • By enabling this extension, you will be able to match margins on the left side of your code editor area. It will help you to reduce scrolling and by just hovering on the line it will show you the header of that block.

This is it for today. I hope you will find this article helpful. For any queries, please comment.
Thank you for reading.

read more
Danyal MalikKnowing Visual Studio for absolute beginners
angle-v4.png

Making MultipartForm HttpClient request from Windows Phone 8.1

Hey Everyone, today  m going to tell you how to make a MultipartForm HttpClient  request from C# or in simple words you can say that “to send a multiple Post actions to a web in one httpclient request ”

 

so lets get started.

  • First of all make instance of HttpClient and set base address
read more
Danyal MalikMaking MultipartForm HttpClient request from Windows Phone 8.1
tumblr_mx3tpto69r1st5lhmo1_1280.jpg

Social Scheduler

Social scheduler is a application which is on windows store 8.1

Social scheduler will help you to post the statuses and images on Facebook immediately, you can capture photos using webcam and you can also post them in scheduled manner e-g you can set timer for it to post on that specific time (Like to wish someone a birthday).

you can also see you statuses both posted and pending on this application without going to the actual Facebook web site.

Using the Application

Click “Add Account” button and sign in to your Facebook account.

Social Scheduler

Click post status button to post status on your wall now or scheduled for later.
All status in the status box
To attach photo turn the “Attach photo” toggle switch ON
You can add image by clicking on “Select photo
You can also capture live photo from webcam by clicking “Capture live
To post status immediately click the “Post” button
Or if you want your post to be scheduled for later turn “Schedule post” toggle switch ON
Select the date and time for your post. Note: time must be greater than 15 minutes.
Click “Post” button to submit for posting.

// post photo

Go to Dashboard by clicking “Dashboard” Button from main menu
Your statuses from your wall are fetched here under the “Recent Statues” heading.
and the statuses that you have submitted for later posting are under the “Pending Statuses” heading.

// dashboard

Download:

You can download this application from windows store here

read more
Danyal MalikSocial Scheduler
s2-macbook.png

Ninja Kid

Go for your challenge in Run Ninja Run 3, the new sequel of the amazing, gripping distance game by Pyrozen. Help the dauntless ninja to make his way out of hostile territory while cruel enemies and dangerous carnivores are hunting you. Use collected gold to upgrade your continuously running warrior and wipe out attackers to survive. Much fun!

read more
Danyal MalikNinja Kid
angle-v8.png

Benefits of C#

There are quite a few benefits to using C#, we won’t list every single one of them but we will cover the most notable benefits.

1. Strict Typing
Variables have to be declared with a datatype using C#, so if you create a variable called health which will contain the characters health it will have to be given a datatype (for example an integer for a whole number). If you declare a variable as an integer you will not be able to insert anything other than integer numbers into the variable.

read more
Danyal MalikBenefits of C#
img-7-1200x600.png

This theme is so nice!

You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don’t know exactly when we turned on each other, but I know that seven of us survived the slide… and only five made it out. Now we took an oath, that I’m breaking now. We said we’d say it was the snow that killed the other two, but it wasn’t. Nature is lethal but it doesn’t hold a candle to man.

read more
This theme is so nice!

Donec accumsan commodo vehicula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sit amet dolor ac sapien elementum dignissim sed at purus. Phasellus imperdiet non arcu in pulvinar. Aliquam sit amet justo vel purus eleifend consequat vitae nec felis. Vestibulum pretium, est ut mattis aliquam, lorem nisi semper augue, in malesuada est velit eu mauris.

Quote Post
AsimQuote Post
  • img-5-1200x600.png
  • img-2-1200x600.png

It is cool & responsive!

You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don’t know exactly when we turned on each other, but I know that seven of us survived the slide… and only five made it out. Now we took an oath, that I’m breaking now. We said we’d say it was the snow that killed the other two, but it wasn’t. Nature is lethal but it doesn’t hold a candle to man.

read more
AsimIt is cool & responsive!
img-1-1200x600.png

It is so cheap!

Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that’s what you see at a toy store. And you must think you’re in a toy store, because you’re here shopping for an infant named Jeb.

read more
It is so cheap!