
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.


The default clone() method, inherited from Object, makes a shallow copy of an object.But sometimes we require that all the objects whose references are present in an object are also

Home users of Outlook must create a new form and make it the default form for their Inbox. This code removes any attachments with vbs in the filename on incoming

You can use this kind of bean to pass information from a servlet to a JSP page through a session variable. For Instance: DataBean myobj = new dataBean();myobj.setData(

This tip loads and removes any font. Loaded fonts can be listed by the common dialog control but not in the Windows Fonts folder. The advantage is it lets you

The benefits here are that the class can be set at runtime. You don’t need to write a new list for every Class that needs listing. public class HomogenousList extends

This is similar to the

Make the width of the radio option button a lot wider than the caption text it holds. Next, position a textbox between the end of the caption and the actual

A reader tried to cast a nonstatic member function of a certain class to void*, as in the following example: class A{public: void func();};void *pmf = reinterpret_cast < void *>

In many cross-platform applications, you have code sections that — depending on the target OS and compiler — need to be either concealed or compiled. For example, code that uses

The const-ness of a member function is an integral part of its type. The following class defines two member functions, f(), g(), which have the same return type and parameter

I created this Hit Counter to keep track of the use of our Company Intranet. On the SQL Server (in our case MSSQL 7), you will need to have a

In applications that cannot be recompiled (e.g., apps that are installed on a customer’s machine as binaries only), values of constants may change occasionally. For example, exchange rates and the

By default, std::cin ignores leading whitespaces when it reads input from the keyboard or file. For example, if you execute the following statement: char name[10];cin>>name; and the user enters the

If you ever wanted to enhance the VB6 IDE without writing your own add-in program, or doing any programming, then this addin is for you. It creates a ToolWindow with

Private Declare Function GetUrlCacheEntryInfo Lib “wininet.dll” Alias _ “GetUrlCacheEntryInfoA” (ByVal sUrlName As String, lpCacheEntryInfo As Any, _ lpdwCacheEntryInfoBufferSize As Long) As Long’ Check whether the file identified by the URL

‘ Get system information using Active Directory” Returns True if successfull” Returns the following information in its parameters’ ComputerName’ DomainName’ PDC Name’ UserName” NOTE: requires a reference to the Active

‘ Get a description of the processor using Active Directory” NOTE: requires a reference to the Active DS Type libraryFunction GetCpuDescription() As String Dim thisComputer As ActiveDs.IADsComputer Dim thisService As

‘ Add an URL to the IE’s favorites by sending a client side JavaScript to IE’ sURL is the URL that the link will point to’ sDescr is the description

Private Declare Function InternetGetConnectedState Lib “wininet.dll” (ByRef _ lpSFlags As Long, ByVal dwReserved As Long) As LongConst INTERNET_CONNECTION_MODEM = 1Const INTERNET_CONNECTION_LAN = 2Const INTERNET_CONNECTION_PROXY = 4Const INTERNET_CONNECTION_MODEM_BUSY = 8′ return

The VB IDE remembers most of the configuration settings that were active when you closed the previous session. However, the maximized status of child MDI windows (the code editor and

Often, while developing a system you want to debug it using System.out.println or System.err.println. When development is over you would like to send all those messages to file. The easiest

If you are writing an application in which you don’t know the class of an object until runtime, then you cannot use the new operator to instantiate the object. This

The assert macro can be used to detect errors as soon as they occur. This macro is defined in the include file , and is used that way: assert (expression)

Use the following code: Public Function IsLeapYear(iYearToCheck As Integer) As BooleanIsLeapYear=IsDate(Format(

Put the control(s) in a frame and disable the frame. This will even eliminate graying out or color changes.

In C++, this can be achieved by throwing an exception from your Constructor. Since Constructors cannot return a value, this is the only way to achieve error handling. Class MyClass{

This User Control is designed to fit the needs of the coder who needs a date entry field without the overhead of having to ship (and install) the Microsoft Windows

If your program uses the WebBrowser control or any Microsoft Internet Control, you must ensure (and clearly specify in your app’s documentation) that the program can only work on systems

A simple way to add some pizazz to your forms is by minimizing them and then closing them, instead of making them disapper istantaneously. Just try this code: Private Sub











