Create a Safer Mid Function
If you often write complex string-parsing and manipulation algorithms, the last thing you want is to add more checks to ensure your string positions are not negative. Avoid the hassle
If you often write complex string-parsing and manipulation algorithms, the last thing you want is to add more checks to ensure your string positions are not negative. Avoid the hassle
Most VB programmers must display a form centered on a screen. You can do this in a variety of ways, but most ignore aspects of the environment such as the
If you’re faced with a string that needs to have certain characters removed from it, use the Replace() function to make the problem more manageable. For instance, use this code
Use this function to determine whether a string represents a valid time: Public Function IsTime(sTimeArg As String) As Boolean IsTime = IsDate(Format(Date, “short date”) & _ ” ” & sTimeArg)End
When you write a screen saver in C and the Windows SDK, a static library (SCRNSAVE.lib) allows you to create custom dialogs to change and request the password. But in
The Trim function has a serious shortcoming: It handles only space characters?not all the usual white spaces such as tabs, carriage returns, and line feeds. Instead of the standard Trim
In a large app, or even a small one, you can use Property Let and Property Get to make sure necessary variables and subsystems are initialized. This code is from
When VB’s MsgBox function doesn’t provide everything you need, you have to create a message-box
Handling multiple command-line arguments has always been ugly in VB, especially when some of the arguments are quoted because they contain characters such as spaces. For example, if you want