Creating New Objects on a Winform and Saving all object when program running
Posted on 2013-01-15
How can I add new object like buttons or listviews on a forms when program running and save created objects. And created objects are needed to be on the same form when program running secondly and after.
I have used a contexmenustrip for adding buttons with right click. But when program secondly runs, the created objects are not on the form.
How can I save objects all the time until user deleting objects.
Private Sub BuNoktayaMasaEkleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BuNoktayaMasaEkleToolStripMenuItem.Click
Dim btn1 As New Button
btn1.Text = "New Button"
Dim x As Integer
Dim y As Integer
x = MousePosition.X
y = MousePosition.Y
btn1.Location = New Point(x, y)
btn1.Size = New Size(100, 100)