TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kailash Sahu
NA
24
570
I want to save full path of listbox in C#
Jul 22 2021 5:37 PM
First Of All I add Directory in Listbox, Like A Directory, B Directory. When User Click the item of ListBox ,Get the full path of Items in C# Someone modify the code ! Thanks in Advance ! BindingSource listboxsource = null; public Form1() { InitializeComponent(); listboxsource = new BindingSource(Properties.Settings.Default.listboxitems, ""); someListbox.DataSource = listboxsource; } //Add Folder in Listbox private void button57_Click(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.Description = "Please Select Folder"; if (dialog.ShowDialog() == DialogResult.OK) { string folderName = dialog.SelectedPath; string s = Path.GetFileName(folderName); listboxsource.Add(s); Properties.Settings.Default.Save(); listboxsource = new BindingSource(Properties.Settings.Default.listboxitems, ""); someListbox.DataSource = listboxsource; } } private void listBox5_SelectedIndexChanged(object sender, EventArgs e) { try { string fullname = Properties.Settings.Default.FullName; Properties.Settings.Default.Save(); MessageBox.Show(fullname); } catch(Exception) { }
Reply
Answers (
1
)
I'm getting error Must declare the scalar variable @schoolName
Working With FlowLayoutPanel