I have a project, that loops through a lot of wmi queries, and while its
looping, the window will not repaint, I can't move or size the window.
I remember having a similar problem back in an excel macro, and I ran a
command that told the application to process windows messages.
Is there such a thing in vb.net, or is there a way to make sure windows
messages get processed in big cpu greedy loops?
Also, Is it a big deal to make code multy threaded? Where should a person
start looking for info regarding multitreaded programming in vb.net? 3 2054
In your loop you can call: Application.DoE vents()
--
Mike
Mike McIntyre
Visual Basic MVP www.getdotnetcode.com
"Fred Flintstone" <de**********@r ogers.com> wrote in message
news:8d******** ************@ro gers.com... I have a project, that loops through a lot of wmi queries, and while its looping, the window will not repaint, I can't move or size the window. I remember having a similar problem back in an excel macro, and I ran a command that told the application to process windows messages. Is there such a thing in vb.net, or is there a way to make sure windows messages get processed in big cpu greedy loops?
Also, Is it a big deal to make code multy threaded? Where should a person start looking for info regarding multitreaded programming in vb.net?
Thanks, that was just the sort of answer I was looking for.
"Mike McIntyre" <mi****@dotnets howandtell.com> wrote in message
news:eZ******** ********@TK2MSF TNGP11.phx.gbl. .. In your loop you can call: Application.DoE vents()
-- Mike
Mike McIntyre Visual Basic MVP www.getdotnetcode.com "Fred Flintstone" <de**********@r ogers.com> wrote in message news:8d******** ************@ro gers.com...I have a project, that loops through a lot of wmi queries, and while its looping, the window will not repaint, I can't move or size the window. I remember having a similar problem back in an excel macro, and I ran a command that told the application to process windows messages. Is there such a thing in vb.net, or is there a way to make sure windows messages get processed in big cpu greedy loops?
Also, Is it a big deal to make code multy threaded? Where should a person start looking for info regarding multitreaded programming in vb.net?
Hey Fred,
My first answer will help with repainting but not with moving the window.
Sorry I missed that requirement on my first read.
Any easy way to use threading is to get started with asynchronous delegates.
Here is a good article: http://msdn.microsoft.com/msdnmag/is...s/default.aspx
Once you create a Delegate through which to call the method with your big
loop, repainting, moving, and other user interface actions will work while
the big loop is processing your wmi queries.
--
Mike
Mike McIntyre
Visual Basic MVP www.getdotnetcode.com
"Fred Flintstone" <de**********@r ogers.com> wrote in message
news:8d******** ************@ro gers.com... I have a project, that loops through a lot of wmi queries, and while its looping, the window will not repaint, I can't move or size the window. I remember having a similar problem back in an excel macro, and I ran a command that told the application to process windows messages. Is there such a thing in vb.net, or is there a way to make sure windows messages get processed in big cpu greedy loops?
Also, Is it a big deal to make code multy threaded? Where should a person start looking for info regarding multitreaded programming in vb.net? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Cantankerous Old Git |
last post by:
I am trying to write a program that I hope to get working as a
command-line app to start with, and then eventually use a windows
service wrapper to call it as a service. Its purpose is to attach
to an already running (not ours) service using an API DLL, where
it will do houskeeping and monitoring tasks.
This is where it all gets strange. Although I can make calls into
the API and do things proactively, when I register a callback for...
|
by: davidstummer |
last post by:
I was wondering if anyone could point me to an example. Currently i
have a c++ program which calls and c++ dll (i created both). The dll
uses SendMessage to pass messages back to the calling .exe, and the
..exe process the messages in it's Windows Procedure function
WindProc().
What i want is to receive these messages ( the contents of each message
will be plain text), in python using a callback (i think this is what i
need).
|
by: Brian Keating EI9FXB |
last post by:
I wonder can anyone reccomment a solution to this problem.
Let me explain, I've services running on my system, my
application receives diagnostic messages from these services, what i want to
do is create an MDIChild window for each service that is sending messages.
Ok so far so good, but I get problems if one service is constantly sending
messages to it's window because, this window is very busy updating it's view,
hence because it's...
|
by: Brian Keating EI9FXB |
last post by:
Hello again,
I've already placed a few posts on this topic.
This time i've a simple application that exhibits my problem,
I've placed sample solution 8k on my website should anyone be interested in
having a look. http://briankeating.net/transfer/test.zip
To recap the problem I expected (and found).
I've a main GUI thead (main form), this GUI thread has an UpdateTextBox
function that appends a string in a textbox and It also has a button...
|
by: Brian Keating EI9FXB |
last post by:
Would I be correct in saying that the only way to get a user message into a
Windows form would be to use P/Invoke with Message?
Of is there some part of the .NET API that I am totally un aware of?
Thanks for any help
Brian
| |
by: benmorganpowell |
last post by:
I have a small windows service which connects to a POP3 server at
defined intervals, scans the available messages, extracts the required
information and inserts the data into a SQL database. I am assuming
that this is not an uncommon piece of software.
I want to get an architecture that conforms as closely as possible with
the recommendations from Microsoft on developing Windows Services, but
to be honest I have found difficultly in...
|
by: |
last post by:
Hi All,
I am little confused here, hope you can help me.
While processing WM_POWERBROADCAST
(wParam=PBT_APMQUERYSUSPEND), I MUST to do some lengthy
operation(30 sec) before system Suspends or hibernates. To
achieve this, in my message handler when processing
PBT_APMQUERYSUSPEND, I create another thread which takes
care of making this lengthy operation, and when its done I
|
by: Neal |
last post by:
managed C++
VS 2003
I have a beginner question about windows forms....
I need to call a function when a certain limit has been reached, now with
the way VS sets up the .NET windows Form I get confused. When I was using
Directx everything was being run from a while loop, so that was no problem
for me in seeing where to place conditional statements and other functions.
With windows forms do I need to have an event and eventhandler? it...
|
by: |
last post by:
I have a multi threaded windows form application that runs great after
calling Application.Run(). Application.Run is required for a COM component
I a using in the app (required for message loop). I have created a windows
service from VStudio 2005 template. What is the windows service replacement
for Application.Run()?
|
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,...
|
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...
| |
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,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |