比如在B中需要訪問A的一個textbox,那麽需要
dim a =ctype(me.parent.Findcontrol("Ax"),xxxxxxx)
dim ctrl as textbox=ctype(a.Findcontrol("ctrl"),textbox)
這裡的xxxxxxx為動態用戶控件的類型...
但是我發現,即便知道了xxxxxxx的類型也還是無法轉換:
dim itype as type=me.parent.findcontrol("Ax"),ClassAx).gettype.basetype
dim a =ctype(me.parent.Findcontrol("Ax"),itype) '這句還是通不過,提示:itype未定義。
dim ctrl as textbox=ctype(a.Findcontrol("ctrl"),textbox)
比如在B中需要訪問A的一個textbox,那麽需要
dim a =ctype(me.parent.Findcontrol("uaid"),xxxxxxx)
dim ctrl as textbox=ctype(a.Findcontrol("ctrl"),textbox)
這裡的xxxxxxx為動態用戶控件的類型...
但是我發現,即便知道了xxxxxxx的
類型(dim itype as type=me.parent.findcontrol('Ax'),ClassAx).gettype.basetype)
也還是無法轉換:dim a =ctype(me.parent.Findcontrol("uaid"),itype )這句還是通不過,提示:itype未定義。