The Simplest way is (works very well):
System.Diagnostics.Process.Start(sURL);
But this will open the default browser in your system.
Another way is create Internet Explorer Application using shdocvw.dll:
using SHDocVw; // Contains the Internet Explorer reference
InternetExplorer oIE = new InternetExplorer();
if (oIE != null)
{
object oEmpty = String.Empty;
object oURL= sURL;
oIE.Visible = true;
oIE.Navigate2 (ref oURL, ref oEmpty, ref oEmpty, ref oEmpty, ref oEmpty);
}
Monday, December 11, 2006
Wednesday, November 15, 2006
Complaining Studio 2005 Text Editor too slow?
Probably this fix can help: go to Tools->Options->Text Editor->C#->General and unchecking the “Navigation bar” option and "WordWrap". It seems there is some issues with the navigation bar.
Tuesday, November 07, 2006
Build Project Templates Using Visual Studio 2005
Found two good articles about creating project templates in VS 2005.
Speed Up with Project Templates Using Visual Studio 2005 - Part 2
Speed Up with Project Templates Using Visual Studio 2005 - Part 3
Speed Up with Project Templates Using Visual Studio 2005 - Part 2
Speed Up with Project Templates Using Visual Studio 2005 - Part 3
Tuesday, October 10, 2006
Monday, October 09, 2006
Sunday, October 08, 2006
Flash Video Player
Just found something about Flash Video Player. FLV is the best video format for Internet video sharing and playing. It needs less bandwidth than other formats.
Flash Video Player
Free FLV Encoder - Riva VX
Flash Video (FLV) Anti-Aliasing
Flash Video Player
Free FLV Encoder - Riva VX
Flash Video (FLV) Anti-Aliasing
Friday, October 06, 2006
Google lauched code search
Google lauched a new search: code search. It seems helpful for programmers to search code sample or snippets.
Thursday, September 28, 2006
Why DVD+R(W) is superior to DVD-R(W) -
Just found a good article discuss "Why DVD+R(W) is superior to DVD-R(W) -". It is good to read.
Thursday, September 14, 2006
Tools for the Power Developer
Just happen to see this interesting article: Web Development Tools for the Power Developer.
These tools might be useful for Web Development.
Web Developer extension for Firefox
Internet Explorer Developer Toolbar
These tools might be useful for Web Development.
Web Developer extension for Firefox
Internet Explorer Developer Toolbar
Tuesday, September 12, 2006
"Atlas" 1.0 Naming and Roadmap
From ScottGu's Blog, Atlas now has an official name and roadmap. Microsoft will ship "Atlas" 1.0 soon.
Monday, August 28, 2006
Serial Port programming
Today we got a Barcode Scanner w/ RS232. Just getting some idea how to use it in our system. I found some very useful information about SerialPort (RS-232 Serial COM Port) in C# .NET. We use MSComm control in VB6 to do this. Now in .Net Framework 2.0, we have this new and cool SerialPort component.
Thursday, August 24, 2006
ClickOnce Installs fail, "ADODB 7.0.3300 required"?
Today I used ClickOnce to publish a new version of my project. But it failed. The error says:
"Unable to install or run the application. The application requies the assembly ADODB 7.0.3300 to be installed in the Global Assembly Cache (GAC) first."
I tried to find the ADODB 7.0.3300. But no way I can find it. The only thing I added to project is Report Viewer. So I removed the reference to ReportViewer, and tried again. It worked. It seems the ReportViewer references this mysterious ADODB 7.0.3300.
"Unable to install or run the application. The application requies the assembly ADODB 7.0.3300 to be installed in the Global Assembly Cache (GAC) first."
I tried to find the ADODB 7.0.3300. But no way I can find it. The only thing I added to project is Report Viewer. So I removed the reference to ReportViewer, and tried again. It worked. It seems the ReportViewer references this mysterious ADODB 7.0.3300.
Wednesday, August 23, 2006
An Introduction to AJAX Techniques and Frameworks for ASP.NET
This article introduces AJAX to ASP.NET developers implementing an example web page in different ways using ASP.NET Atlas, ASP.NET callbacks, Ajax.Net, Anthem.Net and MagicAjax.Net.
Details on CSS changes for IE7
IEBlog has a good post about CSS changes for IE7 recently. This might be very helpful for changing your site for IE7.
Tuesday, August 22, 2006
Use ClickOnce for VB6 Program
I found two good articles on MSDN today. They are talking about using the .NET Framework 2.0 and ClickOnce deployment to automatically update Visual Basic 6.0 applications and COM objects.
Automatically Updating Visual Basic 6 Applications: Part I
Automatic Updating of Visual Basic Applications: Part II
Automatically Updating Visual Basic 6 Applications: Part I
Automatic Updating of Visual Basic Applications: Part II
Monday, August 21, 2006
Friday, August 18, 2006
Credit Card Number Validation
I just found an article about the algorithm of validating Credit Card Number.
Thursday, August 10, 2006
Sogou Pinyin Input “搜狗”拼音输入法
最近下载试用了一阵子,效果不错,准确率蛮高的。利用互联网的词频来排序,选词。搜索引擎做这个应该很有优势。值得试用一下。http://www.sogou.com/pinyin/
Friday, July 21, 2006
Call Web Service in VB6
Dim objDom As Object
Dim objXmlHttp As Object
Dim strRet As String
Dim AsmxUrl As String
Dim SoapActionUrl As String
Dim XmlBody As String
SoapActionUrl = "http://tempuri.org/CalcDist"
XmlBody = "..soap:Envelope..."
AsmxUrl = "http://host/Service1.asmx"
' Create objects to DOMDocument and XMLHTTP
Set objDom = CreateObject("MSXML2.DOMDocument")
Set objXmlHttp = CreateObject("MSXML2.XMLHTTP")
' Load XML
objDom.async = False
objDom.loadXML XmlBody
' Open the webservice
objXmlHttp.Open "POST", AsmxUrl, False
' Create headings
objXmlHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXmlHttp.setRequestHeader "SOAPAction", SoapActionUrl
' Send XML command
objXmlHttp.send objDom.xml
' Get all response text from webservice
strRet = objXmlHttp.responseText
' Close object
Set objXmlHttp = Nothing
Dim objXmlHttp As Object
Dim strRet As String
Dim AsmxUrl As String
Dim SoapActionUrl As String
Dim XmlBody As String
SoapActionUrl = "http://tempuri.org/CalcDist"
XmlBody = "..soap:Envelope..."
AsmxUrl = "http://host/Service1.asmx"
' Create objects to DOMDocument and XMLHTTP
Set objDom = CreateObject("MSXML2.DOMDocument")
Set objXmlHttp = CreateObject("MSXML2.XMLHTTP")
' Load XML
objDom.async = False
objDom.loadXML XmlBody
' Open the webservice
objXmlHttp.Open "POST", AsmxUrl, False
' Create headings
objXmlHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXmlHttp.setRequestHeader "SOAPAction", SoapActionUrl
' Send XML command
objXmlHttp.send objDom.xml
' Get all response text from webservice
strRet = objXmlHttp.responseText
' Close object
Set objXmlHttp = Nothing
Wednesday, April 26, 2006
Tuesday, March 21, 2006
Tools for debugging web applications
Fiddler. This program runs as a proxy that logs all HTTP traffic. It supports Internet Explorer and other browsers. Using Fiddler, you can examine each request and response, including headers, cookies, and the message contents.
Web Development Helper. This tool works only with Internet Explorer, but in addition to logging HTTP traffic, it can be used to inspect the HTML DOM, display trace information in a separate window, shut down the application, and decode the page's view state.
Web Development Helper. This tool works only with Internet Explorer, but in addition to logging HTTP traffic, it can be used to inspect the HTML DOM, display trace information in a separate window, shut down the application, and decode the page's view state.
"Atlas" is amazing...
Microsoft introduce "Atlas," powerful new framework for building cross–browser, cross–platform AJAX applications in its MIX06 event. Compared to Google, Yahoo, Microsoft is more focusing on the developement tools instead of the applications for Web 2.0. Now this baby is really a powerful tools for asp.net 2.0.
Wednesday, February 22, 2006
Array in SQL Server 2000
Just found a good article about table variable in T-SQL.
-- Transact SQL Cursor
CREATE PROC SQL_Cursor
AS
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50)
/*create the cursor*/
DECLARE MyCursor CURSOR FOR
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*open the cursor*/
OPEN MyCursor
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform oterations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
/*establish loop structure*/
WHILE @@FETCH_STATUS = 0
BEGIN
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform operations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
END
/*close the cursor*/
CLOSE MyCursor
/*remove the cursor definition*/
DEALLOCATE MyCursor
-- Cursor Simulator
CREATE PROC CursorSimulator
AS
/*Prepare TABLE variable to take resultset*/
DECLARE @tbl TABLE(
RowID INT IDENTITY(1, 1),
CompanyName VARCHAR(100),
ContactName VARCHAR(50))
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50),
@count int, /*create local @@fetch_status*/
@iRow int /*row pointer (index)*/
/* create array simulator */
INSERT @tbl
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*get array Upper Bound (highest ID number)*/
SET @count = @@ROWCOUNT
/*initialize index counter*/
SET @iRow = 1
/*establish loop structure*/
WHILE @iRow <= @count BEGIN /*get row values*/ SELECT @ContName = CompanyName, @CompName = ContactName FROM @tbl WHERE RowID = @iRow /*perform operations with single row*/ PRINT 'My cursor row ' + @ContName + ' ' + @CompName /*go to next row*/ SET @iRow = @iRow + 1 END
-- Transact SQL Cursor
CREATE PROC SQL_Cursor
AS
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50)
/*create the cursor*/
DECLARE MyCursor CURSOR FOR
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*open the cursor*/
OPEN MyCursor
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform oterations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
/*establish loop structure*/
WHILE @@FETCH_STATUS = 0
BEGIN
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform operations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
END
/*close the cursor*/
CLOSE MyCursor
/*remove the cursor definition*/
DEALLOCATE MyCursor
-- Cursor Simulator
CREATE PROC CursorSimulator
AS
/*Prepare TABLE variable to take resultset*/
DECLARE @tbl TABLE(
RowID INT IDENTITY(1, 1),
CompanyName VARCHAR(100),
ContactName VARCHAR(50))
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50),
@count int, /*create local @@fetch_status*/
@iRow int /*row pointer (index)*/
/* create array simulator */
INSERT @tbl
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*get array Upper Bound (highest ID number)*/
SET @count = @@ROWCOUNT
/*initialize index counter*/
SET @iRow = 1
/*establish loop structure*/
WHILE @iRow <= @count BEGIN /*get row values*/ SELECT @ContName = CompanyName, @CompName = ContactName FROM @tbl WHERE RowID = @iRow /*perform operations with single row*/ PRINT 'My cursor row ' + @ContName + ' ' + @CompName /*go to next row*/ SET @iRow = @iRow + 1 END
Thursday, February 02, 2006
vnfo.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\nfo]
"CodePage"=dword:000001b5
"FontSize"=dword:000c0008
"FontFamily"=dword:00000030
"FontWeight"=dword:00000190
"FaceName"="Terminal"
"QuickEdit"=dword:00000800
"ScreenBufferSize"=dword:012c0052
"WindowSize"=dword:00240052
[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View]
@="view nfo"
[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View\Command]
@="cmd.exe /c start \"nfo\" cmd.exe /c type \"%1\" ^& pause"
[HKEY_CURRENT_USER\Console\nfo]
"CodePage"=dword:000001b5
"FontSize"=dword:000c0008
"FontFamily"=dword:00000030
"FontWeight"=dword:00000190
"FaceName"="Terminal"
"QuickEdit"=dword:00000800
"ScreenBufferSize"=dword:012c0052
"WindowSize"=dword:00240052
[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View]
@="view nfo"
[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View\Command]
@="cmd.exe /c start \"nfo\" cmd.exe /c type \"%1\" ^& pause"
Tuesday, January 31, 2006
Subscribe to:
Posts (Atom)