10-02-14, 01:54 AM
(09-02-14, 10:48 PM)ربيع كتب : نحمده ونصلي على رسوله الكريمجزاك الله خير
DLL:
كود :
Public Class Class1
Public Sub AddButton(ByRef form As System.Windows.Forms.Form)
Dim b As New System.Windows.Forms.Button()
b.Size = New System.Drawing.Size(180, 18)
b.Location = New System.Drawing.Point(20, 20)
form.Controls.Add(b)
End Sub
End Class
Form:
كود :
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim b As New ClassLibrary1.Class1()
b.AddButton(Me)
End Sub
End Class


