February 14, 2006

Copy Selected Text Within a Browser to a Clipboard

Use the following code to copy selected text within a Web browser to a clipboard in VB.NET 2.0: Dim docx As HtmlDocument = WebBrowser1.Document Dim readme As Object = Nothing’assume user has made selection and clicked a toolbar buttondocx.ExecCommand(“copy”, True, readme)

A Quick Way to Bookmark a Web Page

Ever wanted to bookmark a Web page so you can read it later? Here’s a quick way to do it, that works in both IE and Firefox: CTRL+D This does not duplicate bookmark entries in IE, but it does duplicate them in Firefox. This means that if you press CTRL

Make Your ASP.NET Applications Talk with Text-to-Speech

ou may have noticed that synthesized voices are becoming more commonplace. Hundreds, if not thousands of electronic toys and gadgets speak to their owners in robotic voices. Whether it is a talking baby doll, a talking pedometer, or a new automated telephone system, several products that use text to speech

Beware of Using Loop Variables Outside the Loop

People using loop variables in compilers like VC++ 6.0 are acccustomed to using loop variables after the loop. For example, take a look at the following code: for (int i=0; i

Move a Non-modal JDialog Together with its Parent JFrame

The following code allows you to move a non-modal JDialog together with its parent JFrame and vice versa in a Swing application. //new MovingTogether(jFrame1, jDialog1); (“jFrame1” is a JFrame//and “jDialog1” is a non-modal JDialog with jFrame1 as parent)class MovingTogether extends ComponentAdapter{ public MovingTogether(JFrame winA, JDialog winB){ this.winA = winA; this.winB