Click here to Skip to main content
15,921,156 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho16-Oct-08 9:17
Caio Kinzel Filho16-Oct-08 9:17 
GeneralRe: Problems Calling A Function Pin
Phantom71516-Oct-08 9:37
Phantom71516-Oct-08 9:37 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho17-Oct-08 6:55
Caio Kinzel Filho17-Oct-08 6:55 
QuestionThreading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 5:56
Jim Buckley Barrett16-Oct-08 5:56 
QuestionRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 6:21
Jim Buckley Barrett16-Oct-08 6:21 
AnswerRe: Threading Problem in VB.NET Pin
Steven J Jowett16-Oct-08 6:29
Steven J Jowett16-Oct-08 6:29 
QuestionRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 6:51
Jim Buckley Barrett16-Oct-08 6:51 
AnswerRe: Threading Problem in VB.NET Pin
Dave Kreskowiak16-Oct-08 6:55
mveDave Kreskowiak16-Oct-08 6:55 
Better idea... Form2 shouldn't care anything about Form1, nor should it know of it's existance.

Create public properties on the Form2 that you fill in with the validated data from the controls on Form1. It solves the problem of breaking OOP rules, and solves your threading issues getting the data from those textbox's.

It does not, however, solve the problem of putting the data back. Like the other person said, use delegates. This code is going to have to marshal the propery call back to tue UI thread to set the text property of the controls. But, like before, you cannot just refer to them from Form2 code. For2 should only worry about the controls on Form2 and process any data it needs to. Messing with controls on Form1 is best left up to Form1 code.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 7:00
Jim Buckley Barrett16-Oct-08 7:00 
GeneralRe: Threading Problem in VB.NET Pin
Dave Kreskowiak16-Oct-08 7:13
mveDave Kreskowiak16-Oct-08 7:13 
GeneralRe: Threading Problem in VB.NET Pin
Paul Conrad16-Oct-08 7:46
professionalPaul Conrad16-Oct-08 7:46 
QuestionOpration has timed out... Pin
rohitkpurohit16-Oct-08 4:15
rohitkpurohit16-Oct-08 4:15 
AnswerRe: Opration has timed out... Pin
Dave Kreskowiak16-Oct-08 6:49
mveDave Kreskowiak16-Oct-08 6:49 
QuestionClosing an application after it was opened with System.Diagnostics.Process.Start Pin
farmer16-Oct-08 2:58
farmer16-Oct-08 2:58 
AnswerRe: Closing an application after it was opened with System.Diagnostics.Process.Start Pin
d_camillo16-Oct-08 3:13
d_camillo16-Oct-08 3:13 
GeneralRe: Closing an application after it was opened with System.Diagnostics.Process.Start Pin
farmer16-Oct-08 4:52
farmer16-Oct-08 4:52 
GeneralRe: Closing an application after it was opened with System.Diagnostics.Process.Start Pin
Dave Kreskowiak16-Oct-08 6:41
mveDave Kreskowiak16-Oct-08 6:41 
GeneralRe: Closing an application after it was opened with System.Diagnostics.Process.Start Pin
Alan N16-Oct-08 6:45
Alan N16-Oct-08 6:45 
AnswerRe: Closing an application after it was opened with System.Diagnostics.Process.Start Pin
Jon_Boy16-Oct-08 6:59
Jon_Boy16-Oct-08 6:59 
QuestionInsufficient memory to continue the execution of the program Pin
jhyn16-Oct-08 0:16
jhyn16-Oct-08 0:16 
AnswerRe: Insufficient memory to continue the execution of the program Pin
Steven J Jowett16-Oct-08 1:26
Steven J Jowett16-Oct-08 1:26 
AnswerRe: Insufficient memory to continue the execution of the program Pin
rohitkpurohit16-Oct-08 4:21
rohitkpurohit16-Oct-08 4:21 
QuestionMaking a colored string Pin
Ballita15-Oct-08 23:30
Ballita15-Oct-08 23:30 
AnswerRe: Making a colored string Pin
Gagan.2015-Oct-08 23:51
Gagan.2015-Oct-08 23:51 
AnswerRe: Making a colored string Pin
Steven J Jowett16-Oct-08 1:29
Steven J Jowett16-Oct-08 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.