November 18, 1997

Eliminating the Enter Key Beep

Question: I hear a “beep” when I press the ENTER key in a text box. How can I disable it? Answer: This is a common problem with the TextBox control. To eliminate the beeping, add the following code to the KeyPress event of the TextBox control:Sub TextBox1_KeyPress(KeyAscii As Integer) If

Wrapper Class

Question: In VB4, how do I create a wrapper class for a textbox?I want to be able to add properties to a textbox. Answer: There are many approaches you can take to this. Typically, you’ll want to expose a Client property of the class, to which you’ll assign the textbox.

Picking coordinates outside your window(s)

Question: How do I make my program respond to “mousedown” outside my form? For instance: How would I get my program to tell me the pixel coordinants of my cursor when I click? Answer: You really can’t do that under Win32. However, you *can* have it respond to MouseUp! I