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
Guest User
Tech Writer
529
41.9k
Form 1 listbbox value pass in form 2 label “help Me In This Code”
Nov 4 2020 10:10 PM
Form 1 Code
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
WindowsFormsApp1
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
string
[] paths, files;
private
void
showform2_Click(
object
sender, EventArgs e)
{
Form2 f22 =
new
Form2();
f22.Show();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
}
private
void
listBox1_SelectedIndexChanged(
object
sender, EventArgs e)
{
}
private
void
btnopenfiles_Click(
object
sender, EventArgs e)
{
OpenFileDialog ofd =
new
OpenFileDialog();
ofd.Multiselect =
true
;
if
(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
files = ofd.SafeFileNames;
paths = ofd.FileNames;
for
(
int
i =0;i
{
listBox1.Items.Add(files[i]);
}
}
}
}
}
Form 2 Code
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
WindowsFormsApp1
{
public
partial
class
Form2 : Form
{
public
Form2()
{
InitializeComponent();
}
}
}
Attachment:
Projects.rar
Reply
Answers (
6
)
Cannot find column [name]
visual programming