vb.net - IsWindow returns false for existing window handle -


in vb6 application checking if vb.net winforms window exists:

public declare function iswindow lib "user32" (byval hwnd long) long  if not iswindow(102937)       messagebox("window not found!") end if 

the messagebox shown, window exist.

i inspect

debug.print(me.handle.toint32)'it prints 102937 

what goes wrong here? perhaps handling return value of "iswindow" incorrectly?

thank you.

i found solution:

i indeed using winapi function incorrectly.

i should have used

if iswindow(102937) <> 1 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -