开发者

How to Edit/Access Private Parts of Windows Forms with external class? [in project]

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 F开发者_StackOverflow中文版ROM the class which is in a different file same project!

Any ideas?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜