Two ways of loading a form

Can someone please let me know the difference between loading a second

Page 1 of 1

3 Replies - 993 Views - Last Post: 29 June 2010 - 06:31 PM Rate Topic: -----

#1 Terje  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-November 08

Two ways of loading a form

Posted 29 June 2010 - 05:19 PM

My main form has several threads running. One of these threads is reading in information via a TCP/IP socket. I would like to open a second form that displays a parameterís value in a text box when a specific parameter changes. I can successfully do this, however when the second form is displayed, the first formís TCP/IP thread ceases to read the input buffer.

On the other hand, if I open the same (second) form via a button on the first form, I can display the appropriate parameter value in the second formís text box without the TCP/IP socket freezing up.

Thanks in advance

Terje

Is This A Good Question/Topic? 0
  • +

Replies To: Two ways of loading a form

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5583
  • View blog
  • Posts: 11,942
  • Joined: 02-June 10

Re: Two ways of loading a form

Posted 29 June 2010 - 05:28 PM

You should be doing nothing more than raising an event for your second window to subscribe to. that shouldn't impact your TCP/IP socket. I do it all the time.

this might help

Bulding an application - Part 1
Was This Post Helpful? 0
  • +
  • -

#3 Terje  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-November 08

Re: Two ways of loading a form

Posted 29 June 2010 - 05:40 PM

Could you please elaborate on what you mean by "second window to subscribe to"?
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5583
  • View blog
  • Posts: 11,942
  • Joined: 02-June 10

Re: Two ways of loading a form

Posted 29 June 2010 - 06:31 PM

View PostTerje, on 29 June 2010 - 04:40 PM, said:

Could you please elaborate on what you mean by "second window to subscribe to"?


Terje said:

I would like to open a second form that displays a parameterís value in a text box


What is there to elaborate on? You said you have two forms and you want form2 to change displayed text when something happens in form1.

So form1 raises an event, form2 subscribes to that event and reacts to it.
Do the tutorial I linked in the first message and you'll see it in action.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1