473,434 Members | 1,494 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,434 software developers and data experts.

Stop Form Update

I have a form that im using to draw buttons onto, a click on the buttons
will cause the text on the buttons to change and some buttons will be hidden
, so im looking to stop the redraw on the form until I have finished making
these changes, to reduce the flicker. Can someone tell me how to do it ?

Thanks
Nov 23 '05 #1
3 4134
Hi,

Checkout the 'Windows Forms Designer' region, for the line that is
Me.SuspendLayout.

That's what you need>

Rgds, Phil

"Jon Vaughan" <jo**********@hotmail.com> wrote in message
news:go*******************@fe02.news.easynews.com. ..
I have a form that im using to draw buttons onto, a click on the buttons
will cause the text on the buttons to change and some buttons will be
hidden , so im looking to stop the redraw on the form until I have finished
making these changes, to reduce the flicker. Can someone tell me how to do
it ?

Thanks

Nov 23 '05 #2
"Jon Vaughan" <jo**********@hotmail.com> schrieb:
I have a form that im using to draw buttons onto, a click on the buttons
will cause the text on the buttons to change and some buttons will be
hidden , so im looking to stop the redraw on the form until I have finished
making these changes, to reduce the flicker. Can someone tell me how to do
it ?

If you want to prevent docked and anchored controls from resizing
immediately, check out the form's or container's 'SuspendLayout' and
'ResumeLayout' methods. Some controls provide 'BeginUpdate' and 'EndUpdate'
methods to disable updating. You can use the method described in the
article referenced below to disable redrawing of forms and controls:

Preventing controls from redrawing
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #3
Jon Vaughan wrote:
I have a form that im using to draw buttons onto, a click on the buttons
will cause the text on the buttons to change and some buttons will be hidden
, so im looking to stop the redraw on the form until I have finished making
these changes, to reduce the flicker. Can someone tell me how to do it ?

Thanks


well, not sure it's the best way, but what I'm thinking you could try is
to override the onpaint procedure and not allow the painting unless you
say to:

in the form class:
public overrides sub OnPaint(...)
if DoneDrawing then
mybase.onpaint(...)
end if
end sub

However I don't think that it is the form painting that you are worrying
about, it's the button painting. When you say "using to draw buttons
onto" are you using windows.forms.buttons or did you create your own button?

Chris
Nov 23 '05 #4

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

Similar topics

16
by: deko | last post by:
I have a sub routine that searches the Outlook PST for a message sent to/from a particular email address. Obviously, this can take a long time when the PST contains thousands of messages. I'd...
1
by: Rajani | last post by:
Hi, I have designed a form which process database Insert, edit and Delete(datagrid). I input userid,password and privilege in textboxes which has validation controls to verify data keyed in....
2
by: Rajani | last post by:
Hi, I have designed a form which process database Insert, edit and Delete(datagrid). I input userid,password and privilege in textboxes which has validation controls to verify data keyed in....
4
by: d3vkit | last post by:
I have a form on my page, and some javascript which uses ajax to submit the form, and then opens the new page in a div using ajax so there is no refresh. This works fine. But the problem is this: all...
3
by: Ben | last post by:
Hi We have a windows form that takes a while to run a routine. During this we have created a information label, updating the user on the progress but: a) The changes on the label are not...
1
friendjin
by: friendjin | last post by:
Thanks in advance; Can I ask a question about VC++.NET 2003. about using window form application. when I click button1, the programming will be run, and the results will be displayed in...
1
by: jhicke03 | last post by:
Hi, This problem has been bugging me for a while. In my form's before update field i have the following code: Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Nominator_name = "" Or...
2
by: THEAF | last post by:
My form is for entering data about centres. Data like Centre name, number, address. i have 5 command buttons on this form * Add new File * Delete File * Reset *Clear *Update Im using this...
10
by: ThunderMusic | last post by:
Hi, I'm currently working with sockets. I accept connections using m_mySocket.Listen(BackLogCount); But when I want to stop listening, I shutdown all my clients and call m_mySocket.Close(), but it...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.