473,406 Members | 2,549 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,406 software developers and data experts.

Frozen Gui

Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???
Thanks
Nov 21 '05 #1
8 1208
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???


Use a background thread for the long-running task.

Tim
Tech blog
http://www.itwriting.com/blog/
Nov 21 '05 #2
Hello Gabi,
How are you doing?

For preventing an application from freezing, if you applicaiton uses some
loop. Try using
Application.DoEvents() method
MSDN URL:
http://msdn.microsoft.com/library/de...ventstopic.asp
This will enable the user to take actions while your form/procedure works.

I hope this helps.

Thanks
Mona
[Grapecity]
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???
Thanks

Nov 21 '05 #3
or problably if he used timer control......when progressbar ending 100%
then set timer1.enabled to false. i already done mpg project. so it
will not prevent frozen

Mona wrote:
Hello Gabi,
How are you doing?

For preventing an application from freezing, if you applicaiton uses some
loop. Try using
Application.DoEvents() method
MSDN URL:
http://msdn.microsoft.com/library/de...ventstopic.asp
This will enable the user to take actions while your form/procedure works.

I hope this helps.

Thanks
Mona
[Grapecity]
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microso ft.com...

Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???
Thanks



Nov 21 '05 #4
JP
Oh.. oh.. be very careful with the DoEvents(). Don't use it straight in the
loop or work code.
The application will become slow as well and you can kill your application
without cleaning up if you use DoEvents()...
Instead use it with a timer something like with a status/statusbar property

Private Sub tmStatusMonitor_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmStatusMonitor.Tick
If strStatus <> "Ready" Then 'strStatus is the custom property
sbStatus.Text = strStatus
Application.Doevents()
End If
End Sub

Hope this helps

--
Cheers,
JP
------------------------------------------------------------------
A program is a device used to convert,
data into error messages
------------------------------------------------------------------
"Mona" <mo**@discussions.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl...
Hello Gabi,
How are you doing?

For preventing an application from freezing, if you applicaiton uses some
loop. Try using
Application.DoEvents() method
MSDN URL:
http://msdn.microsoft.com/library/de...ventstopic.asp
This will enable the user to take actions while your form/procedure works.

I hope this helps.

Thanks
Mona
[Grapecity]
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???
Thanks


Nov 21 '05 #5
I have some long running code and at the start I show a status form using
ShowDialog and disable the background form. In the long running loop, I
update the showdialog form via a property called countdone and an
application.DoEvents that gets called in each loop. I have tested it and the
user can't close the form until either the loop completes or the user presses
cancel in the dialog form. It seems to work ok and prevents the user from
killing the application except thru the task manager.
--
Dennis in Houston
"JP" wrote:
Oh.. oh.. be very careful with the DoEvents(). Don't use it straight in the
loop or work code.
The application will become slow as well and you can kill your application
without cleaning up if you use DoEvents()...
Instead use it with a timer something like with a status/statusbar property

Private Sub tmStatusMonitor_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmStatusMonitor.Tick
If strStatus <> "Ready" Then 'strStatus is the custom property
sbStatus.Text = strStatus
Application.Doevents()
End If
End Sub

Hope this helps

--
Cheers,
JP
------------------------------------------------------------------
A program is a device used to convert,
data into error messages
------------------------------------------------------------------
"Mona" <mo**@discussions.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl...
Hello Gabi,
How are you doing?

For preventing an application from freezing, if you applicaiton uses some
loop. Try using
Application.DoEvents() method
MSDN URL:
http://msdn.microsoft.com/library/de...ventstopic.asp
This will enable the user to take actions while your form/procedure works.

I hope this helps.

Thanks
Mona
[Grapecity]
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi All,
i built dome dialog that can show the progress and make some actions.
when im activating it, and do not touch any screen i can see the progress
bar progress and evrything work nice.
but when im open a new window (my computer for example)
the gui frozen and not respons until the gui finish the task.
is any one can tell me how can i can solve this kind of problem???
Thanks



Nov 21 '05 #6
Hi All,
Thanks for your suggestins

Gabi

"Dennis" wrote:
I have some long running code and at the start I show a status form using
ShowDialog and disable the background form. In the long running loop, I
update the showdialog form via a property called countdone and an
application.DoEvents that gets called in each loop. I have tested it and the
user can't close the form until either the loop completes or the user presses
cancel in the dialog form. It seems to work ok and prevents the user from
killing the application except thru the task manager.
--
Dennis in Houston
"JP" wrote:
Oh.. oh.. be very careful with the DoEvents(). Don't use it straight in the
loop or work code.
The application will become slow as well and you can kill your application
without cleaning up if you use DoEvents()...
Instead use it with a timer something like with a status/statusbar property

Private Sub tmStatusMonitor_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmStatusMonitor.Tick
If strStatus <> "Ready" Then 'strStatus is the custom property
sbStatus.Text = strStatus
Application.Doevents()
End If
End Sub

Hope this helps

--
Cheers,
JP
------------------------------------------------------------------
A program is a device used to convert,
data into error messages
------------------------------------------------------------------
"Mona" <mo**@discussions.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl...
Hello Gabi,
How are you doing?

For preventing an application from freezing, if you applicaiton uses some
loop. Try using
Application.DoEvents() method
MSDN URL:
http://msdn.microsoft.com/library/de...ventstopic.asp
This will enable the user to take actions while your form/procedure works.

I hope this helps.

Thanks
Mona
[Grapecity]
"Gabi" <Ga**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
> Hi All,
> i built dome dialog that can show the progress and make some actions.
> when im activating it, and do not touch any screen i can see the progress
> bar progress and evrything work nice.
> but when im open a new window (my computer for example)
> the gui frozen and not respons until the gui finish the task.
> is any one can tell me how can i can solve this kind of problem???
> Thanks


Nov 21 '05 #7
doevents will get u crashes. good boy :-)

JP wrote:
Oh.. oh.. be very careful with the DoEvents(). Don't use it straight in the
loop or work code.
The application will become slow as well and you can kill your application
without cleaning up if you use DoEvents()...
Instead use it with a timer something like with a status/statusbar property

Private Sub tmStatusMonitor_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmStatusMonitor.Tick
If strStatus <> "Ready" Then 'strStatus is the custom property
sbStatus.Text = strStatus
Application.Doevents()
End If
End Sub

Hope this helps

Nov 21 '05 #8
in that case use application.doevents

Dennis wrote:
I have some long running code and at the start I show a status form using
ShowDialog and disable the background form. In the long running loop, I
update the showdialog form via a property called countdone and an
application.DoEvents that gets called in each loop. I have tested it and the
user can't close the form until either the loop completes or the user presses
cancel in the dialog form. It seems to work ok and prevents the user from
killing the application except thru the task manager.

Nov 21 '05 #9

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

Similar topics

3
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when...
3
by: vincent wehren | last post by:
Hi, as a small capabilities demo I coded the piece below to show how to use Python for cgi'ing on localhost and it more or less does the trick :-). However, I when I freeze it with py2exe,...
2
by: Mike Kent | last post by:
I need to deploy a Python app on both SCO Unixware and old SCO Unix boxes. We freeze the app under Unixware, and set the compatibility flag ('elfmark -t udk') on the resulting executable. We...
47
by: Will Stuyvesant | last post by:
Hello all, So Zope still lives, yay. Well, I like that they use Python. <rant> What amazed me is they write that they "added types to the variables and hope that it will be added to the...
0
by: Calvin Spealman | last post by:
I've been working on a small test runner script, to accumulate my test scripts (all python files in the 'test' sub-directories of my source tree). Things were going well, but I'm still having...
2
by: anon | last post by:
I am trting to simulate the case available in an excel worksheet where the first three columns are frozen and the rest scroll left and right against this. For example: I have a grid which lists...
0
by: elime | last post by:
Hi all I have a strange behaving on some PC with my DataGrid. It only occurs on some PC, on others it works perfectly fine. ->(same ..net version installed) it's very confusing. starting...
2
by: geowhe | last post by:
I am writing a VB6 application that opens with a Login form that allows the user to select one of several databases. Clicking 'OK' on the Login form opens the Main form. Something has happened...
1
by: ronnysaid | last post by:
Hi all, I was wondering if there is a way to get the range from the frozen panes in excel using interop v.12?? Or is there a property associated with the range indicating its frozen or not?? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.