Answered by:
this Code did not work

Question
-
Public Class Memory Inherits System.Windows.Forms.Form Private Sub Memory_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' SaveMemoryButton Me.SaveMemoryButton.Text = "Save Memory" Me.SaveMemoryButton.Name = "SaveMemoryButton" Me.SaveMemoryButton.Size = New System.Drawing.Size(106, 31) Me.SaveMemoryButton.Location = New System.Drawing.Point(228, 254) Me.SaveMemoryButton.BackColor = Color.Green Me.SaveMemoryButton.ForeColor = Color.Black ' LoadMemoryButton Me.LoadMemoryButton.Name = "LoadMemoryButton" Me.LoadMemoryButton.Text = "Load Memory" Me.LoadMemoryButton.Size = New System.Drawing.Size(106, 31) Me.LoadMemoryButton.Location = New System.Drawing.Point(340, 254) Me.LoadMemoryButton.BackColor = Color.Green Me.LoadMemoryButton.ForeColor = Color.Black ' ListBox1 Me.listbox1.Name = "ListBox1" Me.listbox1.Text = "ListBox1" Me.listbox1.BorderStyle = System.Windows.Forms.BorderStyle.None Me.listbox1.FormattingEnabled = True Me.listbox1.Location = New System.Drawing.Point(0, 1) Me.listbox1.Size = New System.Drawing.Size(449, 247) Me.listbox1.TabIndex = 1 ' AddItemButton Me.AddItemButton.Name = "AddItemButton" Me.AddItemButton.Text = "Add Item" Me.AddItemButton.Size = New System.Drawing.Size(106, 31) Me.AddItemButton.Location = New System.Drawing.Point(116, 254) Me.AddItemButton.BackColor = Color.Green Me.AddItemButton.ForeColor = Color.Black ' Form Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Size = New System.Drawing.Size(468, 327) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "Memory" Me.ShowIcon = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Memory" Me.ResumeLayout(False) Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedDialog '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Me.Controls.Add(SaveMemoryButton) Me.Controls.Add(LoadMemoryButton) Me.Controls.Add(AddItemButton) Me.Controls.Add(listbox1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' End Sub Private Sub SaveMemoryButton_click(ByVal sender As Object, e As EventArgs) Handles SaveMemoryButton.Click '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' <<<<<<<<<<<<<< This Code did not work , Why ????? >>>>>>>>>>>>>>>>>>>>>>>> My.Settings.Mem = listbox1 My.Settings.Save() End Sub Private Sub LoadMemoryButton_Click(sender As Object, e As EventArgs) Handles LoadMemoryButton.Click listbox1 = My.Settings.Mem '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Sub Private Sub AddItemButton_Click(sender As Object, e As EventArgs) Handles AddItemButton.Click Me.listbox1.Items.Add("Hello World") End Sub Friend WithEvents SaveMemoryButton As New Button Friend WithEvents LoadMemoryButton As New Button Friend WithEvents AddItemButton As New Button Friend WithEvents listbox1 As New ListBox End Class
- Moved by Dave PatrickMVP Tuesday, July 26, 2016 8:47 PM
- Edited by Abdullah Omran Tuesday, July 26, 2016 8:51 PM
Tuesday, July 26, 2016 8:45 PM
Answers
-
I'd probably try them over here.
https://social.msdn.microsoft.com/Forums/windows/en-US/home?category=windowsforms
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Mike Laughlin Wednesday, July 27, 2016 11:44 AM
- Marked as answer by Just Karl Wednesday, August 3, 2016 2:07 PM
Tuesday, July 26, 2016 8:47 PM
All replies
-
I'd probably try them over here.
https://social.msdn.microsoft.com/Forums/windows/en-US/home?category=windowsforms
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Mike Laughlin Wednesday, July 27, 2016 11:44 AM
- Marked as answer by Just Karl Wednesday, August 3, 2016 2:07 PM
Tuesday, July 26, 2016 8:47 PM -
no one wants to help me
- Edited by Abdullah Omran Wednesday, July 27, 2016 10:08 AM
Wednesday, July 27, 2016 10:08 AM -
Yea that happens. It may be that no one knows. If you have an MSDN subscription and have linked your profile these forums provide priority support.
https://msdn.microsoft.com/en-us/subscriptions/aa974230.aspx
Also if it is not really specific to forms you could also try over here.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.
- Edited by Dave PatrickMVP Wednesday, July 27, 2016 1:20 PM
Wednesday, July 27, 2016 12:16 PM -
no one wants to help me
Hello,
It may be that there is no real question in you post.
Simply providing code and saying it does not work is not sufficient.
WHAT does not work?
Where is the failure?
What error message (if any) is provided?
What have you done to attempt to resolve it?
Also, please see how to create a Short, Self Contained, Correct (Compilable), Example.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join('6D73646E5F6B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Wednesday, August 3, 2016 2:10 PM