Pages

Thursday, August 29, 2013

Save a reference to opened processes so you can destroy them later

To start a process in Visual Basic .NET, you use the Start() method of the System.Diagnostics.Process class, like so: System.Diagnostics.Process.Start("someapp"). However, when you start a process in this manner, it′s up to the user to shut it down when she′s done. If you′d like to control the life of the spawned process, declare a global Process object and save a reference to the new process when you execute it.


Wednesday, August 28, 2013

Keep your Format Painter active — even after you re-format a range (2003/2007/2010)

The Format Painter button offers a great service. It copies the formatting from your selected cell or data range and pastes it onto the next data range you select. You don't have to format a new area — including font, borders, number formats, etc. — from scratch. But if you need to use the Format Painter to add your copied formatting to more than one non-contiguous data range, you'll find yourself wasting time. You probably select the cell with the desired formatting, click the Format Painter button, select one data range for the new formatting, go back to the original cell ... rinse, wash, and repeat.

Tuesday, August 27, 2013

Create a fill-in-the-blanks form without drawing a line (QuarkXPress)

Designing forms in QuarkXPress can be a frustrating experience, so here's a trick that can save you significant production time. You can easily create a segmented fill-in-the-blanks box (the ones that look like an upside-down comb) in QuarkXPress without the tedium of drawing multiple evenly spaced lines with the Line tool.

Monday, August 26, 2013

Get the database login information pronto from the application code

So, you're asked to fix a database problem for a web application. The trouble is that nobody can tell you a valid database username and password—or even where the database is! You could spend hours searching the application code and tracking down everyone in your company who you think might know. If the application happens to be written in ASP.NET, there's a good chance that all this information is in a file at the top level of the application's web directory called web.config; the database connection string may even look something like:

Thursday, August 22, 2013

Call a Function or Subroutine with its string name using the Invoke method

While the CallByName() function, which allows you to call a function or subroutine using the subroutine or function name stored as a string value, still works in VB. NET, you do have another option. You can use the Invoke() method of the MethodInfo class. This class is a member of the System.Reflection namespace and it provides access to a method′s metadata. Consider the following subroutine:


Wednesday, August 21, 2013

Instantly find a contact in Outlook

If you need to find a contact in Outlook but you only remember part of their email address, just type what you remember into the Find A Contact text box on the main toolbar and press [Enter]. If Outlook finds more than one contact with matching information, it presents a Choose Contact dialog box with all matching contacts listed. If Outlook finds a single match, it opens the Contact form for that match.

Tuesday, August 20, 2013

Crooked scan — we've got the fix for you (Photoshop)

Oftentimes, when scanning an image, the picture shifts on the scan bed (or maybe you put it there at a slight angle) and you don't notice until after you've scanned it. Seeing that you'll probably have to crop in on the image as well, save time by cropping and straightening simultaneously. To do so, select the Crop tool from the Toolbox. Then, drag the cropping border where you want it. Now, drag the pointer just outside of the cropping border. Upon doing so, your pointer changes to a twoheaded arrow, allowing you to rotate the cropping border to fit your image. Then, when you press [enter] to apply the crop, your image will be straight too.

Monday, August 19, 2013

Easily create copies of SQL Server tables—without copying their data

It's not terribly uncommon to need to make a copy of the structure of a table (usually temporarily). If you need a copy of the data also, you can simply use a  SELECT INTO, like this:

SELECT * INTO Employees2 FROM Employees (NOLOCK)

Thursday, August 15, 2013

A few simple techniques to change the appearance of tabs in a TabControl

By default, NET positions TabControl tabs at the top of the control and labels them with plain text. Unfortunately, you can't easily change the back color of the tab or the font of its text. However, that doesn't mean you have to settle for bland, boring tabs. Three simple adjustments you can make to TabControl tabs without writing a single line of code include: adding images to each tab, changing the position of the tabs, and stacking multiple tabs for easier viewing.

Wednesday, August 14, 2013

Add frequently used commands to your Quick Access Toolbar (Office 2007)

Microsoft Office 2007's interface doesn't allow for much customization. If you loved your custom toolbars in previous versions, the ribbon interface might give you a rude awakening. After all, you can customize toolbars that don't exist! But you can add commands that you use frequently to your Quick Access Toolbar, which resides to the right of the Office button. By default, the Quick Access Toolbar includes icons that let you save a document, undo an action, and redo an action.

Tuesday, August 13, 2013

Manage projects by merging with the Book palette (QuarkXPress)

I've created several files in QuarkXPress, with each containing a batch of catalog pages. The first file contains pages 1 through 17, while the second file contains pages 18 through 36, and so on. I would like to merge all my files so that they create one catalog with pages flowing in numerical order for printing. Can you please help?

Monday, August 12, 2013

Bypass the Inbox when you first launch Outlook

By default, when you launch Outlook, you immediately see your email Inbox. But, if you prefer to look at your calendar and task list prior to checking your email, there's no reason for you to have to change views every time you open the application. Fortunately, it's easy to change which Outlook folder is initially opened. For example, if you want Outlook to open to the Calendar instead of the Inbox, choose Tools | Options from the Outlook menu bar and click on the Other tab in the resulting Options dialog box. Next, click the Advanced Options button to open the Advanced Options dialog box and choose Calendar (or one of the other Outlook folders, such as Journal or Notes) from the Startup In This Folder dropdown list. Now, click OK twice to return to Outlook. Close Outlook and then restart it. The Calendar is now displayed and is selected in the Folder List.

Thursday, August 8, 2013

Simple shortcuts to help you edit DataGrid data

You're probably aware that you can use the [Esc] key to cancel an entry before leaving a cell and use the [Home] and [End] keys to move to the beginning or end of the current row. However, the DataGrid also supports several other shortcut keys that can help you during data entry. For example:
  • You can jump to the first empty cell on the current row by pressing the [Ctrl] key plus one of the arrow keys.
  • If you need to delete all the rows in the DataGrid, you can first quickly select them with [Ctrl]A.
  • If you need to save a null value instead of an empty string, [Ctrl]0 (zero) enters a dbnull value into a cell when in edit mode.


Wednesday, August 7, 2013

Don't get stuck with plain text—pick the email reply format of your choice


When you receive a plain-text email, you probably just hit reply and send a plain-text reply. But, you don't have to stick to the simple formatting if you usually use rich text or HTML. Simply select a different format option from the Message Format dropdown list on the main menu of the email. (In 2000, select Format | Rich Text or Format | HTML.) Keep in mind, though, that your recipient may not be able to see all the extra formatting if he can't view rich text or HTML mail.

Tuesday, August 6, 2013

Eliminate the tedium of repetitious patterns (Photoshop CS2/CS3/CS4)

If you want to eliminate repetition from your design process, consider the possibility of patterns. Photoshop comes with several preset patterns you can use, or you can create your own custom-designed patterns from scratch or from existing graphic art.

Monday, August 5, 2013

Quickly access the Save As dialog box in Microsoft Office XP applications

If you haven't yet saved a new document, the Save As dialog box automatically appears when you click the Save button. However, once you've saved your new Excel workbook, PowerPoint presentation, or Word document, clicking the Save button no longer opens the Save As dialog box; instead, it saves your document in its current location using its current filename. If you want to access the Save As dialog box to save your document in a different location or to a different filename, you can choose File | Save As from the menu bar, as you already know. If you want to spare yourself a few mouse clicks, however, simply press the [F12] shortcut key instead.

Thursday, August 1, 2013

Use xsl:import to avoid rule collisions when sharing XSLT stylesheets

In an XSLT stylesheet, you can reference another XSLT stylesheet to access additional elements to your transformation. The syntax and mechanism of xsd:import is very similar to xsd:include: