Progress bar for application loading
-
HI, Is there way to have the progress bar works according the loading percentage of another application opened from my application? Thanks.
-
HI, Is there way to have the progress bar works according the loading percentage of another application opened from my application? Thanks.
No. There is no information that is returned by the system's loader at any time, let alone anything useful for a progress bar. Your other application would have to expose something like this, but can only do so after it's loaded, started, and initializing itself. Dave Kreskowiak Microsoft MVP - Visual Basic
-
No. There is no information that is returned by the system's loader at any time, let alone anything useful for a progress bar. Your other application would have to expose something like this, but can only do so after it's loaded, started, and initializing itself. Dave Kreskowiak Microsoft MVP - Visual Basic
Actually, I just need an indication that the application has loaded. If this is the case, is there any way to do it?
-
Actually, I just need an indication that the application has loaded. If this is the case, is there any way to do it?
szevy_suez wrote:
I just need an indication that the application has loaded.
What does that mean? If you talking about the application initializing itself, then yes you can. All you have to do update the ProgressBar in your applications initialization code. If you're talking about a progress bar while the application is being loaded from disk, then no, you can't. The system Loader doesn't provide any feedback at all. Your ProgressBar would go from 0 to 100% in one step. Dave Kreskowiak Microsoft MVP - Visual Basic
-
szevy_suez wrote:
I just need an indication that the application has loaded.
What does that mean? If you talking about the application initializing itself, then yes you can. All you have to do update the ProgressBar in your applications initialization code. If you're talking about a progress bar while the application is being loaded from disk, then no, you can't. The system Loader doesn't provide any feedback at all. Your ProgressBar would go from 0 to 100% in one step. Dave Kreskowiak Microsoft MVP - Visual Basic
Dave Kreskowiak wrote:
If you talking about the application initializing itself, then yes you can. All you have to do update the ProgressBar in your applications initialization code.
Sorry, but I don't really understand what you mean by application initializing itself. Actually, I just want my application to know when the other application has loaded, so I can make that application the active application at that instance and use sendkeys method. So I thought can set a condition if the progressbar is 100% then I can proceed with Appactive and sendkeys methods. I don't know whether it's appropriate, please advice. Thanks
-
Dave Kreskowiak wrote:
If you talking about the application initializing itself, then yes you can. All you have to do update the ProgressBar in your applications initialization code.
Sorry, but I don't really understand what you mean by application initializing itself. Actually, I just want my application to know when the other application has loaded, so I can make that application the active application at that instance and use sendkeys method. So I thought can set a condition if the progressbar is 100% then I can proceed with Appactive and sendkeys methods. I don't know whether it's appropriate, please advice. Thanks
szevy_suez wrote:
Actually, I just want my application to know when the other application has loaded
As far as the application being loaded is concerned, it's when the next statement after whatever your using to load the other app executes. But that's NOT when the other app finishes initializing and doing its own startup stuff. There's no way to tell when that's done. The only thing you can do is write a routine to look for the title of a window in that application every so often. A ProgressBar isn't going to help you at all...
szevy_suez wrote:
then I can proceed with Appactive and sendkeys methods
Good luck! Using SendKeys is not the most reliable way to controlanother application. The best method is if the application exposes a COM object model. Dave Kreskowiak Microsoft MVP - Visual Basic