Tip Bank

DevX - Software Development Resource

Deleting Control Code

Question: How do I delete a control AND the corresponding code? Answer: When a control is deleted, the code is listed in the (general) section in the Procedures drop-down list

DevX - Software Development Resource

Intercepting Windows Messages

Question: I want to add a new item to the control box menu(or system menu). I add a new item using API’s likeAppendMenu and InsertMenu and both work fine, but

DevX - Software Development Resource

Advantages/Disadvantages of Using Sub Main

Question: Can you please tell me when do you use Sub Main and the advantages of using it? Answer: In certain programs, initialization code has to run before any windows

DevX - Software Development Resource

Using the CancelError Property

Question: You said there’s an example in the VB help file on use of theCancelError = true property. Where is it? In my app, I can get VB to generatethe

DevX - Software Development Resource

Problems With Single Quotes

Question: Single quotes are messing up my queries. What can I do to fix the following problem?Dim Criteria as StringCriteria=”Name LIKE ‘” & SearchName & “‘” ‘SearchName=”Sam O’Brien”‘At this Point

DevX - Software Development Resource

Exiting Windows

Question: How can I make my program totally exit Windows? When the user hits “Quit Windows”, I want Windows to exit. Answer: Use the ExitWindows API function. The declare statement

DevX - Software Development Resource

Network Logon/Logoff Functions

Question: I am trying to create a VB program to log a useronto a workgroup (from a windows for workgroupsclient) and then map local drives and devices toa network resource.

DevX - Software Development Resource

Setting Windows Wallpaper

Question: I am trying to use the API call SystemParametersInfo to change the Windows wallpaper. It works great in a Borland C program I wrote, but doesn’t work in VB.

DevX - Software Development Resource

Replacing OpenTable

Question: We have a Large VB application (code wise) and we are movingthe data from MS access to Sybase using the ODBC driver.Now, after we presented the project’s time tale