c# - Display multiple txt files using openFileDialog in seperate forms -
c# - Display multiple txt files using openFileDialog in seperate forms -
i attempting create sticky note app, have form contains textbox , several buttons, arguments sake lets phone call form: form1()
buttons 'new' (open empty form1
, 'save' button (savefiledialog1
) , 'load' button (openfiledialog1
).
the issue im having have multi-select set true, in openfiledialog
cant seem multiple selected text files open in each separate new forms.
i have tried playing foreach
statements no avail.
any advice guys can offer great
below segment of code;
//load properties private void button3_click(object sender, eventargs e) { int size = -1; dialogresult result = openfiledialog1.showdialog(); // show dialog if (result == dialogresult.ok) // test result { txtuser.text = file.readalltext(openfiledialog1.filename); string file = openfiledialog1.filename; seek { string text = file.readalltext(file); size = text.length; } //catch exceptions grab (ioexception) { } }
c# loops text load multi-select
Comments
Post a Comment