
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 following piece of code is a sample example that can print a HTML page without showing the print-popup dialog box. NOTE: It is restricted with IE 5.5 SP2 onwards.
Private Shared _ Function GetAsyncKeyState(ByVal key As Keys) As IntegerEnd Function’ Check whether a key is pressed, at any given time’ Example: MessageBox.Show(IsKeyPressed(Keys.A))Function IsKeyPressed(ByVal key As Keys) As Boolean Return
‘ Retrieve the installed MDAC version” Examples:’ Dim ver As Version = GetMdacVersion()’ ‘ print the full version’ MessageBox.Show(ver.ToString())’ ‘ print the major and minor portions’ MessageBox.Show(“Major: ” & ver.Major
‘ Add or remove an event handler through reflection,’ and return True if successful” Examples:’ ‘ add an event handler for Button1’s Click event’ AddRemoveEventHandler(Button1, “Click”, New EventHandler(AddressOf ‘ OnButton1Click))’
‘ Assign the same transaction to the Update/Delete/Insert commands of all the ‘ OleDb/SqlAdapters passed in input’ Note: all the DataAdapters must be of the same type (OleDb or Sql)’
‘ Check whether a string ends with one of multiple possible choices.’ Return -1 if no possible string matches the end of the source,’ otherwise return the index of the
‘ Check whether a string starts with one of multiple possible choices.’ Return -1 if no possible string matches the start of the source,’ otherwise return the index of the
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
The following code disables right mouse click.
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
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
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
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,
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
hanks to the driving technologies of the 90s?namely, the Internet and enterprise databases?data collection and storage have become easier and cheaper than ever before. This has caused many organizations to
‘ 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
‘ 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
‘ Return the value of the public field with the specified name,’ defined inside the obj object’ Note: requires Imports System.Reflection” Example:’ Public TestField As String = “hello”‘ …’ MessageBox.Show(GetField(Me,
‘ 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,’
‘ 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”))
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.
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
s I write this, four parts have been published in this series (see the left column). Now is the time to focus on how to access the database. As I
‘ Retrieve the content of an embedded text file’ Note: the file must be included in the project as an embedded resource.’ – after adding the file to the project
‘ Check whether a given regular expression is in valid format’ Examples:’ Debug.WriteLine(IsValidRegularExpression(“^(((d{3}) ‘ ?)|(d{3}-))?d{3}-d{4}$”)) ‘ => True’ Debug.WriteLine(IsValidRegularExpression(“^[|)$”)) ‘ => FalseFunction IsValidRegularExpression(ByVal regex As String) As Boolean Try Dim
‘ Return a validation summary string with all the error messages, if any,’ of the controls inside the specified container,’ associated to an ErrorProvider control’ ‘ Example:’ Dim summary As
‘ Check whether an object is storing a numeric value’ Examples:’ Dim s As String = “hello”‘ Dim d As Double = 2.4′ Dim i As Integer = 5’ Debug.WriteLine(IsNumeric(d))
‘ 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 _
‘ Returns an array with all the controls in the specified container control and ‘ its child containers’ Example:’ ‘ print the name of all the controls on the form
eb services are all about two things: XML and WSDL. When you build a Web service in a commercial platform such as Microsoft .NET or J2EE, you are building a











