in a form i have a listbox which has many items and one button,when we execute the project and while execution when i click a items from the listbox it will display the clicked item on the button but the problem i have is how to display the same clicked item when the form is executed for the second time the same clicked item in the previous execution should be on the button without clicking on the listbox items
Recommended Answers
Jump to PostYou can do this with application settings. I don't know what version of Visual Studio you have so I'll describe the procedure for VS 2010.
Start with your project open
Go to the project properties settings
Select the "Settings" tab down the left side of the panel
…
Jump to PostIf it doesn't work then you must be doing something wrong because I use this feature frequently.
Jump to PostSomething simple, use a .txt File. This saves the File to Desktop.
Imports System.IO Public Class Form1 Private myCoolFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\myCoolBtnTextFile.txt" Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing File.WriteAllText(myCoolFile, Button1.Text) End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) …
Jump to PostSee if this helps to load a file by clicking a Button.
Imports System.IO Public Class Form1 #Region "-----===-----===-----=== DECLARATIONS ===-----===-----===-----" Private myCoolFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\myCoolBtnTextFile.txt" '// your.File to .Save/.Load to/from. Private chrMain As Char = "|" '// char used to .Split each line …
All 14 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
adam_k
commented:
I agree
+8
khizer03
8
Light Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
codeorder
197
Nearly a Posting Virtuoso
NewUserVB.Net
commented:
he his the best
+1
khizer03
8
Light Poster
codeorder
197
Nearly a Posting Virtuoso
Begginnerdev
256
Junior Poster
khizer03
8
Light Poster
codeorder
197
Nearly a Posting Virtuoso
khizer03
8
Light Poster
codeorder
197
Nearly a Posting Virtuoso
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
khizer03
8
Light Poster
codeorder
197
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.