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

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

 

Making a form appear as if it is disabled
Total Hit (1683) 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 (1325) 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 (1661) 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 (2518) 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 (2083) 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 (1924) 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 (1365) 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 (1939) 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 (1365) 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 (1750) 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 (1300) 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 (2761) 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 (1409) 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 (2687) 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 (1717) 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 (1947) 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 (2174) 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 (1621) 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 (1900) 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 (1457) 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
Suppress Max and Min buttons in MDI forms
Total Hit (1780) Unlike regular forms, forms don't expose the MinButton and MaxButton properties and these buttons are always displayed. You can suppress these buttons using the following code:
Rating
The behavior of the LostFocus event depends on VB version
Total Hit (1336) The behavior of the LostFocus event has changed in the transition from VB4 to VB5. Under VB4, if a control on a form has the input focus and the user clicks on a toolbar button, the control fires a LostFocus event. Under VB5 and VB6, the same action doesn't fire any LostFocus event, so you must awar ....Read More
Rating
The fastest way to append contents to a TextBox control
Total Hit (1442) The most intuitive way to append a string to the current contents of a TextBox is through the & string operator, as in: «Code LangId=1» Text1.Text = Text1.Text & "more text" «/Code» However, you can reach the same result about 4 times faster with the following method: «Code LangId=1» Tex ....Read More
Rating
The first visible line in a multiline TextBox control
Total Hit (3420) To determine the index of the first visible line in a multiline TextBox control you only need to send it the EM_GETFIRSTVISIBLELINE message: «Code LangId=1» Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Lon ....Read More
Rating
The number of lines in a multiline TextBox control
Total Hit (2273) You can quickly determine how many lines of text are contained in a multiline TextBox control whose Scrollbars property is set to 3-Both - that is, when the TextBox behaves like a programmer's editor - by counting the number of CR-LF characters in the Text property. You can do that in just one line ....Read More
Rating
Topmost windows
Total Hit (1617) This is an evergreen, but it's still popular. It is very easy to create a window that always stays on top of the others, thanks to the SetWindowPos API function. Here is a general procedure that can be called to make a form the topmost window and to revert to the normal status. This capability is ex ....Read More
Rating
Undo changes in a TextBox control
Total Hit (3238) The TextBox control supports the capability to undo changes, but there is no property or method that exposes this feature. You can achieve the same goal with a a set of messages. «Code LangId=1» Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ....Read More
Rating
Unload a form with shrinking effect
Total Hit (1265) A simple way to add some pizazz to your forms is by minimizing them and then closing them, instead of making them disapper istantaneously. Just try this code: «Code LangId=1» Private Sub Form_Unload(Cancel As Integer) Me.WindowState = vbMinimized End Sub «/Code» ....Read More
Rating
Use a ListBox as a poor man's grid
Total Hit (1828) 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 of grid control with (very) limited functionality, but without using third-party controls. You can set ListBox's tab stop by sending the ....Read More
Rating
Use DataChanged with unbound controls
Total Hit (1612) When you need to learn if a field has been changed by the user, you have at least three options: you can use a global boolean variable and set it in the control's Change event, or you can save the original value in global variable to compare it against the current value you can use the EM_GE ....Read More
Rating


(Page 6 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.