Advertisement
5_2007-2008 Data Structures #175706

Reference another form

This will show you how to reference another form in VB.net.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Code on form1:
Dim Frm2 as Form2 = New Form2
''Under InitializeComponent
frm.Init(me)
Code on form2:
Dim frm1 as form1
Public Function Init(Byval frm as Form1)
  frm1 = frm
End Function

'Now you will be able to reference controls on both forms.
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine