Click here to Skip to main content
15,892,537 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVB.net and GetForegroundWindow Issues/Bug??? Pin
brentleim13-Mar-07 4:58
brentleim13-Mar-07 4:58 
AnswerRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
Dave Kreskowiak3-Mar-07 6:25
mveDave Kreskowiak3-Mar-07 6:25 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? [modified] Pin
brentleim13-Mar-07 8:20
brentleim13-Mar-07 8:20 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
Dave Kreskowiak3-Mar-07 10:29
mveDave Kreskowiak3-Mar-07 10:29 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
brentleim13-Mar-07 10:56
brentleim13-Mar-07 10:56 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
brentleim13-Mar-07 12:43
brentleim13-Mar-07 12:43 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
Dave Kreskowiak3-Mar-07 13:29
mveDave Kreskowiak3-Mar-07 13:29 
GeneralRe: VB.net and GetForegroundWindow Issues/Bug??? Pin
Dave Kreskowiak3-Mar-07 13:26
mveDave Kreskowiak3-Mar-07 13:26 
DoEvents doesnt have an API call. All it does is release control so your application's message pump can process it's pending messages. But, this call is only for the application that calls DoEvents. It doesn't have any effect on the rest of the system.

As far as a workaround - you found it. Your VB6 code ignored the possibility of the call returning NULL. Just because it happened to work before doesn't make it a correct implementation of calling GetForegroundWindow.


Dave Kreskowiak
Microsoft MVP - Visual Basic


Question[Message Deleted] Pin
harveyhanson3-Mar-07 2:46
harveyhanson3-Mar-07 2:46 
AnswerRe: Easy one (I hope) Pin
JUNEYT3-Mar-07 2:53
JUNEYT3-Mar-07 2:53 
AnswerRe: Easy one (I hope) Pin
kubben3-Mar-07 4:30
kubben3-Mar-07 4:30 
Questionreading data from a barcode reader Pin
moseti3-Mar-07 2:29
moseti3-Mar-07 2:29 
AnswerRe: reading data from a barcode reader Pin
mr_lasseter3-Mar-07 4:05
mr_lasseter3-Mar-07 4:05 
AnswerRe: reading data from a barcode reader Pin
steve_rm3-Mar-07 6:09
steve_rm3-Mar-07 6:09 
QuestionImporting data from Foxpro to MS-Access Pin
hisuman1003-Mar-07 0:59
hisuman1003-Mar-07 0:59 
QuestionUrgent..SOS...SOS... Pin
NANCO3-Mar-07 0:57
NANCO3-Mar-07 0:57 
AnswerRe: Urgent..SOS...SOS... Pin
JUNEYT3-Mar-07 2:14
JUNEYT3-Mar-07 2:14 
AnswerRe: Urgent..SOS...SOS... Pin
Dave Kreskowiak3-Mar-07 6:15
mveDave Kreskowiak3-Mar-07 6:15 
GeneralRe: Urgent..SOS...SOS... Pin
TwoFaced3-Mar-07 8:25
TwoFaced3-Mar-07 8:25 
GeneralRe: Urgent..SOS...SOS... Pin
Dave Kreskowiak3-Mar-07 10:32
mveDave Kreskowiak3-Mar-07 10:32 
GeneralRe: Urgent..SOS...SOS... Pin
NANCO3-Mar-07 22:38
NANCO3-Mar-07 22:38 
GeneralRe: Urgent..SOS...SOS... Pin
Dave Kreskowiak4-Mar-07 3:00
mveDave Kreskowiak4-Mar-07 3:00 
GeneralStill... Pin
NANCO4-Mar-07 19:24
NANCO4-Mar-07 19:24 
GeneralRe: Still... Pin
Dave Kreskowiak5-Mar-07 3:14
mveDave Kreskowiak5-Mar-07 3:14 
Questionsystem Tray Pin
WestSideRailways3-Mar-07 0:02
WestSideRailways3-Mar-07 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.