Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.

• Chaging the Default Browser under Windows XP for IE and Firefox
10/24/2008 11:12AM
There are times when you might want to change your default browser; especially if you are a developer and want to make sure that something works as it should with both IE and Firefox.

• Go to: Start/Control Panels/Add or Remove Programs
• Click on "Set Program Access and Defaults", the last button in the left-hand nav
• Click on the "Custom" set of options
• You will see an expanded list of items, Web Browser, E-mail Program, etc.
• Under the "Choose a default Web browser", select the radio button next to browser you would like to set as default.
• Click "OK"
• getURL() in a Projector Firefox Bug and Solution
10/24/2008 11:06AM
If you have ever tried to do a simple getURL() command in Flash from an .exe projector you'll notice that it fails when Firefox is your default browser.

Following is the solution to the problem in both AS 2.0 and AS 3.0
Here's the code for the fix in AS 2.0:

// code on a keyframe on the main timelinevar swfUrl:String = _root._url;var lastSlashIndex:Number = swfUrl.lastIndexOf("/");var pipeIndex:Number = swfUrl.indexOf("|");var baseUrl:String;if (pipeIndex >= 0){    baseUrl = swfUrl.substring(0, pipeIndex);    baseUrl += ":";}else{    baseUrl = "";}baseUrl += swfUrl.substring(pipeIndex + 1, lastSlashIndex + 1);myButton.onRelease = function(){    var targetUrl:String = baseUrl + "test.html";    getURL(targetUrl, "_blank");};

Here's the code for the fix in AS 3.0:

// code on a keyframe on the main timelineimport flash.events.MouseEvent;import flash.net.*;output_txt.text = this.loaderInfo.url;var swfUrl:String = this.root.loaderInfo.url;var lastSlashIndex:Number = swfUrl.lastIndexOf("/");var pipeIndex:Number = swfUrl.indexOf("|");var baseUrl:String;if (pipeIndex >= 0){    baseUrl = swfUrl.substring(0, pipeIndex);    baseUrl += ":";}else{    baseUrl = "";}baseUrl += swfUrl.substring(pipeIndex + 1, lastSlashIndex + 1);function gotoTestHtml(event:MouseEvent):void{    var targetUrl:URLRequest = new URLRequest(baseUrl + "test.html");    navigateToURL(targetUrl, "_blank");}myButton.addEventListener(MouseEvent.CLICK, gotoTestHtml);

Here is a link to the original article where I found this with the full explanation and fix.
• How to Run Firefox 2 and 3 at the Same Time
10/15/2008 1:33PM
Here's a quick how to on running Firefox 2 and 3 at the same time under Windows
1. Right click the shortcut of the Firefox 2, click "Properties". Add "-profilemanager" at the end of the shortcut path. Click OK. Then run this shortcut to launch Firefox Profile Manager.
2. Create a new profile, name it "firefox3". And uncheck the "Don't ask at startup"
3. Go to Properties of the Firefox 2 shortcut again, remove the "-profilemanager" and add "-p default" at the end of the path. This forces Firefox 2 to open the original profile.
4. Install Firefox 3. Choose "Custom" when you are asked.
5. Change the installation folder to "Mozilla Firefox 3"
6. Same in Start Menu Folder name.
7. When is complete, uncheck the "Launch Firefox now". You still have something to do before you can run it.
8. Go to the Properties of the Firefox 3 shortcut. Append "-no-remote -p firefox3" to the Target. The "-no-remote" will let Firefox run a separate instance. The "-p firefox3" will force your Firefox 3 to run the newly clean profile.
9. Run the Firefox 3, and you will be prompted that your Firefox is not the default browser. DON'T click Yes. Firefox 3 is not stable and you won't like to use it as your default browser. Simple uncheck the "Always perform this check when starting Firefox" and click No.
10. Now you can run Firefox 2 and Firefox 3 at the same time.
• VB6, Centering a Form on the Screen
10/08/2008 2:56PM
Here is a code snippet used to center a form on the screen.

' Centering the form on the screen
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
End Sub

• VB6 Code for Openning an External File
10/08/2008 2:53PM
The following VB6 code will open an external file with it's associated application.  This assumes that there is an application on the system that is already associated with a specific executable. Under your General Declarations:

' Runs an external file/launches it's associated app
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

On whatever Form/Button/Event

Dim FileName As String
FileName = "C:\path\to\some\file.pdf"
ShellExecute 0&, "open", FileName, "", "", vbNormalFocus