CodeByte

Write your code smartly

Category Archives: Visual Studio

Get Current Location of Windows Phone Device

Hello,

Today this post will give you an idea about , how you can get the current location of your Windows Phone device. This can be easily achieved by using `GeoCoordinateWatcher` class under the namespace using System.Device.Location;
Here is the code by which you can get the Longitude and Latitude values of the device location.geoimage

This code gets the current position of Windows Phone device in the form of Longitude and Latitude. Using these values, many different Location features can be implemented such as distance finding between two locations , mapping the location on Bing and Google maps and more.

For any further query you can contact on below addresses:

Email: jkhan@programmer.net

Skype: jibrankhan1990

Add Ajax toolkit in Visual Studio 2010

Here i will share how you can include Ajax controls in your Visual Studio 2010 step by step.

First download Ajax toolkit from here and extract it.

1. Create a sample ASP.net web application project from file menu.

2. Your default.aspx page will be opened. Now go to toolbox on left side and open it.

3. Any where inside the toolbox right click on empty space and select add Tab.

4. Name the tab:”Ajax Toolkit“.

5. Now right click on the newly created tab and select “Choose items“.

6. The window opened will contain browse button click and locate your dll file of Ajax toolkit downloaded and extracted.

7. press open and Ok.

8. Now you can see all the tools and controls are listed inside the caption or tab you created.

9. for using Ajax toolkit controls you will have to add dll files in references.

enjoy here is the final look.

Must comment below its important for my future work !

Setup and Deploy your .Net application

Today I will step by step guide you how you can create a “msi” (Microsoft Installer) or “exe” file for your application, so your users can only download your setup file and install your created application.

Open Visual studio and select new project from file menu.In installed templates on the left you will see “other Project types” under that ==> Setup and deployment and ==> Visual studio installer. After that in project types select Setup project and name your setup project as your application name and press ok.You will see a the new project created in like this:

Now on your left you will see three folders displaying, Application folder, User’s Desktop and User’s Program Menu.

  • Application folder is the one installed on the drive of the user with the running “exe” of your application.
  • User’s Desktop shows here that your application will have a shortcut on user’s desktop or not.
  • And User’s program menu means that will there be a running “exe” shortcut showing up in the start menu or not.

Now setup or project. On application folder right click and Add==>File

Click on file and browse till your project’s folder ==> bin==>debug==> your “exe” file of the project. Remember it will be in (*.exe) format.

Also you have to add the required framework setup exe which is required to run your application. add similarly framework 4 setup if you have developed your application in .NET framework 4.0, add framework 3.5 setup if you have developed your application in .NET framework 3.5, and so on, in the application folder.

Select User’s Desktop folder and right click on the window showing on the right side of the project and ==> Create new Shortcut.

Click on Application Folder and press Ok. After pressing Ok you will see your added exe file , select it and again press ok. This will add the shortcut of your application in user’s Desktop folder. Similarly do it for User’s Program Menu.

One last thing is select your Application folder and in the property window set your Always Create Property to “True. Do this for User’s Desktop and User’s Program Menu also.

Now build your project by ctlrl+shift+b. You will find your msi file in the folder location of the this project where you created it or saved it.

Your feed back is more important for my future work 🙂

enjoy!

Design a site like this with WordPress.com
Get started