Hello,
I think this is an easy question, but I am new to VB and cannot find the appropriate example to solve my project.
I am making a small "viewer" program that displays a library of .rtf documents. The main form in my program has a tab control with lots of tabs - each tab has a file list box that paths itself to the correct files (tab ABC shows the files that start with a or b or c etc....)What I want to happen is when I click a file in a list box and click the "open" button, a second form appears and the contents of the selected .rtf file is loaded into an rtf control in this new form. I have created this second form with the control and have created the open button, but I don't understand how to make the file (as a variable??) load into the new form's control. I keep thinking this is very similar to those examples of building a graphics viewer, but I can't quite apply it. I was also messing with the LoadFile command, but couldn't understand how to apply it across one form to another .
Thanks for your help
I think this is an easy question, but I am new to VB and cannot find the appropriate example to solve my project.
I am making a small "viewer" program that displays a library of .rtf documents. The main form in my program has a tab control with lots of tabs - each tab has a file list box that paths itself to the correct files (tab ABC shows the files that start with a or b or c etc....)What I want to happen is when I click a file in a list box and click the "open" button, a second form appears and the contents of the selected .rtf file is loaded into an rtf control in this new form. I have created this second form with the control and have created the open button, but I don't understand how to make the file (as a variable??) load into the new form's control. I keep thinking this is very similar to those examples of building a graphics viewer, but I can't quite apply it. I was also messing with the LoadFile command, but couldn't understand how to apply it across one form to another .
Thanks for your help