简体   繁体   中英

How to suppress a call to a dll to open warning dialog box in vb.net

I am calling a function in an external dll to a device that runs some firmware. When I call device_open(), the device driver brings up a Warning dialog box that says there is a newer version of the firmware available. How do I suppress the warning dialog box? I am calling this function during an overnight test, so the dialog box prevents my tests from finishing.

Given your use case scenario, I doubt that, writing code to resolve this problem, really worth the effort required (API to FindWindow, KeyStroke to send to the dialog, etc).
I suggest this free utility that runs keyboard macro AutoHotKey . (I'm not linked to them) Search, in particular, for the WinWaitActive macro

Pay attention to the Run as Administrator problem for this kind of utility in Windows 7 or Vista

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM