PC Review


Reply
Thread Tools Rate Thread

another question about forms

 
 
=?Utf-8?B?SXJmYW4gTXVtdGF6?=
Guest
Posts: n/a
 
      11th Mar 2005
yesterday i was been suggested by the group to use
msgForm = New Form3()
Application.Run(msgForm)

It works fine and the form is displayed. however, the application does not
go further unless i close the form, WHICH I DO NOT WANT. In essence, the
purpose of this particular form in the application is to give user a
continous feedback of what the application is doing currently by continiously
changing

msgForm.Label1.Text = "Opening CAD, Please wait ..."

Similarly, at some other stage
msgForm.Label1.Text = "Copying Layouts, Please wait ..."

and similarly another 2-3 messages, informing the user about other things
that the application is doing.

To reinstate my question again, i want the application NOT to stop at
Application.Run(msgForm)
but continiouly run the code and at the same time continue to show the form
Is their anyother way that i can achieve this.
TIA
irfan


 
Reply With Quote
 
 
 
 
rawCoder
Guest
Posts: n/a
 
      11th Mar 2005
If I understand correctly, You need a Main Form that will be instantiated
the way described earlier.

This main form will instantiate the msgForm using

msgForm = New Form3()
msgForm.Show()

Incase you dont need Multiple Forms you might wanan move the the processing
code in the Main form.
Also Please note that incase your code is multithreaded, you should not
update form's controls from a thread other than its own thread.
You will need to use Invoke to run the code on the same thread of form, that
accesses the controls on it.

Or do you want a Splash Form ? ( Like the ones that Visual Studio .NET and
other apps have - a form which is shown and gets updated with information
will the main form is loaded ) ?

Sorry for most of the suggestions are based on assumptions. A lil more
information about your problem will b helpful.

HTH
rawCoder

"Irfan Mumtaz" <(E-Mail Removed)> wrote in message
news:29E14061-2354-443F-93BB-(E-Mail Removed)...
> yesterday i was been suggested by the group to use
> msgForm = New Form3()
> Application.Run(msgForm)
>
> It works fine and the form is displayed. however, the application does

not
> go further unless i close the form, WHICH I DO NOT WANT. In essence, the
> purpose of this particular form in the application is to give user a
> continous feedback of what the application is doing currently by

continiously
> changing
>
> msgForm.Label1.Text = "Opening CAD, Please wait ..."
>
> Similarly, at some other stage
> msgForm.Label1.Text = "Copying Layouts, Please wait ..."
>
> and similarly another 2-3 messages, informing the user about other things
> that the application is doing.
>
> To reinstate my question again, i want the application NOT to stop at
> Application.Run(msgForm)
> but continiouly run the code and at the same time continue to show the

form
> Is their anyother way that i can achieve this.
> TIA
> irfan
>
>



 
Reply With Quote
 
=?Utf-8?B?SXJmYW4gTXVtdGF6?=
Guest
Posts: n/a
 
      11th Mar 2005
thanks for the reply.... It is not like a splash screen because the splash
screen usualy closes when application starts.

All i want is that the form remains displayed, once displayed it should not
wait for an input from user( because its only purpose is to display messages
and it has no controls of its own except for a label) but continue to run the
rest of the code.

Please give me any ideas.

"rawCoder" wrote:

> If I understand correctly, You need a Main Form that will be instantiated
> the way described earlier.
>
> This main form will instantiate the msgForm using
>
> msgForm = New Form3()
> msgForm.Show()
>
> Incase you dont need Multiple Forms you might wanan move the the processing
> code in the Main form.
> Also Please note that incase your code is multithreaded, you should not
> update form's controls from a thread other than its own thread.
> You will need to use Invoke to run the code on the same thread of form, that
> accesses the controls on it.
>
> Or do you want a Splash Form ? ( Like the ones that Visual Studio .NET and
> other apps have - a form which is shown and gets updated with information
> will the main form is loaded ) ?
>
> Sorry for most of the suggestions are based on assumptions. A lil more
> information about your problem will b helpful.
>
> HTH
> rawCoder
>
> "Irfan Mumtaz" <(E-Mail Removed)> wrote in message
> news:29E14061-2354-443F-93BB-(E-Mail Removed)...
> > yesterday i was been suggested by the group to use
> > msgForm = New Form3()
> > Application.Run(msgForm)
> >
> > It works fine and the form is displayed. however, the application does

> not
> > go further unless i close the form, WHICH I DO NOT WANT. In essence, the
> > purpose of this particular form in the application is to give user a
> > continous feedback of what the application is doing currently by

> continiously
> > changing
> >
> > msgForm.Label1.Text = "Opening CAD, Please wait ..."
> >
> > Similarly, at some other stage
> > msgForm.Label1.Text = "Copying Layouts, Please wait ..."
> >
> > and similarly another 2-3 messages, informing the user about other things
> > that the application is doing.
> >
> > To reinstate my question again, i want the application NOT to stop at
> > Application.Run(msgForm)
> > but continiouly run the code and at the same time continue to show the

> form
> > Is their anyother way that i can achieve this.
> > TIA
> > irfan
> >
> >

>
>
>

 
Reply With Quote
 
rawCoder
Guest
Posts: n/a
 
      11th Mar 2005
Well from the top of my head.

Use the same technique specified earlier.

And in the Form_Load event initialize/run the business logic processing that
you want to perform.

I am not sure whether your business logic is plain code or some event based
code and how intensive the processing is.
But incase you simply want to notify a user when a checkpoint is passed, you
can use this method.

Like
in FormLoad
me.label1.text="Opening CAD"
OpenCad()
me.label1.text="Processing Layout"
ProcessLayout()
...
...

Do note that if the processing is intensive your form will not respond which
means that it might not paint properly.
In that case you need to run your business logic on separate thread and then
handle the accessing gui from other thread issue.

HTH
rawCoder

"Irfan Mumtaz" <(E-Mail Removed)> wrote in message
news:C49A63C2-B1E7-4D10-B101-(E-Mail Removed)...
> thanks for the reply.... It is not like a splash screen because the splash
> screen usualy closes when application starts.
>
> All i want is that the form remains displayed, once displayed it should

not
> wait for an input from user( because its only purpose is to display

messages
> and it has no controls of its own except for a label) but continue to run

the
> rest of the code.
>
> Please give me any ideas.
>
> "rawCoder" wrote:
>
> > If I understand correctly, You need a Main Form that will be

instantiated
> > the way described earlier.
> >
> > This main form will instantiate the msgForm using
> >
> > msgForm = New Form3()
> > msgForm.Show()
> >
> > Incase you dont need Multiple Forms you might wanan move the the

processing
> > code in the Main form.
> > Also Please note that incase your code is multithreaded, you should not
> > update form's controls from a thread other than its own thread.
> > You will need to use Invoke to run the code on the same thread of form,

that
> > accesses the controls on it.
> >
> > Or do you want a Splash Form ? ( Like the ones that Visual Studio .NET

and
> > other apps have - a form which is shown and gets updated with

information
> > will the main form is loaded ) ?
> >
> > Sorry for most of the suggestions are based on assumptions. A lil more
> > information about your problem will b helpful.
> >
> > HTH
> > rawCoder
> >
> > "Irfan Mumtaz" <(E-Mail Removed)> wrote in message
> > news:29E14061-2354-443F-93BB-(E-Mail Removed)...
> > > yesterday i was been suggested by the group to use
> > > msgForm = New Form3()
> > > Application.Run(msgForm)
> > >
> > > It works fine and the form is displayed. however, the application

does
> > not
> > > go further unless i close the form, WHICH I DO NOT WANT. In essence,

the
> > > purpose of this particular form in the application is to give user a
> > > continous feedback of what the application is doing currently by

> > continiously
> > > changing
> > >
> > > msgForm.Label1.Text = "Opening CAD, Please wait ..."
> > >
> > > Similarly, at some other stage
> > > msgForm.Label1.Text = "Copying Layouts, Please wait ..."
> > >
> > > and similarly another 2-3 messages, informing the user about other

things
> > > that the application is doing.
> > >
> > > To reinstate my question again, i want the application NOT to stop at
> > > Application.Run(msgForm)
> > > but continiouly run the code and at the same time continue to show

the
> > form
> > > Is their anyother way that i can achieve this.
> > > TIA
> > > irfan
> > >
> > >

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Question =?Utf-8?B?Q2xpbnQ=?= Microsoft Word Document Management 0 5th Mar 2007 04:05 AM
Forms Question or Query Question.. =?Utf-8?B?RWQ=?= Microsoft Access Forms 0 1st Oct 2005 11:35 PM
RE: Multiple Forms Question--ANSWERED MY OWN QUESTION Microsoft VB .NET 0 18th Mar 2004 06:06 PM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric Microsoft ASP .NET 2 13th Feb 2004 02:14 PM
New To C# Forms Question Dan Microsoft C# .NET 0 29th Jul 2003 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 AM.