.NETGURU
TCPClient -form.show
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.
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...

Andrew Dimech (VIP)
Hello,

I've been using the "Advanced .NET Framework (Networking) - Use Sockets"
example that comes with the "Visual Basic.Net Resource Kit". This works
perfectly fine and i learned alot from it.

However i'm having a problem with showing a Windows Form in the
asynchronous Read procedure in the client application. The form is loaded and
show on screen without error messages however the form screen is painted
plane white. No controls are displayed and the mouse pointer turns to an hour
glass with in the form.

Have u ever tried to intatiate a new form and show it on screen after
receiving a message from TCP Server application? I do not want to use
ShowDialoge as i need multipile forms loaded at the same time.

I've been over a week trying to fix this problem using 101 methods. I have
no idea what else to do. Please HELP!!

Thank you....Andrew
Reply to this message...
 
    
Chris Mullins
"Andrew Dimech" wrote
[Original message clipped]

This is going to be... tricky.

When you're in the callback from the Async Read, you're running on a
threadpool thread - not your applications main thread. Not the same thread
as your existing message pump is tied to.

You'll need to marshall over to your main thread, (using
Control.BeginInvoke) to do any interesting forms stuff.

--
Chris Mullns

Reply to this message...
 
    
Andrew Dimech (VIP)
Thanks my friend. I thought the problem might had to do with threads but i
was not sure. Any code example or source from where i can get this working?

Much appreciated.
Andrew

"Chris Mullins" wrote:

[Original message clipped]

Reply to this message...
 
    
Andrew Dimech (VIP)
Problem solved.....thank you....Andrew

"Chris Mullins" wrote:

[Original message clipped]

Reply to this message...
 
    
Supra
i still had same problem. i been doing irc chat similar to mirc

Andrew Dimech wrote:

[Original message clipped]

Reply to this message...
 
    
Andrew Dimech (VIP)
Take a look at the BeginInkove or Invoke procedure at MSDN help.

You can find a good example there. It helped me to solve the problem in an
hour or so.

Andrew

"Supra" wrote:

[Original message clipped]

Reply to this message...
 
    
Supra
thank

Andrew Dimech wrote:

[Original message clipped]

Reply to this message...
 
 
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