2014-01-17 144 views
0

我有2个窗体。 在form2中我有1个线程。 我必须从form1中停止它。从其他窗体停止线程(VB.net)

我想:

... 
_Form1.threadname = stop() 
... 

但我会得到这个错误:

Error 1 ... threadname is not accessible in this context because it is 'Private'. 

我该如何解决这个问题? 我不知道要公开什么。

+0

我拿出你的'XAML'标签,因为似乎没有任何理由。 – OneFineDay

回答

3

看起来你有一个声明如下

Private threadname As String 

为了从其他类这就需要将FriendPublic访问它的字段。

Public threadname As String