By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,836 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,836 IT Pros & Developers. It's quick & easy.

Noob question

P: n/a
Hi All,
Noob question that I can not seem to figure out:

I am trying to implement a screenscraper to pull data from two seperate
websites, here is some test code so far:

public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
MainForm mainForm = new MainForm();
//Application.Run(new MainForm());
Application.Run (mainForm);
mainForm.setStatusBarLabel("Ready");
//load prosight data
mainForm.loadProsightData();
Application.Run (mainForm);

}

Why, when debuging, does the system never go past Appplication.Run
(mainForm)?

In another method in the mainForm constructor, I load an
InternetExplorer object. I would like the statustext, and progress bar
from this object to feed and update a status bar in my mainform. If
Application.Run(mainform) would end, i could then use the
setStatusBarLabel function to update my status text.....

May 22 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> Why, when debuging, does the system never go past Appplication.Run
(mainForm)?
Because you told the app to run the form. The form is running. When the form
closes, the method will continue.

Put your form-specific code in the form.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"Dan McCollick" <mc*********@hotmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com... Hi All,
Noob question that I can not seem to figure out:

I am trying to implement a screenscraper to pull data from two seperate
websites, here is some test code so far:

public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
MainForm mainForm = new MainForm();
//Application.Run(new MainForm());
Application.Run (mainForm);
mainForm.setStatusBarLabel("Ready");
//load prosight data
mainForm.loadProsightData();
Application.Run (mainForm);

}

Why, when debuging, does the system never go past Appplication.Run
(mainForm)?

In another method in the mainForm constructor, I load an
InternetExplorer object. I would like the statustext, and progress bar
from this object to feed and update a status bar in my mainform. If
Application.Run(mainform) would end, i could then use the
setStatusBarLabel function to update my status text.....

May 22 '06 #2

P: n/a
Thanks Kevin, I think I certify for your Professional Numbskull title;

I called the Application.run, from the form. I will move this out into
it's own file.

Dan

Kevin Spencer wrote:
Why, when debuging, does the system never go past Appplication.Run
(mainForm)?


Because you told the app to run the form. The form is running. When the form
closes, the method will continue.

Put your form-specific code in the form.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"Dan McCollick" <mc*********@hotmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi All,
Noob question that I can not seem to figure out:

I am trying to implement a screenscraper to pull data from two seperate
websites, here is some test code so far:

public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
MainForm mainForm = new MainForm();
//Application.Run(new MainForm());
Application.Run (mainForm);
mainForm.setStatusBarLabel("Ready");
//load prosight data
mainForm.loadProsightData();
Application.Run (mainForm);

}

Why, when debuging, does the system never go past Appplication.Run
(mainForm)?

In another method in the mainForm constructor, I load an
InternetExplorer object. I would like the statustext, and progress bar
from this object to feed and update a status bar in my mainform. If
Application.Run(mainform) would end, i could then use the
setStatusBarLabel function to update my status text.....


May 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.