473,769 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cant use DoEvents in WPF application

Don
I have a WPF application in VB in VSTS 2008 RTM. I am trying to
"blink" (momentarily clear) a field of data if the data is reloaded
from the database to give the user some visual indication of the LOAD
operation.

So on the LOAD button I clear the text fields, do
mainCanvas.Upda teLayout( ), and the reload the text field from the
database. But the text fields are not cleared long enough to see them
blink.

So I add a Thread.Sleep(20 0) before reloading the text fields. Still
no visual blink.

So I change the Sleep(200) to Sleep(2000), Still no visual blink.

So I attempt to add an Application.DoE vents so that the application
gets a chance to repaint the screen. But when I attempt to add the
"Imports System.Windows. Forms" for the DoEvents, the IDE says
"System.Windows .Forms doesn't contain any public member(s) or cannot
be found."

Apparently DoEvents can not be used in a WPF application because it is
not a Windows Forms.

OK, so how do I get WPF to visually "blink" some text fields in
response to a button push?
How do I replace the DoEvents functionality in a WPF application?
Mar 18 '08
11 5176
>
and it is therefore okay and good to use a RTM version...
But there is no need to express that here

:-)

Cor
Mar 20 '08 #11
Cor Ligthert [MVP] wrote:
>and it is therefore okay and good to use a RTM version...
But there is no need to express that here

:-)

Cor
You asked the question: "Why are you using a Ready To Marked version while the
version is allready for quiet a while on the marked."

Therefore you got an answer.

By the way, RTM = Released to Manufacturing.
Mar 20 '08 #12

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

Similar topics

24
3291
by: bazad | last post by:
Hi, I'd like to understand consequences of Application.DoEvents call. Does it create a new thread? Thank you
3
4789
by: dotNETDavid | last post by:
We've broken our app into various assemblies. The WinForm assembly provides the user interface, other assemblies provide various I/O services. I'd like to be able to call System.Windows.Forms.Application.DoEvents from within a dll, but it isn't allowed. I don't want to link the dll to our WinForm exe which can call DoEvents. Is there some way to call DoEvents from within a dll? Thanks.
6
4299
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone explain to me why I need to call DoEvents when I am using a COM component that calls back to into the ..Net application? - If I don't call DoEvents after receiving a callback then sometimes no more messages are pumped, it appears that the message...
17
2399
by: Lance | last post by:
I've noticed that calling DoEvents is much slower in an application that has called Application.EnableVisualStyles in Sub Main. Furthermore, the performance seems to worsen each time that DoEvents is called. To demonstrate what I'm experiencing, create an app with a Sub Main, a Main Form, and a Button (called Button1). Include the following code in Sub Main: Application.EnableVisualStyles Application.DoEvents Application.Run(New...
3
20136
by: Rich | last post by:
As I migrate my VB6 apps to vb.net I am checking what features I need to retain from vb6. In vb6 I noticed that DoEvents really made a performance difference when I called it just before a Do/For loop for large datasets. I hope do some multithreading in vb.net for this. But I am not completely sure about how System.Windows.Forms.Application.DoEvents() works, or its application/purpose. Is this the same as
7
1888
by: Tym | last post by:
Made the change from vb6 to vb.net and have found that DoEvents() doesn't work!! Well, the replacement System.Windows.Forms.Application.DoEvents() is causing hell!! I have a loop such as
13
10104
by: Amjad | last post by:
Hi, Is there an equivalent to the "Application.Doevents" method in modules or Windows services? I want to make a Windows service that calls a DLL. The DLL would have all my functions and it would be doing all the job, but some of the functions that I'm using require calling something like "Application.Doevents" and I can't use this because the DLL module is not an application.
5
4579
by: james.jdunne | last post by:
System.ArgumentException: Item has already been added. Key in dictionary: "-1" Key being added: "-1" at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FRegisterComponent(IMsoComponent component, MSOCRINFOSTRUCT pcrinfo, Int32& dwComponentID) at...
4
10930
by: Woo Mun Foong | last post by:
Hi, I have a DLL that is used to carry out some lengthly process. I would like to have something similar to DoEvents that can yield control back to Windows every now and then. Any ideas ? Thank You,
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10045
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7408
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.