Answered by:
How to create form visual classes in vb.net

Question
-
i am a visual foxpro programmer, and in that language we can make not only user controls like textbox, combobox, grid,etc.But form classes in visual way, doing drag and drop a form class. How can i make the same thing in vb.net?
Thank you in advance
Luis
Friday, July 15, 2011 3:04 AM
Answers
-
Now i know the answer, for example
One person can create a a new form and add them other form controls or change other properites of the form.
if it is in the same project
save teh form for example the name could be formlm.
create other form with the name formO
after that press the option to see all the files and right clik in the formO.Designer.vb an open adn choose see code. then it appears teh code
in some part appears this
Inherits System.Windows.Forms.
Form
Replace that with this
Inherits
where is the name of my project and the form which from my form formO inherits
and that is all
is the class is in other project do not forget to add a reference before write inherits...
Bye
- Marked as answer by Mike FengModerator Tuesday, July 19, 2011 9:37 AM
Friday, July 15, 2011 9:52 PM
All replies
-
Hi Luis,
By wanting to drag and drop Forms are you wanting Forms within a Form?
If so there are two ways of doing that from what I know.
Please let me know if that is what you are after doing.
I don't know if you are wanting to add more Forms to a Form manually or using code or not.
It sounds like you want to do it manually.
Regards,
John
Click this link to see how to insert a picture into a forum post.
Installing VB6 on Windows 7
XNA is coming to VB.Net
App Hub forums
Friday, July 15, 2011 3:13 AM -
Let me explain to you
in vfp in a form i can set some properties of the form and program in teh event init and load or others
After that i can save it as a class.
When i want and instance of a that form class i drag and drop "with in" a form , but after that i delete the first from and i keep the instance of my form class. that i droped in .
Is there any way to do the same thing in vb.net?
Luis
Friday, July 15, 2011 3:30 AM -
http://msdn.microsoft.com/en-us/library/6hws6h2t(v=VS.100).aspx
A Windows Forms control is developed as a Class Library. The library is a DLL that can be imported into other projects, giving you access to the control from the designer.
- Proposed as answer by Mike FengModerator Tuesday, July 19, 2011 9:37 AM
Friday, July 15, 2011 4:02 AM -
Now i know the answer, for example
One person can create a a new form and add them other form controls or change other properites of the form.
if it is in the same project
save teh form for example the name could be formlm.
create other form with the name formO
after that press the option to see all the files and right clik in the formO.Designer.vb an open adn choose see code. then it appears teh code
in some part appears this
Inherits System.Windows.Forms.
Form
Replace that with this
Inherits
where is the name of my project and the form which from my form formO inherits
and that is all
is the class is in other project do not forget to add a reference before write inherits...
Bye
- Marked as answer by Mike FengModerator Tuesday, July 19, 2011 9:37 AM
Friday, July 15, 2011 9:52 PM