Deprecated APIs In .NET 4.0

by Prashant 20. July 2010 20:10

A number of existing APIs are deprecated in .NET Framework 4.0. A complete listing of deprecated APIs in .NET Framework 4.0 can be found here at MSDN:

 

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: , ,

.NET Framework | API | Visual Studio

Build “Out of Browser” Applications with Silverlight

by Prashant 20. June 2010 18:30

If you think that Silverlight applications are only intended to be run on web browsers, then you are wrong! Silverlight is now widely used to build Rich Internet Application (RIA) allowing users to work more efficiently and make a working session more interactive and attractive. As we all know a customer will always seek for a short-cut method, he will never listen to your comments or suggestions and wants everything to be done in few mouse clicks. A lazy customer! You build an application with a lot of effort and upload it to the user or customer’s website. Now the customer wants the same application for his desktop - he doesn’t want to open browser and work. Writing the same application again for his desktop won’t help and will also waste a lot of development time, why can’t we make the same Silverlight application to run from his machine?

Silverlight gives you an option to install the Silverlight application from the browser to your desktop called “Out of Browser” application support. Consider if you have built a game on Silverlight and upload it to your blog/website allowing you reader or visitors to play the game. It’s not just the case with games but same can be done with applications or with some general web utility like URL shortening service using Bit.ly API.

To get started create a new Silverlight application in Visual Studio 2010.

Give the name to your application and click OK.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Design your application put the business logic in (if any). Once you are done designing and building the application go to the project properties. Click Project > APPNAME Properties. APPNAME represents the name of your application. In the project properties check the “Enable running application out of browser”.

Out-of-Browser Settings button will get enabled which will let you choose out of browser application settings.

The settings dialogue box is quite self-explanatory. You can set the name of the application which you want to put on the window when it runs out of the browser. You can also set the icon for you application in different sizes. Click OK to save settings.

Now, run you application. You will see your Silverlight application running inside your browser. If you want the application to run out of the browser then right-click anywhere in the browser and click “Install <APPNAME> onto this computer”.

This will prompt you to install the application and place the application icons on your desktop or on your start menu or both. It will give your application the default application install icon. If you have set your own in the Out of Browser Settings then you will see your icon.

 

Now your Silverlight application is on your system and can be executed at user’s desktop. Check out the same demo here. It's just a demo anyway!

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: ,

Silverlight | Visual Studio

How To Build UAC Compatible Application In .NET

by Prashant 24. May 2010 06:01

We all know about a feature called User Account Control (UAC) which introduced with the launch of Windows Vista. By default, UAC is enabled and provides users a better and safer computing experience, but most of the users find it irritating when the UAC prompts everytime they try to run a program. Disabling UAC is not recommended at all.

With UAC enabled programmers find it difficult to access some of the locations on the local drive. Programatically you cannot write or create a file or directory in root partition, inside Program Files, System32 folder and some other locations. Recently I ran into a same problem where I have to access System32 folder, create new folders and copy files from one location on my system to this folder. With UAC disabled this is pretty easy, no security settings and no runtime errors or exceptions. Usually you cannot ask the users to disable UAC and then use the application, so therefore I made my application compatible with UAC and YES!!! you will be prompted with the confirmation box to run the application with administrator privileges. In Windows Vista and Windows 7, even if you are an administrator of your machine you do not have the complete access to resources even if you are an administrator. So in order to make your application run with full administrator rights follow the steps below. This will work the same if you run your application with "Run as Administrator" option which you see when you right-click the application.

Create a new application in Visual Studio. Right-click project and add a new item.

From the Add New Item box select Application Manifest File.

In the manifest file un-comment the following line:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Build your applicaton....and when the build is complete you will see the security shield icon accompanying your application icon. A dialogue box appear in front of the user to run the application with full administrative privileges.

 

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: , , , ,

C# | Utils | Visual Studio | Windows 7

Visual Studio Theme Generator

by Prashant 24. March 2010 10:15

I just Got bored looking at the same code editor in Visual Studio. Same old white background and same syntax colour highlighting. So I give it a go and jump to Visual Studio options and start playing around with the option available to change the look and feel of the code editor. After trying for a while and working around with some customizations, I gave a second go and do a quick bing search in a hope that I will find some theme for my Visual Studio and Voila! I got one, not a theme but a tool indeed which allows me to customize theme as I want and the name is Visual Studio Theme Generator. It's an online free tool with some simple controls on the page which helps you in customizing your code editor by changing the main colour, background colour, foreground colour and also set he contrast. The tool also gives you the option to choose from a variety of colours. You can see the screenshot of this online tool below.

Make some customizations and click the Refresh button on the top right corner of the page to reflect the changes. Once you are finish with the customizations you can then hit the Create button to save you Visual Studio theme settings, save it to your local disk and import it using Import/Export settings wizard in Visual Studio.

I have downloaded the default theme from the page and here is how my Visual Studio code editor looks like now:

NOTE: You can read the detailed step on the website to import the settings. But before you can import the settings it is recommended that you first take the backup of your current/original Visual Studio settings. This tool is a work of javascript so before you hit it make sure you have javascript enabled for you browser.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: , ,

Utils | Visual Studio

ASP.NET MVC 2 Released

by Prashant 12. March 2010 23:33

Microsoft announced the final release of their second and popular ASP.NET MVC framework. This release comes up with some excellent features. Scott Gu's Blog Series on MVC 2 describes the new features and extensibility of this new release.

To list out some new features include:

According to Scott Gu the final release of VS2010 will have in-built support for MVC 2.

Recommend Reading:

Download ASP.NET MVC 2 final release for Visual Studio 2008 and Release Notes from Microsoft Download Center

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: , , ,

ASP.NET | MVC | Visual Studio

Powered by BlogEngine.NET 1.5.0.7
Visit blogadda.com to discover Indian blogs

Who am I?

Name of authorMy name is Prashant Khandelwal. I am a .NET programmer and technology enthusiast from New Delhi, India.

       

Tag Cloud

This will be shown to users with no Flash or Javascript.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2010

Creative Commons License