.NETGURU
how to do AddHandler
Messages   Related Types
This message was discovered on microsoft.public.dotnet.distributed_apps.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

rt (VIP)
hi, i am having a vb.net window form,

that form is having a timer.

in each interval the it reads data from sql server back end, continously.
and display on it.

some times the form may not respond, and after few seconds, responds....

i know i should go for multithreading in vb.net
where to start, and how to write
for asynchoronous programming inorder to slove my problem

help me,

thanks

Reply to this message...
 
    
Sam Santiago
Here's an MSDN chat link with lot's of good info:
http://msdn.microsoft.com/chats/vstudio/vstudio_041602.asp

and

A Walkthrough on Multithreading:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconFreeThreadingExample.asp?frame=true

With forms applications you have to be careful with the form and controls.
You have to invoke any form/control methods only on the thread they were
created with, so read the documentation regarding the Control.Invoke and
Control.BeginInvoke methods. Good luck.

Thanks,

Sam

--
_______________________________
Sam Santiago
Click here to reveal e-mail address
http://www.SoftiTechture.com
_______________________________
"rt" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Marcus Mac Innes
See below:

"Sam Santiago" wrote:
[Original message clipped]

The key piece of code you need to do this (sorry it's in C#, but you will
get the idea):

private void control_Event(object sender, EventArgs e) {
if (InvokeRequired) {
Invoke(new EventHandler(control_Event), new object[] {sender, e});
} else {
// Do whatever here...
}
}

Marcus
Reply to this message...
 
 
System.EventArgs
System.EventHandler
System.Web.UI.Control




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification