Avoiding Crashes Due to Multiple Deletes
Many times, a program crashes due to multiple deletes on the same pointer. In some cases, this is due to a programming error that can be removed. There are situations,
Many times, a program crashes due to multiple deletes on the same pointer. In some cases, this is due to a programming error that can be removed. There are situations,
It’s common practice in C, to do a memset on structures, in order to initialize all member variables to some default value, usually NULL. Similarly, you can use memset to
It is common knowledge that the only difference between a struct and a union in C is that all elements of a union share the same memory location but the
I have frequently seen bulletin board requests on how to create MSACCESS databases with VB. To do this, add a reference to the Microsoft DAO _._ Object Library (I am
ComboBox controls, out of the box, don’t help complete phrases as they are typed in. The sample code below accomplishes that task. cmb is the name of the ComboBox to
An object in a Netscape Directory Server can only be deleted if it is a terminal node. This restriction causes the writing of source code to delete an object and
In almost all Web based applications, parameters received from a previous form as a query string will have to be passed to the next form as the same. However, the
It’s really a pain to continually register, unregister, and reregister a DLL (or worse, many DLLs) using REGSVR32. Importing the following into your registry, allows you to set up options
In applications like JRun, which output to log files but not to the console, it is difficult to analyze output at real-time. It is necessary to go into the log
Servlets and JSPs are the defacto method of server side computing today. Servlets form the logic of the application code and formatting for output is done with the help of
This addin is designed to check the spelling of your VB comments and/or double-quoted string literals inside your VB6 IDE using a procedure similar to MS-Word without checking the rest
‘ set new values for keyboard speed and delay” DELAY is the timeout after which auto.repeat starts’ can range from 0 (250ms) to 3 (1 sec)’ SPEED is the speed
Private Declare Function SystemParametersInfo Lib “user32” Alias _ “SystemParametersInfoA” (ByVal uAction As Long, ByVal uParam As Long, _ ByRef lpvParam As Any, ByVal fuWinIni As Long) As LongConst SPI_GETKEYBOARDDELAY =
Private Declare Function GetAsyncKeyState Lib “user32″ (ByVal vKey As Long) As _ Integer’ Return True if all the specified keys are pressed” you can specify individual keys using VB constants,
Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal Bytes As Long)’ compress a block of memory (a string, an array, a bitmap)’
‘——————————————-‘ PerformanceTimer class module’——————————————-‘ Use this class to profile your code and any other operation’ typically with a precision greater than 1 millionth of a second” As soon as you
The String class is probably one of the most used classes in Java. String concatenation via the Related Posts Comparing Two IntegersMicrosoft Buys Cloud Security Vendor AdallomRed Hat Releases Ansible
Java has some strict rules for exception handling when it comes to inheritance and overriding of methods.Consider this example: class Base { void amethod() { }}class Derv extends Base{ void
If you Related Posts Amazon’s Black Friday Bonanza for TP-Link Smart HomesFind if a string contains one of the given words in JavaWhy Is Your Device Saying Your Wi-Fi Security
We often come across situations where we have to rank things/persons based on certain criteria, such as ranking Students based on their scores.Take, for example, a SCORES table with two
A compact way of handling null database fields is as follows: txtText1.text = Format(rs!Field) If rs!Field is null, Format(rs!Field) will resolve to an empty string.Otherwise the value in the recordset
Handle dialogs with one line of code by encapsulating the show method within the form in a public function. This makes the form/dialog reusable and simpler to implement and update.
An alternate, convenient way to view recordsets in debug mode is to persist a recordset to disk using rs.save MyFileUNC.ADTG in the immediate window. Note that the file must be
This tip can be used as a Select Case statement with a MsgBox statement. Because a variable is not used to hold the response, adding one or more handles for
Shipping custom controls with their own set of popup menu items make the controls appear appropriately professional. They add ease of use, functionality and value to the control(s). Here’s how
This piece of code lets you display an item in a list box as that list box’s tooltip. Private Sub lstItems_MouseMove(Button As Integer, Shift As Integer, X As Single, Y
If you are unsuccessful at attempting to bind to an object residing in a Netscape Directory Server and you are using ADSI in VB or VBscript, you are likely using
This is one of the simplest, but most powerful, ways to make a form scrollable. This method automatically disables or enables scrollbars according to the size of the area in
Many programmers use Visual Basic’s Clipboard object to perform Cutting, Copying, Pasting and Undoing code. For example, to copy some text from a textbox, programmers sometimes use the following code:
Sometimes there is a need to group records into two larger categories, regardless of all other groupings. Using the Northwind database for an example, let Related Posts How to Schedule