开发者

VB.NET - Duplicate existing form in FOR loop

Hey, I'm building a code editor app in VB.NET (Framework 4.0) and it opens all ".por" files into individual forms consisting of a MenuBar and TextBox (multi-line).

Currently I have 20 forms (all duplicates of the first on I designed) and if there are say 4 ".por" files in a directory, the first four will open up while the others hide.

I think it would be far more efficient by coding a new form For each item in form1's ListView...but I w开发者_如何学运维ant the next so many to be a copy of the first form I designed since I spent a good bit on it.

Thanks in advance!


I decided to use tabs instead.

It wasn't difficult, the problem was I didn't know how to use a form I couldn't see.

By sticking to tabs and making a huge IF statement, simply making a new tab for each new file, and I'm getting used to using controls which haven't actually been created with the designer.

Just passing through a wall here...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜