473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

creating a base form class

is it possible for me to create a base form class, & then some how configure
VB.NET,
so that when ever i create a new form, it will automatically be based on the
above form class.

i know i can go & manually inherit the above form, but i don't want to keep
doing this,
similarly with the textbox & command button controls.

??
Nov 21 '05 #1
5 5864

Just make a new class that inherits from the base form instead of the
System.Windows.Forms.Form class. You get the user interface and can change
anything with public, friend or private scope. This includes the properties
and locations of the controls with scope access.

--Robby
"Antuane" <An*****@testing.com.net> wrote in message
news:u7****************@tk2msftngp13.phx.gbl...
is it possible for me to create a base form class, & then some how
configure
VB.NET,
so that when ever i create a new form, it will automatically be based on
the
above form class.

i know i can go & manually inherit the above form, but i don't want to
keep
doing this,
similarly with the textbox & command button controls.

??

Nov 21 '05 #2
Yes, but for this i'll have to specifically point the location or the base
class i want to use.
What i'd like to do is change the baseclass used in VB.net, so that it will
always use this new baseclass of mine (rather than me having to point out
this baseclass).

I want to override the base class of VB.net (or at least reconfigure it - if
overriding sounds to preposterous).
"Robby" <ed****@not.my.email.com> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...

Just make a new class that inherits from the base form instead of the
System.Windows.Forms.Form class. You get the user interface and can change anything with public, friend or private scope. This includes the properties and locations of the controls with scope access.

--Robby
"Antuane" <An*****@testing.com.net> wrote in message
news:u7****************@tk2msftngp13.phx.gbl...
is it possible for me to create a base form class, & then some how
configure
VB.NET,
so that when ever i create a new form, it will automatically be based on
the
above form class.

i know i can go & manually inherit the above form, but i don't want to
keep
doing this,
similarly with the textbox & command button controls.

??


Nov 21 '05 #3
Hi,

Here is where the template is located by default. Maybe modify
it reflect your changes.

C:\Program Files\Microsoft Visual Studio .NET
2003\Vb7\VBWizards\WinForm\Templates\1033

Ken
--------------------------
"Antuane" <An*****@testing.com.net> wrote in message
news:u7****************@tk2msftngp13.phx.gbl...
is it possible for me to create a base form class, & then some how configure
VB.NET,
so that when ever i create a new form, it will automatically be based on the
above form class.

i know i can go & manually inherit the above form, but i don't want to keep
doing this,
similarly with the textbox & command button controls.

??

Nov 21 '05 #4
You can create a custom form template. See this article of mine:

HOWTO: Changing the source code of templates used by Visual Studio .NET
wizards.
http://support.microsoft.com/default...b;en-us;555160

--

Carlos J. Quintero

The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com
"Antuane" <An*****@testing.com.net> escribió en el mensaje
news:u7****************@tk2msftngp13.phx.gbl...
is it possible for me to create a base form class, & then some how
configure
VB.NET,
so that when ever i create a new form, it will automatically be based on
the
above form class.

i know i can go & manually inherit the above form, but i don't want to
keep
doing this,
similarly with the textbox & command button controls.

??

Nov 21 '05 #5
Thanx a lot guys, your replies have been much appreciated & of great value.
Thanx again.

"Antuane" <An*****@testing.com.net> wrote in message
news:u7**************@tk2msftngp13.phx.gbl...
is it possible for me to create a base form class, & then some how configure VB.NET,
so that when ever i create a new form, it will automatically be based on the above form class.

i know i can go & manually inherit the above form, but i don't want to keep doing this,
similarly with the textbox & command button controls.

??

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michel Diemunsch | last post by:
Hello I have created a new Windows Application. Visual has createt the form Form1 I compile and run application. I quit the application and want to create a new form that inherits from Form1...
2
by: Technical Group | last post by:
Friends, Can anybody help me out by sending a piece of C# code showing how to add an active directory user to a particular user group? If the group does not exist, then create it. Thanks in...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
3
by: Tabi | last post by:
Hi, I have just created a class that removes action attribute from HtmlForm. The code looks like here. namespace ComIT.Applications.Common { public class Form :...
1
by: balystyk | last post by:
Are there any possible issues with creating a base class (adding common properties) for a user control using a class file and not a user control (.ascx and code-behind) in asp.net 2.0? I have...
9
by: MikeB | last post by:
Hi, I'd appreciate some help, please. I'm writing a VS2005 VB project for school and one of the requirements is that every screen should have a "Help" button. I could do it by writing a clumsy...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
5
by: Doc John | last post by:
I need to create several Windows Forms and I'm thinking of creating a base Form from which I can derive all Forms. Is it possible to include something in that Base Form so that all Forms I create...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.