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 remove_if() algorithms (defined in the standard header ) has the following prototype: template ForwardIterator remove (ForwardIterator first, ForwardIterator last, Predicate pred); The first two arguments mark the sequence’s beginning
The Standard Library defines the std::remove() algorithm, which moves desired elements to the front of a container and returns an iterator pointing to the end of the sequence of the
This control is a great substitute for the ProgressBar included in the Common Windows Controls package and can give a nicer look to your applications. It has a BackColor property,
The ComboBox control exposes the DropDown event, that lets you determine when its list area is being opened. However, VB doesn’t offer any simple way to understand when the list
‘ ensure that a listbox item is visible’ if the second argument is omitted, the index of current item is used” NOTE: uses the ListBoxVisibleItems functionSub ListBoxEnsureVisible(lst As ListBox, Optional
In general you don’t have any control on a ComboBox’s Height property, because it is determined automatically by VB depending on the font used for the ComboBox control. If you
Private Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypePrivate Declare Function GetWindowRect Lib “user32” (ByVal hWnd As Long, _ lpRect As RECT) As
By default, VB ListBox controls don’t display an horizontal scrollbar, so if the items you add to the controls are wider than the control’s Width, the end user isn’t able
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongPrivate Declare Sub CopyMemory
The modulus operator can only be applied to integral types. To compute the remainder of two floating point variables, you have to use the fmod() function instead. Fmod() is declared
The Procedures Sort Add-In is a great add-in for those who like well-organized code. You can use it to sort your procedures in the active CodeWindow alphabetically. It preserve all
A myth that is still being spread in various VB and MTS/COM+ related newsgroups, is that an application can not obtain a reference to the MTS or COM+ ObjectContext in
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst LB_FINDSTRING = &H18FConst
Private Declare Function GetMenu Lib “user32” (ByVal hWnd As Long) As LongPrivate Declare Function GetSubMenu Lib “user32” (ByVal hMenu As Long, _ ByVal nPos As Long) As LongPrivate Declare Function
Private Declare Function GetWindowLong Lib “user32” Alias “GetWindowLongA” _ (ByVal hWnd As Long, ByVal nIndex As Long) As LongConst GWL_STYLE = (-16)Const WS_DISABLED = &H8000000′ Return True if the form
You can easily create columns of data in a ListBox control by setting its tab stop at appropriate positions. This way, you can use a ListBox control as a sort
Often OptionButton controls are arranged in control arrays. To quickly find the index of the only selected OptionButton control you can use the following code: ‘ assumes that the control
‘ Tile a bitmap to a form or a Bitmap box” Target can be a Form or a BitmapBox control’ Bitmap can be the Bitmap property of a PictureBox or
When developing Access 97 applications using VBA, you may have problems porting your application to other computers. Run time errors can occur from basic VBA commands, especially when rolling out
Using Swing, you can set the color of each node in Jtree. This is done by customizing your own TreeCellRenderer (overriding the DefaultTreeCellRenderer class), then calling the setBackgroundSelectionColor() method of
Question: Is there any way to test if a socket is still open without writing to it? Answer: Despite being relatively easy to use, the Socket class is not implemented
Question: In the first servlet we set the value for HTTP header as below: response.setHeader(“SessionKey”,”SessionValue”); In the next servlet we tried retrieving the above set header value as: request.getHeader(“SessionKey”); We
There are times when you’d like to know a little bit about how your Web page will print. For example, if you are dynamically generating reports, you can put a
I like the idea of clicking on a VB label that looks like a Web anchor and pops up the Web browser pointing the user to the page. Here is
When using C++, the Union enables programmers to look at the same memory area from different perspectives. The same is possible in Visual BASIC. There is an LSET statement that
Private Sub BubbleSort(varArray As Variant, bAscending As Boolean) ‘Option Base 0 is assumed Dim HoldEntry As Integer Dim SwapOccurred As Boolean Dim iItteration As Integer Dim i As Integer SwapOccurred
A simple way to get around having to handle Nulls in fields from recordset is to concatenate a zero length string at the end of the field value, as illustrated
Public Function ValidateTextToNumeric(ctlToValidate As TextBox)’**********************************’This function tests the validation’for Numeric value of a given text’**********************************Dim strTextToValidate As StringDim blnNumericValid As BooleanstrTextToValidate = ctlToValidate.Text’*** Validation would be TRUE, in all the
What is the simplest way to keep track of session information if the cookie is disabled in the client? Even though we have other alternative solutions like passing the session
On a form, basing populating controls on a supplied record may lead to error, because a perfect match is needed between the control tags and the field list. Any pre-specified











