Atlanta Custom Software Development 

   Search        Code/Page

User Login



Forgot the Password?
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
VB VB (1648) (736)
C# C# (15) (779)
ASP ASP (41)
VC++ VC++ (25)
JScript JScript (5)
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
» (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» (4)
» VC (3)
» HTML/CSS/JavaScript (10)
» Regular Expr Tester
» Free Tools

(Page 5 of 133) 3985 Result(s) found 


Correctly set scrollbars' width and height
Total Hit (2588) You should always modify a vertical scrollbar's width and a horizontal scrollbar's height to conform to the display resolution. You can learn the suggested size (in pixels) using the GetSystemMetrics API function, then convert it to twips, and rezise all the scrollbars on your forms accordingly. The ....Read More
Create a owner form with API functions
Total Hit (2353) Starting with VB5, the Show method supports a second optional argument, that lets you specify which form owns the form that is about to be displayed: «Code LangId=1» Form2.Show , Me «/Code» A owned form is always displayed in front of its owner, and when the owner is unloaded, VB automatical ....Read More
Create arrowed buttons without icons
Total Hit (3278) You don't need to use icons or bitmap to create buttons with arrows on them. In fact, you just have to select the "Windings" font, set a suitable font size (e.g. 12 or 14 points), and then enter one of these characters: «Code LangId=1» Line arrows Chr$(223) Left Arrow Chr$(224) Right Arrow Chr ....Read More
Create colorful Command Buttons
Total Hit (3533) The VB CommandButton control supports neither the ForeColor nor the BackColor properties. If you want to create colorful buttons without resorting to 3rd party controls, you can use an OptionButton control with the Style property set to 1-Graphical. Such OptionButton controls appear to be very simil ....Read More
Create ListBox controls with companion priority buttons
Total Hit (2212) You can easily create a ListBox control similar to the one found in the VB's Project References dialog box, that lets you select multiple items and move them up and down using two companion buttons. First of all, create a ListBox control (say, List1) and two CommandButton controls to its right, n ....Read More
Create TextBox with dithered background
Total Hit (1722) If your video display has 256 colors or less and you assign a dithered color to the BackColor property of a TextBox control, you'll find that the background color under the text inside the TextBox is displayed in a different (solid) color. To work around this issue, you must trap the WM_CTLCOLOR ....Read More
Cut, copy, and paste using API functions
Total Hit (4078) Copying and pasting text and images programmatically isn't difficult at all, using the methods of the Clipboard object. However, implementing a generic Edit menu that copies and pastes the highlighted contents of whatever control is the selected control is often cumberson. For example, depending on ....Read More
Detect whether a field on a form has been edited
Total Hit (1609) Many tip & trick collections report that you can learn if the contents of a text box has been modified by sending a EM_GETMODIFY message to the control. Actually, getting this information is much more simple. Just test the DataChange property: if non zero the field has been modified since the form w ....Read More
Determine how a control got the focus
Total Hit (1882) At times it might be convenient to know how a given control got the focus, namely by means of the Tab key, an associated hotkey or a click of the mouse. You can learn this information through the GetKeyState API function, that returns the current state of a key. Here is a simple function that is mea ....Read More
Determine maximum size and the position of a maximized form
Total Hit (1922) When the user resizes a form with the mouse or the keyboard, or maximizes it, Windows sends the form a WM_GETMINMAXINFO message, with lParam pointing to a MINMAXINFO structure that the form must fill with information about the minimum and maximum size that it is willing to be resized. Using a subcla ....Read More
Determine the current line in a multiline TextBox control
Total Hit (3036) You can determine the line where the caret is in a multiline TextBox control by sending the control a EM_LINEFROMCHAR message, as follows:
Determine when a ComboBox's area is being closed
Total Hit (1830) 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 area is being closed. You can achieve this by intercepting the WM_COMMAND message that the ComboBox control sends to its c ....Read More
Determine when a TextBox control is scrolled
Total Hit (1294) When the user scrolls the contents of a TextBox control - either by clicking on the companion scrollbars or by typing new characters in the edit area - the TextBox control sends its parent form a WM_COMMAND message, and passes its own hWnd property in lParam and the value EN_HSCROLL or EN_VSCROLL in ....Read More
Determine whether a control has a scrollbar
Total Hit (2417) There is no built-in VB function that lets you know whether a control - such as a ListBox - is currently displaying a vertical scrollbar. Here's a pair of functions that check the control's style bits and return a Boolean that tells if a vertical or horizontal scrollbar is visible: «Code LangId=1 ....Read More
Don't hard-code font names and size
Total Hit (1365) Unless you have good reason to do otherwise, you should always use standard fonts in your programs, because this ensures that your application will work on every Windows system. If you want to use non-standard fonts, you should at least adopt the following guidelines: «Code LangId=1» Assign ....Read More
Don't stop timers when a MsgBox is active
Total Hit (1617) Not all developers know that Timer controls in compiled VB5 and VB6 applications aren't stopped by MsgBox statement, so the Timer's Timer event procedure is regularly executed even when the message box is being displayed on the screen. However, inside interpreted applications under all VB version ....Read More
Don't use SetFocus on invisible controls
Total Hit (1673) In the Show event of a form you might be tempted to use SetFocus to select which field the end user should begin working with. However, this method raises an error 5 when applied on a control that is currently invisible. If the logic of your application should give the focus always to the same c ....Read More
Dragging caption-less forms
Total Hit (2417)
Enable and Disable all or part of a scrollbar
Total Hit (2972) The new FlatScrollbar controls expose the ability to selectively disable their arrows. This is useful, for example, when the thumb indicator is at its minimum or maximum: «Code LangId=1» Private Sub FlatScrollBar1_Change() If FlatScrollBar1.Value = FlatScrollBar1.Min Then FlatScrol ....Read More
Ensure that a form's TextBox and ComboBox controls have same height
Total Hit (2488) 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 have a form that contains both TextBox and ComboBox controls, you should ensure that all your single-line TextBox controls a ....Read More
Ensure that a TextBox caret is visible
Total Hit (2589) Setting a multiline TextBox's SelStart property doesn't ensure that the insertion point (the caret) is visible. You can achieve this by sending the control an appropriate message:
Extended user interface for combo boxes
Total Hit (2430) Apart from the different kind of combo boxes you can obtain by manipulating the Style property, another feature is made available by Windows when dealing with combo box controls, the so-called extended user interface. With standard combo box controls, the list portion stays invisible until the user ....Read More
Get a reference to a form given its name
Total Hit (1616) In some cases you might want to activate a form given its name, but VB doesn't let you do it directly. However, it is easy to create a function that does it by iterating over all the forms in the current project:
Get the handle of the edit portion of a ComboBox
Total Hit (2522) The ComboBox control contains an invisible Edit window, which is used for the edit area. In most cases you don't need to access this inner control directly, but occasionally a direct control of that window can be useful. The first thing to do is get the handle of such inner Edit control, which you d ....Read More
Hide and Show a control's scrollbars
Total Hit (2674) Most VB controls don't let you determine whether they should display a scrollbar or not. For example, a VB ListBox control displays a vertical scrollbar only when the number of its items is larger than the number of visible items. If you want to directly control individual scrollbars, you can use th ....Read More
Highlight current word and line in a TextBox control
Total Hit (2601) Here's a simple way to highlight the current word in a TextBox control (i.e. the word where the caret is): «Code LangId=1» Text1.SetFocus SendKeys "^{LEFT}+^{RIGHT}" «/Code» Similarly, you can highlight the current line in a multiline TextBox control as follows: «Code LangId=1» Text1.SetFo ....Read More
Highlight the contents of a control on entry
Total Hit (1474) Here's a simple way to highlight the current word in a TextBox control (i.e. the word where the caret is): «Code LangId=1» Text1.SetFocus SendKeys "^{LEFT}+^{RIGHT}" «/Code» Similarly, you can highlight the current line in a multiline TextBox control as follows: «Code LangId=1» Text1.SetFo ....Read More
Implement a MaxLength property for the ComboBox control
Total Hit (1783) Unlike the TextBox control, the ComboBox control doesn't expose any MaxLength property, so you have no means of limiting the numbers of characters typed by the end user in the edit area. However you can set this value by sending a CB_LIMITTEXT message to the control, passing the maximum number of ch ....Read More
Incremental searches within list boxes
Total Hit (2138) The DBList and DBCombo controls expose a MatchEntry property, that - when set to True - permits to perform quick incremental searches by simply typing the searched sequence of characters. If MatchEntry is set to False, any time the user presses a key, the next item that begins with that character be ....Read More
Make a Checkbox control read-only
Total Hit (2572) By default, VB's CheckBox controls automatically toggle their Value property when the user clicks on them. This is usually the desired behavior, but at times you may want to be able to change their value only programmatically. Unfortunately, you can't achieve this result by simply setting the CheckB ....Read More

(Page 5 of 133) 3985 Result(s) found  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ...

Recommanded Links


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.