August 25, 2011

Change the shortcut key of the Redo command from Shift+Alt+Bkspce to Ctrl+Y in Visual Studio 2010

In Visual Studio 2010, the default shortcut key of the Redo command is Shift+Alt+Bkspce. However, in other programs like Excel 2007 and Word 2007, the shortcut key of the Redo command is Ctrl+Y.


Figure 1: The Edit menu with the Shift+Alt+Bkspce shortcut key assigned to the Redo command.

To change the shortcut key of the Redo command:
  1. In the Tools menu, click Options.... The Options box should open.
  2. In the setting list, expand Environment and select Keyboard.
  3. In the Show commands containing field, enter "redo".
  4. In the command list, select Edit.Redo.
  5. In the Press shortcut keys field, press Ctrl+Y in your keyboard.
  6. Click Assign.
  7. Click OK.

Figure 2: The Option box after completing Step 5.

If the Ctrl+Y shortcut key is assigned to another command, it must be removed from that command.

To remove a shortcut key from a command:
  1. In the Tools menu, click Options.... The Options box should open.
  2. In the setting list, expand Environment and select Keyboard.
  3. In the Show commands containing field, enter the name or a part of the name of the command.
  4. In the command list, select the name of the command.
  5. In the Shortcuts for selected command list, select the shortcut.
  6. Click Remove.
  7. Click OK.
 
Figure 3: The Edit menu with the Ctrl+Y shortcut key assigned to the Redo command.
 

August 19, 2011

Get the Hyper Text Markup Language (HTML) source code of a web page using Visual Basic .NET

Imports System.Net

Public Function GetHtmlSourceCode(ByVal address As String) As String
    Dim webClient As WebClient = New WebClient()
    Return webClient.DownloadString(address)
End Function


You can use the DownloadString method to get data from a web page by downloading and parsing its source code.

August 1, 2011

A Bristol Boxkite replica parked in Changi Airport

Jenny and I were at Changi Airport yesterday accompanying our moms who were going home to Philippines after about 3 weeks of vacation in Singapore. While Jenny and I were walking around in the airport, we found a Bristol Boxkite replica parked in Terminal 2.