Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

TCPClient -form.show

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Dimech - 30 Aug 2004 22:31 GMT
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
Chris Mullins - 30 Aug 2004 23:33 GMT
> However i'm having a problem with showing a Windows Form in the
> asynchronous Read procedure in the client application.

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.

Signature

Chris Mullns

Andrew Dimech - 31 Aug 2004 08:27 GMT
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

> > However i'm having a problem with showing a Windows Form in the
> > asynchronous Read procedure in the client application.
[quoted text clipped - 7 lines]
> You'll need to marshall over to your main thread, (using
> Control.BeginInvoke) to do any interesting forms stuff.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.