473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

another question about forms

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
Nov 21 '05 #1
3 1114
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" <sp****@spam.net> wrote in message
news:29**********************************@microsof t.com...
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

Nov 21 '05 #2
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" <sp****@spam.net> wrote in message
news:29**********************************@microsof t.com...
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


Nov 21 '05 #3
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" <sp****@spam.net> wrote in message
news:C4**********************************@microsof t.com...
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" <sp****@spam.net> wrote in message
news:29**********************************@microsof t.com...
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


Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
1
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary...
3
by: TonyM | last post by:
Hi all, I have an application with a few different Windows forms. I am trying to update a statusbar panel's text that is in the main form, from another form. When I set the statusbar and the...
6
by: nadeem_far | last post by:
Hello All, I am working on a .Net desktop application and I am having problem displaying a form. I am using C# and version 1.1 of the framework. here is how the code looks likes and I will...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
17
by: Barret Bonden | last post by:
As an old programmer just now looking at VB.net I have a question: How does one simply open one form from another ? I don't mean how does one create a new instance of that form , but rather how...
11
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
2
by: jodleren | last post by:
Hi! I use this to read on the value of my "parent" window. stemp=window.opener.document.forms.workgroup.value; Works well. Say, I'd like to add an items to that, and select it?
11
by: Josetta | last post by:
I searched around a little bit, but didn't come up with the answer to this question, but somewhere in the back of my mind, I think this can be done... Let's say we have two different company...
0
by: Access Programming only with macros, no code | last post by:
ERROR MESSAGE: Could not update; currently locked by another session on this machine. BACKGROUND I have the following objects: Table1 - HO (which has about 51,000+ records) Table2 -...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.