Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

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

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

Making a form appear as if it is disabled
Total Hit (2192) By changing the WS_CHILD style bit of a window, you can make it appear as if it is disabled, even if the form is fully active and functional. These are the statements you need:
Rating
Move focus with Up and Down keys
Total Hit (1829) In all standard controls, Up and Down arrow keys move the focus on the previous or next control in the TabIndex order, respectively. This contrasts with text boxes, where these keys move the caret on the adjacent character, which you can achieve in a more natural way using the Left and Right cursor ....Read More
Rating
Mutually exclusive list boxes
Total Hit (2085) Many Windows programs use two adjacent list box controls to let the user select a number of items from a list of available values; such list boxes are mutually exclusive, in the sense that a given item always appear in the list box on the left (available items) or in the list box on the right (items ....Read More
Rating
Open the list portion of a ComboBox control
Total Hit (3029) To programmatically open and close the list portion of a ComboBox control, all you need is sending the CB_SHOWDROPDOWN message to the control. Here is a routine that encapsulate the SendMessage API function: «Code LangId=1» Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ....Read More
Rating
Optimized Paint procedures with subclassing
Total Hit (2582) The Paint event doesn't provide with information about which region of the form must be actually repainted, and therefore forces the programmer to repaint the entire client area, which in some cases can be a time-consuming operation. You can determine the smallest rectangle that needs to be updat ....Read More
Rating
Overwrite mode for textbox controls
Total Hit (2392) By default, textbox controls work in insert mode, where each new character never overwrites existing ones. If you wish to implement overwrite mode you can take advantage of the fact that characters pressed by the user replace the currently selected text, if any. You need to declare a form-level ....Read More
Rating
Prevent an iconized window from being restored
Total Hit (1766) When the user clicks on an iconized (minimized) form in the taskbar, Windows sends that form a WM_QUERYOPEN message, and inspects the value returned to the operating system. If this value is zero, the operation is canceled. Using subclassing you can therefore determine when a form is about to be ....Read More
Rating
Provide a short description of the menu item being highlighted
Total Hit (2389) Visual Basic lacks of the capability to display a short description of the menu command being highlighted with the mouse or the keyboard, a feature that all professional applications should have. To add menu descriptions to your program, you must subclass the form and trap the WM_MENUSELECT message. ....Read More
Rating
Provide better visual feedback for disabled TextBox and ComboBox controls
Total Hit (1762) When you disable a control, VB grays its contents. However, often this action goes unnoticed by the end users. Here's a routine that changes the control's BackColor property in addition to changing its Enabled property:
Rating
Quickly build a simple About form
Total Hit (2299) If you need a quick-and-dirty About dialog box for your application, that maintains a consistent look with other Windows applications, look no further than the ShellAbout routine in SHELL32.DLL. Using this function you have little control on what the dialog displays, and you can only customize the P ....Read More
Rating
Quickly find which OptionButton is selected
Total Hit (1686) 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: «Code LangId=1» ' assumes that the control array contains three OptionButton controls intSelected = Option(0).Value * 0 - Option(1).Va ....Read More
Rating
Read and modify a TextBox control's formatting rectangle
Total Hit (3460) By sending appropriate messages to a multi-line TextBox control you can read and modify its formatting rectangle - that is, the inner portion of the control where the user can type. Modifying the size and position of this area can be useful, for example, to leave a left margin where you can add line ....Read More
Rating
References to form and controls prevent complete form unloading
Total Hit (1796) When you assign a reference to a form (or one of its controls) to an object variable which is stored outside the form module, you must set the variable to Nothing or the form won't be completely unloaded. In other words, it will become invisible but will continue to take memory. Note that this i ....Read More
Rating
Remove the Close command from the system menu
Total Hit (3233) If you want to prevent the user from closing a form by using Alt+F4 or by clicking on the "X" button in the upper-right corner you just need to write some code in the form's QueryUnload event procedure: «Code LangId=1» Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) ....Read More
Rating
Save and reload form settings from system registry
Total Hit (2176) You can put VB's registry functions to good use by creating a few reusable routines that save, reload, and delete size and state of a form in your program.
Rating
Set tab stop positions for a multiline TextBox control
Total Hit (2510) By default, multiline TextBox controls insert a tab stop position every 8 characters; in other words, if you press the Ctrl+Tab key while the focus is inside a multiline TextBox control, the caret advances to position 8,16,24, etc. (If the TextBox is the only control on the form that can receive the ....Read More
Rating
Show a custom caret
Total Hit (2636) VB gives you no control on the size of the text caret. At times it can be necessary to change its size, however, for example when you want to signal that the TextBox is in overwrite mode. Here's a routine that does the trick: «Code LangId=1» Private Declare Function GetFocus Lib "user32" () As ....Read More
Rating
Show a custom popup menu for a TextBox without subclassing
Total Hit (2072) Elsewhere in the TipBank we show how you can display a custom popup menu on a TextBox control by subclassing the WM_CONTEXTMENU message that Windows sends the control when the user right-clicks on it. If you don't like to resort to subclassing for such an easy job, you can use the following tip, tak ....Read More
Rating
Smart Tab key processing in multiline TextBox controls
Total Hit (2468) The only way for a Tab key to insert a tab character in a multiline text box is that the text box is the only control on the form, or at least the only control whose TabStop property is set to True. Otherwise, pressing the Tab key you simply move the focus to another control on the form. If there ....Read More
Rating
Suppress default Edit popup menu in TextBox controls with subclassing
Total Hit (1884) When you right-click a TextBox control, Windows sends it a WM_CONTEXTMENU message, to which VB reacts by displaying the default Edit popup menu, that contains editing commands such as Cut, Copy, Paste, and Select All. Using a subclassing technique you can easily trap this message before it reaches t ....Read More
Rating
Ensure that a TextBox caret is visible
Total Hit (3145) 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:
Rating
Extended user interface for combo boxes
Total Hit (2950) 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
Rating
Get a reference to a form given its name
Total Hit (1964) 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:
Rating
Get the handle of the edit portion of a ComboBox
Total Hit (3004) 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
Rating
Hide and Show a control's scrollbars
Total Hit (3302) 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
Rating
Highlight current word and line in a TextBox control
Total Hit (3043) 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
Rating
Highlight the contents of a control on entry
Total Hit (1849) 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
Rating
Implement a MaxLength property for the ComboBox control
Total Hit (2190) 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
Rating
Incremental searches within list boxes
Total Hit (2595) 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
Rating
Make a Checkbox control read-only
Total Hit (3003) 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
Rating


(Page 124 of 133) 3968 Result(s) found  ... 121 122 123 124 125 126 127 128 129 130 131 132 133

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

© 2008 BinaryWorld LLC. All rights reserved.