Not reponsive form

  • Thread starter Thread starter Albert Chua via .NET 247
  • Start date Start date
A

Albert Chua via .NET 247

I am developing a client/server application using VB.NET inVS.NET 2002. The client application have a form (Form A) thatquery the server application via Winsock and once Form Areceived the server's response (DataIn event) it launch Form Band hide Form A. The problem that I am having is that Form B isnot responsive after it's launched. What is the problem? Pleasehelp?

I tried launching Form B using a button in Form A and it worksperfectly. But Form B is not responsive when it's launched to inthe DataIn event, it's not responsive at all. Please help.
 
Hi Albert,

This is probably because Form B is being launched on another thread. If so,
you'll need to add a method to Form A that launches Form B and then use
BeginInvoke from the Datain event handler. It would look something like
this:

In Form A

Public Sub ShowFormB()
Me.Hide
Dim fb as New FormB()
fb.Show()
End Sub

In Datain event handler

Me.BeginInvoke(New MethodInvoker(AddressOf Me.ShowFormB)

Hope this helps,
Craig VB.Net Team
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).

--------------------
From: Albert Chua via .NET 247 <[email protected]>
X-Newsreader: AspNNTP 1.50 (Matthew Reynolds Consulting)
Subject: Not reponsive form
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Message-ID: <##[email protected]>
Newsgroups: microsoft.public.dotnet.languages.vb
Date: Tue, 27 Apr 2004 17:49:22 -0700
NNTP-Posting-Host: 81-86-69-114.dsl.pipex.com 81.86.69.114
Lines: 1
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:198835
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I am developing a client/server application using VB.NET in VS.NET 2002.
The client application have a form (Form A) that query the server
application via Winsock and once Form A received the server's response
(DataIn event) it launch Form B and hide Form A. The problem that I am
having is that Form B is not responsive after it's launched. What is the
problem? Please help?
I tried launching Form B using a button in Form A and it works perfectly.
But Form B is not responsive when it's launched to in the DataIn event,
it's not responsive at all. Please help.
 
Back
Top