468,242 Members | 1,474 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,242 developers. It's quick & easy.

Noob question

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
2 1693
> 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
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.

By using this site, you agree to our Privacy Policy and Terms of Use.