November 27, 2007

Converting an Integer to a C++ String

Boost libraries provide a better way to convert numbers into strings or vice versa. You must install the Boost libraries on your computer to make this work (click here for more info on Boost libraries ). #include &ltboost/lexical_cast.hpp&gt// Number to Unicode stringstd::wstring wcs = boost::lexical_cast(1234);// Number to char stringstd::string s

Implement mouseDragged and mouseMove Events

This tip shows you how to implement mouseDragged and mouseMove events for moving components into a frame: import java.awt.*;import java.awt.event.*;class f extends Frame implements MouseMotionListener,MouseListener{Checkbox CB=new Checkbox(“Label”,true);Button BP=new Button(“BUTTON_1”);Button B=new Button(“BUTTON”);TextField TF=new TextField(10);Panel P=new Panel();List TA=new List();boolean b1=false;int c1=0;int c2=0;public f(String titlu) { super(titlu); }void init() { setLayout(null); TA.addMouseMotionListener(this); TA.addMouseListener(this);

Catching the (Silver) Light

‘d guess that everyone reading this magazine has heard of Silverlight. I’ll also guess that not everyone has jumped at the opportunity to “play” with something that had been in beta. The good news is that Silverlight 1.0 is now released! I’ve spent a lot of time with Silverlight since

Viewing Contents in the Background Form

Suppose you’re working on multiple forms and you’ve got a visual dependency on data in one or more forms (something like the Aero effect in Vista). In such cases, use the form’s Opacity property. First, set the foreground form’s Opacity to less than 1. This technique is also useful when