Thanks for answer, well, in this program i have a lot of forms. All forms are easly client-accessible by a main menù in the start form (a tree view control), but i wont to give to experts users (that know the name of forms) a faster way to open form. So they wont in the start form (the same of main menù) a textbox in whic they can write directly then name of form. If you know SAP system this way is similar to SAP-ERP ok-code method. I tried in this way:
Dim fForm As Form = Nothing For Each fForm In Forms If fForm.Name = txtGoForm.Text Then fcode = fForm End If Next fcode.MdiParent = Me fcode.Show()
but with vb.net i must declare all forms.
'declare forms Forms.Add(form1) Forms.Add(form2) etc..etc..
i wouldn't declare all forms in my project manually. There's another system? Thanks again (and sorry for my english)
"Tieske" wrote:
[Quoted Text] > I don't think I understand exactly what it is you are trying to do, but why > not create an extra form, which contains just a listbox. During the form_open > event you populate the listbox with the names of all the forms in your > database. > In the doubleclick event you then add code to open the selected form > > wouldn't that be easier than typing the names manually? > > > > "Cosimo" wrote: > > > hi. my progect contain about 100 forms. i would call them runtime, giving > > it's name in a texbox. (fox example: i write "DATA" in textbox and programm > > open form that have the same name) > > of course, i can use select case/ case = "DATA"/ data.show(). > > But, 100 forms are too much. There's a more dinamic solution to retrieve the > > form by a string like texbox.text? thanks!!
|