0

I'm Working with Windows Forms (c++) and running into a bit of trouble :/

I have the Windows Form managed code where i do all the 'visual' work like updated text boxes, labels, etc etc... then i have class set up in that project which does most of the computation.

My Question: How do i allow the class to access the private parts of the form? Example: like wanting to directly edit the textbox in the form FROM the class which is in a different file same project!

Any ideas?

AR2
  • 11
  • 2
  • 5

1 Answers1

0

I would not use the 'private parts' directly.

Use a setter method, since you will most likely also have to take care of the threading issue. (At least in C#) it is not allowed to access the GUI components from another thread. YOu have to pot it into the message processing thread of the form using Invoke (again, at least in C#).

hth

Mario

Mario The Spoon
  • 4,799
  • 1
  • 24
  • 36