Coding

CSS Rounded Corners That Really Work in IE and Firefox

Posted by Joel 28 October, 2009 (1) Comment

For any web design rounded cornered rectangles add a touch of professionalism and beauty. Unfortunately most methods using either JavaScript or layered images do not work very well on all browsers as expected by the designer or the user.

Finally there is a nice method which works very well with IE7+ and Firefox 2+ perfectly, this is in fact by using CSS3 where 4 rectangles are layered one above the other to emulate a rounded corner and this method unlike others works perfectly with most browsers, although I haven’t tested it with IE6.

Let’s Get Started.

Now we will be adding four rectangles (or lines whatever you wish to call them) which overlap each other, when combined they give the effect of a rounded corner. Now I will give you a small sample which will explain you what I’m trying to say properly.

Read the rest of this entry

Categories : Blogging, CSS Tags : , , , , ,

Pan, Zoom & Rotate Images With WPF using C#

Posted by Joel 24 September, 2009 (3) Comment

WPF is a awesome tool for the person who wants his software to look good. So many effects as well as animations can be applied in WPF. Today I’m going to talk about how to have  UI which will allow a user to rotate zoom and pan an image within a WPF application.

Now lets get started by creating a wpf application, now your newly created application will have a window and a grid inside the window. See the below XAML

<window x:Class="PanandZoom.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="600" Width="800">
    <grid>
    </grid>
</window>

Inside the gird we created lets create two rows, one row will hold the slider for the rotation and the other row will hold the image which we will be playing with add the following snippet inside the <grid></grid> in the XAML.

Read the rest of this entry

Categories : C#, Coding, WPF Tags : , , , , ,

Sending Mail Using C#

Posted by Joel 14 September, 2009 (0) Comment

Sending mail in PHP is pretty easy, all you need to do is check if your Linux server (if that’s what you are running) has email capability. However in .net you need SMTP server host to send mails, so here is a easy tutorial as well as source code to send mails using C#.

Prerequisites

To test your code properly, you must have an SMTP host, either running in your local machine or a remote server.

Lets Get Started

So lets get started, first of all lets look at the namespaces we will be using, please note that we will be using System.Net.Mail and not System.Web.Mail, System.Web.Mail is an outdated class. So here is the list of namespaces we will be using.

using System;
using System.Collections.Generic;
using System.Web;
using System.Net.Mail;
using System.Text;
using System.Collections;

Read the rest of this entry

Categories : C#, Coding Tags : , ,