form_load and performclick()
-
Hi guys, Need some help please. I have a scan feature in my form and on form_load I am trying to fire the btnScan.performclick() event. It works but my form doesn't load until scanner times out or then I scan. I want the form to load and the picturebox to show no image while the scanner is waiting for an image. I hope I am making sense. Sameer
Sameer
-
Hi guys, Need some help please. I have a scan feature in my form and on form_load I am trying to fire the btnScan.performclick() event. It works but my form doesn't load until scanner times out or then I scan. I want the form to load and the picturebox to show no image while the scanner is waiting for an image. I hope I am making sense. Sameer
Sameer
-
Hi guys, Need some help please. I have a scan feature in my form and on form_load I am trying to fire the btnScan.performclick() event. It works but my form doesn't load until scanner times out or then I scan. I want the form to load and the picturebox to show no image while the scanner is waiting for an image. I hope I am making sense. Sameer
Sameer
-
-
For simplicity - use the BackgroundWorker component.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Hi guys, Need some help please. I have a scan feature in my form and on form_load I am trying to fire the btnScan.performclick() event. It works but my form doesn't load until scanner times out or then I scan. I want the form to load and the picturebox to show no image while the scanner is waiting for an image. I hope I am making sense. Sameer
Sameer
You don't put all the code for doing the scan in the btnScan.Click event handler. You put it in it's own method somewhere, then you can call that method from anywhere in your code, including the btnScan.Click event handler AND from in your Load event.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You don't put all the code for doing the scan in the btnScan.Click event handler. You put it in it's own method somewhere, then you can call that method from anywhere in your code, including the btnScan.Click event handler AND from in your Load event.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Thank you Dave for your response. I tried your suggestion and it didn't work, I believe the problem is that I have a while loop that waits for a response from the scanner in my btnscan_click event. I instead added a timer and I am calling the btnScan.Performclick from there. That seems to be working, I am not sure if this is the best way to go with it but it works :) Sameer
Sameer
-
Have a timer that gets started in the form load event, and then do the btnScan.PerformClick() in the timer's event handler.
----- In the land of the blind, the one eyed man is king.
-
For simplicity - use the BackgroundWorker component.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)