Advertisement

Results for "Author: vb faq"

ASP_Volume2 #29745
Avoiding use of null

How do you avoid the "Invalid use of null" error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: "Invalid use of Null". Here is one way to get around this problem: ..

ASP_Volume3 #44403
StopTextBoxFromBeeping

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time:

ASP_Volume3 #44404
DetectPreviousInstance

How do I prevent multiple instances of my program? In VB 3 and above, the property App.PrevInstance is set to True if an older instance of the program already exist.

ASP_Volume3 #44405
Changing Windows Printer w/o using priint dialog

How can I change the printer Windows uses in code without using the print common dialog? How can I change orientation? You can change the printer the VB 3.0 Printer object is pointing to programmatically (without using the common dialogs). Just use the WriteProfileString API call and rewrite the [WINDOWS], DEVICE entry in the WIN.INI file! VB will instantly use the new printer, when the next Printer.Print command is issued. If you get the old printer string before you rewrite it (GetProfileString API call), you can set it back after using a specific printer. This technique is especially useful, when you want to use a FAX printer driver: Select the FAX driver, send your fax by printing to it and switch back to the normal default printer.

ASP_Volume3 #44406
Launch file and associated program

How do I launch a file in its associated program? The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method:

ASP_Volume3 #44407
Avoiding use of null

How do you avoid the "Invalid use of null" error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: "Invalid use of Null". Here is one way to get around this problem: ..

C_Volume2 #70802
StopTextBoxFromBeeping

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time:

C_Volume2 #70803
AppOnTop

How do I get my application on top?To make your window truly topmost, use the SetWindowPos API call

C_Volume2 #70804
DetectPreviousInstance

How do I prevent multiple instances of my program? In VB 3 and above, the property App.PrevInstance is set to True if an older instance of the program already exist.

C_Volume2 #70805
Changing Windows Printer w/o using priint dialog

How can I change the printer Windows uses in code without using the print common dialog? How can I change orientation? You can change the printer the VB 3.0 Printer object is pointing to programmatically (without using the common dialogs). Just use the WriteProfileString API call and rewrite the [WINDOWS], DEVICE entry in the WIN.INI file! VB will instantly use the new printer, when the next Printer.Print command is issued. If you get the old printer string before you rewrite it (GetProfileString API call), you can set it back after using a specific printer. This technique is especially useful, when you want to use a FAX printer driver: Select the FAX driver, send your fax by printing to it and switch back to the normal default printer.

C_Volume2 #70806
Launch file and associated program

How do I launch a file in its associated program? The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method:

C_Volume2 #70807
Avoiding use of null

How do you avoid the "Invalid use of null" error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: "Invalid use of Null". Here is one way to get around this problem: ..

Java_Volume1 #89346
StopTextBoxFromBeeping

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time:

Java_Volume1 #89347
AppOnTop

How do I get my application on top?To make your window truly topmost, use the SetWindowPos API call

Java_Volume1 #89348
DetectPreviousInstance

How do I prevent multiple instances of my program? In VB 3 and above, the property App.PrevInstance is set to True if an older instance of the program already exist.

Java_Volume1 #89349
Changing Windows Printer w/o using priint dialog

How can I change the printer Windows uses in code without using the print common dialog? How can I change orientation? You can change the printer the VB 3.0 Printer object is pointing to programmatically (without using the common dialogs). Just use the WriteProfileString API call and rewrite the [WINDOWS], DEVICE entry in the WIN.INI file! VB will instantly use the new printer, when the next Printer.Print command is issued. If you get the old printer string before you rewrite it (GetProfileString API call), you can set it back after using a specific printer. This technique is especially useful, when you want to use a FAX printer driver: Select the FAX driver, send your fax by printing to it and switch back to the normal default printer.

Java_Volume1 #89350
Launch file and associated program

How do I launch a file in its associated program? The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method:

Java_Volume1 #89351
Avoiding use of null

How do you avoid the "Invalid use of null" error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: "Invalid use of Null". Here is one way to get around this problem: ..

1_2002 #103993
Launch file and associated program

How do I launch a file in its associated program? The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method:

1_2002 #103994
Avoiding use of null

How do you avoid the "Invalid use of null" error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: "Invalid use of Null". Here is one way to get around this problem: ..

Languages
Top Categories
Global Discovery