Search This Blog

Tuesday, June 30, 2009

Supporting .Net with NSIS installer

Creating a .NET bootstrapped installer using NSIS - Article on boot strapping .net framework installer using NSIS.

Get .NET Version retrieves the latest version of the .NET runtime library installed on the user's computer

How to Automatically download and install a particular version of .NET if it is not already installed.

Annotating Images in C#

C# Snippet Tutorial - How to Draw Text on an Image

Example:

Bitmap myBitmap = new Bitmap("C:\\myImage.jpg");

Now that we have a Bitmap object we can get a Graphics object from it. The Graphics object will be doing all of our text drawing.

Bitmap myBitmap = new Bitmap("C:\\myImage.jpg");
Graphics g = Graphics.FromImage(myBitmap);

We can now use this Graphics object to perform all of our drawing. Let's start by simply placing some text in the upper left corner.

g.DrawString("My\nText", new Font("Tahoma", 40), Brushes.White, new PointF(0, 0));


My sample code:
PictureBox image = sender as PictureBox;
Graphics g = Graphics.FromImage(image.Image as Bitmap);
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
g.DrawString("1", new Font("Tahoma", 50), Brushes.Yellow, new PointF(0,0);



Tuesday, June 23, 2009

SkyDrive .Net API Client

CodePlex:SkyDrive .Net API Client

Project Description

SkyDrive .Net API Client allows developers to easily integrate Microsoft's Windows Live SkyDrive online storage and sharing services into their own applications. It's developed in C# using .Net 2.0.

What is this?

This project is an open source client for Windows Live SkyDrive written for the Microsoft .NET Framework. This is NOT an offical, Microsoft API (and to be honest, it's not a true API)! However, this library will greatly facilitate the development of 3rd party applications for developers already familiar with the Microsoft .NET technology stack.

How does it work?

At the time of this writing, as far as I know, there is no official API to use for SkyDrive. SkyDrive Client uses the same communication protocols as a web browser: it's requesting HTML pages, parsing them (thanks Html Agility Pack project) and posting back HTML forms filled appropriately. Consequently, SkyDrive WebClient heavily depends on the design of SkyDrive's HTML pages, even small design or structural changes could easily break partially or completely this library - please keep this in mind when you are about to use it in critical/billable projects!.

How to use it?

Check the samples delivered by the source code for examples.
Additionally, you can check related project Total Commander SkyDrive File System Plugin.

SkyDrive API

From Micrsoft's site:

These Community Technology (CTP) APIs have been deprecated. For the latest information on Live Service APIs, please see http://dev.live.com.

Community Technology Previews are designed to shape our technology by giving developers early access, allowing them to “kick the tires,” and provide us valuable feedback. CTP releases explicitly do not allow for use in production-style environments (see terms). This allows us to get our offering right before we have customers bet their businesses on us. We apologize for any inconvenience deprecating these specific CTP APIs has caused.

Saturday, June 13, 2009

Delete Orpaned Network Share

Found this link- Unmap Disconnected Network Drive

Under the key
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\MountPoints2]look for an entry like this ##SRV02#C which is the way \\SRV02\C is shown.Delete that key. Then log off and on again or reboot.