devxlogo

Tip Bank

Current Directory

Question: I made a project that resides in a subdirectory under Microsoft Visual Basic 4. Example: C:/Program Files/Microsoft Visual Basic// When I run the program, I want it to get

Identity column in SQL server database

Question: I inserted a new row in a table with Identity column, and saved it by calling update function. Then I immediatly tried to modify this record and update again.

Context-sensitive help

Question: When a user wants to find help on a column that has focus, I want that user to be able to hit F1, and help to be displayed based

Problems with TypeOf

Question: Given: Dim oX as Object Set oX = optChoice1 If TypeOf oX is CheckBox Then… If optChoice1 is a CheckBox the If… will be true unless optChoice1 is an

Powerscript – Mouse

Question: How do you get the position of the mouse pointer (x- and y-cordinates) in a script? Answer: Use the PointerX() and PointerY() functions.

Find if directory exists

Question: We would like to find out if a directory that was typed exists. Furthermore, we prefer not to use a list box control or getFileOpenName. Answer: To do this

Application Start Directory

Question: My application is started by clicking an icon with a TARGET of “\itgcssd1sgrsv3.0132sgrs.exe” and a START IN directory of “c:winnt”. Is there any way to determine the TARGET location