devxlogo

The Latest

The Debug and Release Check Technique

Assertions are excellent at catching bugs during development. However, some checks need to be performed at runtime for production code as well. A good way to wrap the two is

Disable the Right Mouse Click

The following code disables right mouse click. Related Posts Using Aliases for Namespaces in C#Impove Your Network Efficiency with this AlgorithmMicrosoft agrees to suspend CISPE software auditsZeroAvia completes $150M Series

Use Interfaces to Increase Source Code Flexibility

Where possible, use interfaces (as opposed to interface-implementation classes) to increase your source code’s flexibility. If you later need to change an interface-implementation class (to improve performance, for example), it’s

Copy Filenames to a Clipboard

File hierarchies are becoming more complex and file paths longer as the capacity of hard drives increases. There are still many occasions, however, when you can’t browse to identify a

Take a Quick Look at a File

The Windows Script Host (WSH) supports many useful features, including VBScript’s FileSystemObject object and the ability to drag and drop filenames. You can drag and drop a data files icon

Practical XML for Java Programs

he true raison d’The Dos and Don’ts of XMLXML is a universal format for transferring hierarchically organized data. When properly formatted, XML documents are readable, self-explanatory, and platform-independent. In practice,

You Just Can’t Kill Visual Basic

or a decade people have been predicting the demise of Visual Basic, and with VB.NET, nothing has changed. According to one recent report, the future of VB.NET is threatened competitively

SetProperty – Setting a property via reflection

‘ Set a property via reflection and return True if successful’ Example: SetProperty(Button1, “Text”, “Click me”)Function SetProperty(ByVal obj As Object, ByVal propertyName As String, _ ByVal val As Object) As

GetProperty – Reading a property via reflection

‘ Read a property via reflection or return a default value’ Example: MessageBox.Show(GetProperty(Button1, “Text”, “”))Function GetProperty(ByVal obj As Object, ByVal propertyName As String, _ ByVal defaultValue As Object) As Object

InvokeMethod – Invoking a method via reflection

‘ Invoke a method via reflection and return its result – return null if method ‘ doesn’t exist or throws’ Note: requires Imports System.Reflection” Example:’ Function GetCompleteName(ByVal firstName As String,’

IsMemberSupported – Check whether an object supports a member with the specified name

‘ Check whether an object supports a member with the specified name” Examples:’ Debug.WriteLine(IsMemberSupported(Button1, “BackColor”)) ‘ => True’ Debug.WriteLine(IsMemberSupported(Button1, “Focus”)) ‘ => True’ Debug.WriteLine(IsMemberSupported(Button1, “TextColor”)) ‘ => False’ Debug.WriteLine(IsMemberSupported(Button1, “Print”))

Wireless Data Shot: Making Platform/Device Decisions

The Evans Wireless Development Survey is a detailed report of extensive, in-depth interviews with almost 500 developers active in wireless application or infrastructure development. It was conducted in March 2003.

From the Editor: DevX Joins Jupitermedia

n Friday afternoon, DevX, which has operated as an independently-owned media company for nearly four years, agreed to become part of a larger group of online publications. Jupitermedia, the publisher

GetApplicationPath – Retrieving the path of the running application or add-in

‘ Return the application’s path.’ Note: it also works with add-ins’s dll, whereas Application.StartupPath ‘ returns’ Visual Studio .NET’s startup path instead’ Example: MessageBox.Show(GetApplicationPath())Function GetApplicationPath() As String Return System.IO.Path.GetDirectoryName _

Book Excerpt: Creating Applications with Mozilla

ozilla is not just a browser. Mozilla provides a framework that allows developers to create cross-platform applications by utilizing its accessible components, including JavaScript, CSS (Cascading Style Sheets), and Mozilla’s

Book Excerpt: Tomcat: The Definitive Guide

omcat is a Java servlet container and Web server from the Jakarta project of the Apache Software Foundation. A Web server is, of course, the program that dishes out Web