Wednesday, May 21, 2008

Sending Email with ASP.NET & C#

There was a change in the .NET framework that took the System.Web.Mail class away and replaced it with System.Net.Mail.  Some of the documentation still points to the old method of mail and I always struggle to find the correct information.

I am including a link to Scot Gu's blog on the correct way to send an email using .NET with code examples in C#.

Thursday, May 15, 2008

OS X Collection of Keyboard Shortcuts

I can't take credit for this as it was originally put together in the newsletter Kibbles & Bytes by Small Dog Electronics. Enjoy as it contains some excellent information.

Mouse Clicks and Key Combinations for the Dock

Mouse Click
Clicking on an item in the dock brings the item forward or opens it if it is not already open. It also brings minimized windows out of the dock.

Control-click
Reveals the contextual menu for that item. Menu choices vary per application or file. When used on the dock separator, it reveals the dock preferences. There you can turn magnification and hiding on or off, change the position of the Dock on screen, and change the minimization effect. Choose Dock Preferences to see more options.

Command (Apple or Clover leaf key)-click
Shows you the location of the original item in the Finder.

Control-Option-click
Force Quit replaces Quit in contextual menu. Menu choices vary per application or file.

Command-Option-click
Hides other open items, in addition to click action. This one is particularly handy if you have a lot of windows open and want to "hide others" to work on a particular application.

Press
Reveals contextual menu for item. Menu choices vary per application or file.

Option-press
Force Quit replaces Quit in menu, in addition to press action.

Shift-click
This one is pretty cool. It applies to minimized windows only. The item is de-minimized in slo-mo. You can see items minimized in slow motion by pressing Shift while minimizing.

Shift-drag
When used on the dock separator, it changes the dock position on screen (left, bottom, right).

Option-drag
When used on the dock separator, it resizes the dock to common icon sizes (128 by 128, 64 by 64, 32 by 32, 16 by 16).

Command-Option-D
Hides or shows the dock. This is the equivalent of choosing Dock from the Apple menu and then Turn Hiding On or Turn Hiding Off from the submenu.

Working with the Dock

Moving Items Around in the Dock
You can drag items into any position you want in the dock as long as they are on the proper side of the dock separator.

Bouncing Icons in the Dock
Just like a child waving his or her hand in class for attention, an application will bounce in the dock if it requires your attention.

Grabbing Screen Shots and Making PDFs
One of the handiest features of Mac OS X is the ability to quickly make PDF files from almost any application. We use this frequently to send copies of invoices or purchase orders from our accounting system. Making a PDF file is as easy as choosing the Print command and selecting PDF. But how do you make a PDF file of a screen shot?

All screen shots are saved as PDF files on your desktop. If you want to use the screen shot in a document instead and use the clipboard, modify the following options by holding down the Control key along with the other keys (got enough fingers?).

To take a picture of the whole screen, press Command-Shift-3.

To take a picture of part of the screen, press Command-Shift-4, then drag to select the area you want in the picture.

To take a picture of a window, the menu bar, the dock, or another area, press Command-Shift-4, then press the Space bar. Move the pointer over the area you want so that it's highlighted, then click. (If you decide you want to drag to select the area, press the Space bar again.)

If you press Command-Shift-4 and decide you don't want to take the screen shot, press the Escape key to, well, escape.

The Grab application in your Utilities Folder also can be used to make TIFF files of screen shots.

To make a TIFF of a window using Grab, launch Grab and select "Window" under the "Capture" menu item. You will then be presented with a dialog box that allows you to "Choose Window." If you click on the Choose Window button, your icon will change to a camera. Once you click on the window you want to capture, it creates a TIFF of that window. Make sureyou have your window in the shape and with the content you want before you select "Choose Window."

To make a TIFF of your entire screen using Grab, launch Grab and select "Screen" under the "Capture" menu item. You will then be asked to click outside of the dialog box to capture your screen image. You can choose from several pointer designs to have a pointer at a particular location in the screen shot. You choose your pointer in the Grab Preferences.

That pointer will be in the screen image at the spot you click to create the image. Choosing "Timed Screen" will give you 10 seconds to rearrange stuff before taking the screen shot. This is particularly useful if you want to show a menu in the screen shot. In this case, during the 10 seconds, click on the menu you wish to display and hold the mouse button down until the screen shot has been taken.

To make a TIFF of a selected portion of your screen using Grab, launch Grab and select "Selection" under the "Capture" menu item. This will give you a selection tool that will draw a red box around whatever you wish to capture and will create a TIFF of just that portion.

More Shortcuts!

Since we're talking about shortcuts for screen shots and working with the dock, did you know that there are a slew of keyboard shortcuts for working within the Finder?

Jump to the search field in a Finder window
Command + Option + F

Define a search using multiple criteria such as Name contains Apple and date modified within the last month.
Command + F

Open your home folder
Command + Shift + H

To open the next folder following the hierarchy. For example, if you're in the home folder, + + Up Arrow opens the User Folder.
Command + Up Arrow

Open your iDisk
Command + Shift + I

Open the Computer area (Computer area shows your connected hard drives, network drives, and iDisk)
Command + Shift + C

Open the Network browser
Command + Shift + K

Open the Applications folder
Command + Shift + A

Open the Utilities folder
Command + Shift + U

Select the next icon
Arrow keys

Select an icon by the first letter of its name
Letter key

Select the next alphabetic item in a window
Tab

Select the previous alphabetic item in a window
Shift + Tab

Select a group of icons
Drag the pointer across the icons

Add an icon to the selection
Shift + click

Select adjacent icons in a list
Shift + click

Select or deselect non-adjacent icons in a list
Command + click

Select the name of the icon
Return

Align icons as you drag them
Command + drag

Copy a file instead of moving it
Option + drag the file's icon to new location

Make an alias to a file instead of moving it
Command + Option + drag the file's icon

See the pathname of the current window
Command + Option + click window's titleChoose an item from the pop-up menu to open it

Open a folder in a separate window
Command + double-click

In list view, open the selected folder
Right arrow

In list view, open each level of folders within the selected folder
Command + Option + Right Arrow

In list view, open all folders within the selected folder
Option + click the disclosure triangle

In list view, close the selected folder
Left Arrow

In list or icon view, open the selected folder
Command + Down Arrow

In list or icon view, show the folder containing the current folder
Command + Up Arrow
(If no Finder windows are open, opens a window showing your home folder.)

Open a new window showing the folder that contains the current folder and close the current window
Command + Option + Up Arrow

Open a new window showing the contents of the current folder and close the current window
Command + Option + Down Arrow

Make the desktop active
Command + Option + Shift + Up Arrow

Move the selected item to the Trash
Command + Delete

Empty the Trash
Command + Shift + Delete

Empty the Trash without any warning or when it contains locked files
Command + Shift + Option + Delete or Option + choose Finder > Empty Trash