I am still struggling with my first program in C#. I need to first select a file from a directory, second, open the file, and third load an array with the contents of the file.
This array will later be used to send bytes to an external device (a test fixture) via USB. I can't seem to find the code to get the information into a form that I can use.
NOVICE3
NOVICE3
0
Newbie Poster
Recommended Answers
Jump to PostAdd a menuStrip and an openFileDialog to your form from the toolbox.
Add an 'Open File' tool strip menu item.
Your code for selecting the file to open may be something like this:private void OpenFileToolStripMenuItem_Click(object sender, System.EventArgs.e) { // Open the file. DialogResult responseDialogResult; // Begin …
All 6 Replies
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Chellam2
0
Newbie Poster
NOVICE3
0
Newbie Poster
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Chellam2
0
Newbie Poster
NOVICE3
0
Newbie Poster
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.