Advertisement

Results for "Author: vb faq"

1_2002 #103995
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:

1_2002 #103996
AppOnTop

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

1_2002 #103997
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.

2_2002-2004 #116493
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:

2_2002-2004 #116494
AppOnTop

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

2_2002-2004 #116495
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.

2_2002-2004 #116496
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.

2_2002-2004 #116497
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:

2_2002-2004 #116498
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: ..

3_2004-2005 #135037
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:

3_2004-2005 #135038
AppOnTop

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

3_2004-2005 #135039
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.

3_2004-2005 #135040
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.

3_2004-2005 #135041
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:

3_2004-2005 #135042
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: ..

4_2005-2006 #149700
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:

4_2005-2006 #149701
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.

4_2005-2006 #149702
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.

4_2005-2006 #149703
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:

4_2005-2006 #149704
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