Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42412

VS 2010 How to write code in dynamic made control?

$
0
0
I have a MenuStrip(Called MenuStrip1) and I'm trying to add text that the user inputs via textbox.
Heres my code:
Code:

Dim o as integer = 0
Dim userTxt1 as System.IO.StreamReader
Dim userTxt2 as System.IO.StreamReader
userTxt1=New System.IO.StreamReader(Dir1)
userTxt2=New System.IO.StreamReader(Dir2)
dim myArr1 as Array
dim myArr2 as Array
myArr1=Split(userText1.ReadToEnd, vbCrLf)
myArr2=Split(userText2.ReadToEnd, vbCrLf)
'Basically each time there is a break, it creates a new array item.
Do Until o = myArr1.Length
BKToolStripItem.DropDownItems.Add(myArr1(o))
o=o+1
Loop

How do I input code into the submenu I just made? I can't even use AddHandler!! Or can I? :confused:

Viewing all articles
Browse latest Browse all 42412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>