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.
Some applications must keep small amounts of information between thetimes they are run. For example a personal calendar or personalinformation system, will store information after each session. Insteadof using a
The Java compiler will optimize your application by removing code thatcan never be executed. If you include a class in your application suchas the following: public class Debug{ public static
Instead of exposing fields of a Java class, such as in thiscode: public class Person{ public String firstName; public String lastName;} use private fields and provide access to the information
There are situations when you need to insure that only a single instanceof an object is created in a program. Examples of this include aconnection to a database system, a
When your applet is executing in a browser environment, it might be handy to know what the current URL in the browser is. Although Java is not really great at
To allow your applets to operate in different environments, it’s quite handy to be able to pass certain parameters to them at runtime. When embedding an applet in a HTML
Net-related technology is already moving at a frightening pace, but vendors are actively making things more confusing by continuously coming up with new names for slight variations on existing technology.
If you’re building applets using Microsoft’s Visual J++, you might encounter problems the first time you try to run your applet outside of the development environment. Typical examples of this
Regardless of the Java VM you’re using, from time to time you’ll encounter a client that is unable to run your applet because of an “undefined package” error, even though
Question: Hi, Ohh great and powerful one(just kidding). hhhhmmmm, yeah, i am calling ascript form my Form that spawns a process and does not have to return any HTML; what
The last thing you should do before creating your final EXE is clean your code. This tip explains how to clean the garbage from your project that is sometimes left
It’s easy to make a scrollable viewport for a picture in both VB3 VB4. In addition to a picture, you can also use other objects that grow. First, create a
The ability to write add-ins under VB 4.0 is a significant addition to the developer’s toolbox. However, writing and distributing add-ins can be fraught with many a mind-boggling experience. One
The Code Profiler does not properly handle relative directory references in the VBP file. If the file looks like this, Code Profiler aborts trying to process the CRW45 file: Module=PASSMAN1;
There you are, creating an OLE server in Visual Basic. You go to Options in the Tools menu, select the Project tab, choose “OLE Server,” and click on OK. After
My first encounter with Visual Basic (VB1) was a letdown because I had become accustomed to using the original Basic “DATA” statement for loading numeric values. The statement was also
When you create a screen saver in Visual Basic, you may sometimes utilize the command-line options such as “/s” to start a screen saver directly or “/c” to run the
With applications increasingly using modems, it is quite possible that users will start your application, forgetting that another application is already using the modem-like a fax machine, for example.The MS
This routine allows a hidden table to be appended to the Tables collection in an MDB file. I use the table name as a brand or stamp. During development, I
While working with classes in VB 4.0, we found that the errors raised from our classes were not being trapped at the form level. We used “On Error Resume Next,”
To maintain sanity, I use long descriptive names for tables and queries in Jet MDB files. This leads to errors when I type these names into VB code. To overcome
Occasionally, you may want to use on your form a beveled panel that allows you to designate a background bitmap. Rather than use a third-party control, you can use the
To prevent users from typing spaces in a text box, include this code in the KeyPress event of the text box: Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 32
In general, stored Access queries are faster than embedded SQL in your VB application. It can be a great benefit to be able to send parameters to the query directly
You can quickly find the name of the Windows or the Windows System directory. Just pass “WindowsDirectory” or “WindowsSystemDirectory” into this function: Declare Function wu_GetWindows_ Directory Lib “Kernel” Alias _
Use this code to quickly determine whether Microsoft Mail is currently running: Declare Function GetModuleHandle Lib _ “Kernel” (ByVal lpModuleName As String) As IntegerFunction IsMicrosoftMailRunning ()On Error GoTo IsMicrosoftMailRunning_ErrIsMicrosoftMailRunning =
If you get the error “User-defined type not defined” on a line where you are declaring a database, go to Tools, then go to References, and select the appropriate DAO
Sometimes you need to change the size of controls by changing the size of a container. For example, try this: Private Sub Form_Resize() Picture1.Align = vbAlignLeft Picture1.Align = vbAlignTopEnd Sub
While working on VB projects with associated Jet databases, I found that I was creating a lot of individual handling functions for reading, writing, and validating data. It was hard
When a user presses the Cancel button, the control that previously had focus triggers its LostFocus event, which is where many programs do their validity checking. If the input wasn’t
