January 1, 2000

Suppress default Edit popup menu in TextBox controls with subclassing

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 the original

Track changes in system time and display resolution

Whenever the system time or the display resolution changes, Windows sends all the top-level windows (forms, in VB jargon) the WM_TIMECHANGE or WM_DISPLAYCHANGE message, respectively. Therefore, you can easily determine when these system-wide settings change by subclassing any form in your application, which is especially useful with the MsgHook DLL.Using

Determine maximum size and the position of a maximized form

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

Determine when a TextBox control is scrolled

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

Optimized Paint procedures with subclassing

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 updated by subclassing the

Detect when the application gets or loses the input focus

VB forms exposes the Activate and Deactivate events, which fire when the form gets and loses the focus because the user has clicked on another form of the same application. However, VB doesn’t fire any event when the user clicks on a form that belongs to another Windows application. In

HTML Basics: Basic Text Tags

Basic Text Tagsith only a small set of HTML tags you can create a functional page. The set of tags in this section let you set up an HTML file that has text in several variation, headlines, and rules. , , Required TagsEach HTML file needs a certain set of

Getting Graphics

o, you’ve decided to add some graphical pizzazz to your site: A dozen images, an animated GIF or two, a set of graphic dividers and bullets, and a cool background image to visually unify all your site pages. One obvious question looms large: How do you get hold of the

HTML Basics: Links

inking together different ideas and content is a basic strength of the Web. The very name “browser” comes from this idea. The browser lets you, from your desktop, browse through pages, images, and data around the world. Hypertext is the term that describes linking together content across many different locations.

No more posts to show