473,396 Members | 2,030 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,396 software developers and data experts.

Inherited forms

I'm building a small desktop database app. I am building a template form that
has navigation and editing coded, and want to inherit this for my actual data
forms. When I add a form, and change the inherits statement to point to the
form I want, as soon as I try to view it in the designer I get an error:
Value can't be null. Parameter name: dataSource.
It looks like the parameter for the binding manager, so I tried removing the
reference in my template, and still get the error. I tried wrapping the
bindingmanager = me.bindingcontext(dataSource) in a try statement, and that
didn't help. I can't find any other place where a data source is referenced
in the template. Ideas much appreciated.
Nov 21 '05 #1
7 1196
EdB
I think you're going about it in a manner not intended by Mr. Gates & co.

You have your base form. Then build your solution. Then, don't add a
Windows form, add an Inherited Form. Here, you will first Name your new
form, then, you will select which form it inherits from.

"RandyR" wrote:
I'm building a small desktop database app. I am building a template form that
has navigation and editing coded, and want to inherit this for my actual data
forms. When I add a form, and change the inherits statement to point to the
form I want, as soon as I try to view it in the designer I get an error:
Value can't be null. Parameter name: dataSource.
It looks like the parameter for the binding manager, so I tried removing the
reference in my template, and still get the error. I tried wrapping the
bindingmanager = me.bindingcontext(dataSource) in a try statement, and that
didn't help. I can't find any other place where a data source is referenced
in the template. Ideas much appreciated.

Nov 21 '05 #2
I tried that, and get the same error. Thanks for the attempt.

"EdB" wrote:
I think you're going about it in a manner not intended by Mr. Gates & co.

You have your base form. Then build your solution. Then, don't add a
Windows form, add an Inherited Form. Here, you will first Name your new
form, then, you will select which form it inherits from.

"RandyR" wrote:
I'm building a small desktop database app. I am building a template form that
has navigation and editing coded, and want to inherit this for my actual data
forms. When I add a form, and change the inherits statement to point to the
form I want, as soon as I try to view it in the designer I get an error:
Value can't be null. Parameter name: dataSource.
It looks like the parameter for the binding manager, so I tried removing the
reference in my template, and still get the error. I tried wrapping the
bindingmanager = me.bindingcontext(dataSource) in a try statement, and that
didn't help. I can't find any other place where a data source is referenced
in the template. Ideas much appreciated.

Nov 21 '05 #3
Randy,

The currencymanager fires often as well while initializing. So try to set
the code that uses binding inside a booleanswith what you set to true when
the initializing is done. We see not much from your code, so this is only a
big gues

I hope this helps?

Cor

"RandyR" <rr*****@nospam.att.net>

I tried that, and get the same error. Thanks for the attempt.

"EdB" wrote:
I think you're going about it in a manner not intended by Mr. Gates & co.

You have your base form. Then build your solution. Then, don't add a
Windows form, add an Inherited Form. Here, you will first Name your new
form, then, you will select which form it inherits from.

"RandyR" wrote:
> I'm building a small desktop database app. I am building a template
> form that
> has navigation and editing coded, and want to inherit this for my
> actual data
> forms. When I add a form, and change the inherits statement to point to
> the
> form I want, as soon as I try to view it in the designer I get an
> error:
> Value can't be null. Parameter name: dataSource.
> It looks like the parameter for the binding manager, so I tried
> removing the
> reference in my template, and still get the error. I tried wrapping the
> bindingmanager = me.bindingcontext(dataSource) in a try statement, and
> that
> didn't help. I can't find any other place where a data source is
> referenced
> in the template. Ideas much appreciated.

Nov 21 '05 #4
"RandyR" <rr*****@nospam.att.net> wrote in message
news:66**********************************@microsof t.com...
When I add a form, and change the inherits statement to point to
the form I want, as soon as I try to view it in the designer I get an error: Value can't be null. Parameter name: dataSource.


Do you need this code in your Base Class running in the Designer?
If not, try wrapping it in

If Not Me.DesignMode Then
' Code that only runs "for real".
End If

HTH,
Phill W.
Nov 21 '05 #5
I can't pinpoint the code causing the failure - there's only one place where
I have a dataSource argument, and even deleting that line doesn't help. So I
don't know where this would fit.

"Phill. W" wrote:
"RandyR" <rr*****@nospam.att.net> wrote in message
news:66**********************************@microsof t.com...
When I add a form, and change the inherits statement to point to
the form I want, as soon as I try to view it in the designer I get an

error:
Value can't be null. Parameter name: dataSource.


Do you need this code in your Base Class running in the Designer?
If not, try wrapping it in

If Not Me.DesignMode Then
' Code that only runs "for real".
End If

HTH,
Phill W.

Nov 21 '05 #6
I tried your suggestion, and still no success; could be I'm not placing
correctly. I added a form level variable in my base form set to false, and at
the end of the initialize routine set it to true. In the form load, I set the
binding manager; no joy. I also tried removing
manager=me.bindingcontext(MyData) before inheriting the form and no luck.
Could it be because I've got procedures that reference the binding manager?
Thanks for your help.

"Cor Ligthert" wrote:
Randy,

The currencymanager fires often as well while initializing. So try to set
the code that uses binding inside a booleanswith what you set to true when
the initializing is done. We see not much from your code, so this is only a
big gues

I hope this helps?

Cor

"RandyR" <rr*****@nospam.att.net>

I tried that, and get the same error. Thanks for the attempt.

"EdB" wrote:
I think you're going about it in a manner not intended by Mr. Gates & co.

You have your base form. Then build your solution. Then, don't add a
Windows form, add an Inherited Form. Here, you will first Name your new
form, then, you will select which form it inherits from.

"RandyR" wrote:

> I'm building a small desktop database app. I am building a template
> form that
> has navigation and editing coded, and want to inherit this for my
> actual data
> forms. When I add a form, and change the inherits statement to point to
> the
> form I want, as soon as I try to view it in the designer I get an
> error:
> Value can't be null. Parameter name: dataSource.
> It looks like the parameter for the binding manager, so I tried
> removing the
> reference in my template, and still get the error. I tried wrapping the
> bindingmanager = me.bindingcontext(dataSource) in a try statement, and
> that
> didn't help. I can't find any other place where a data source is
> referenced
> in the template. Ideas much appreciated.


Nov 21 '05 #7
Randy,

That can be, I think that the best is to try to keep your binding inside
your template form or to keep it completly outside.

Cor

"RandyR" <rr*****@nospam.att.net>
I tried your suggestion, and still no success; could be I'm not placing
correctly. I added a form level variable in my base form set to false, and
at
the end of the initialize routine set it to true. In the form load, I set
the
binding manager; no joy. I also tried removing
manager=me.bindingcontext(MyData) before inheriting the form and no luck.
Could it be because I've got procedures that reference the binding
manager?
Thanks for your help.

"Cor Ligthert" wrote:
Randy,

The currencymanager fires often as well while initializing. So try to set
the code that uses binding inside a booleanswith what you set to true
when
the initializing is done. We see not much from your code, so this is only
a
big gues

I hope this helps?

Cor

"RandyR" <rr*****@nospam.att.net>

>I tried that, and get the same error. Thanks for the attempt.
>
> "EdB" wrote:
>
>> I think you're going about it in a manner not intended by Mr. Gates &
>> co.
>>
>> You have your base form. Then build your solution. Then, don't add a
>> Windows form, add an Inherited Form. Here, you will first Name your
>> new
>> form, then, you will select which form it inherits from.
>>
>> "RandyR" wrote:
>>
>> > I'm building a small desktop database app. I am building a template
>> > form that
>> > has navigation and editing coded, and want to inherit this for my
>> > actual data
>> > forms. When I add a form, and change the inherits statement to point
>> > to
>> > the
>> > form I want, as soon as I try to view it in the designer I get an
>> > error:
>> > Value can't be null. Parameter name: dataSource.
>> > It looks like the parameter for the binding manager, so I tried
>> > removing the
>> > reference in my template, and still get the error. I tried wrapping
>> > the
>> > bindingmanager = me.bindingcontext(dataSource) in a try statement,
>> > and
>> > that
>> > didn't help. I can't find any other place where a data source is
>> > referenced
>> > in the template. Ideas much appreciated.


Nov 21 '05 #8

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

Similar topics

2
by: Jeff Levinson [mcsd] | last post by:
I guess I would have to know what you mean by "not being able to edit the forms". Does this mean you get an error in the designer when you try to display an inherited form? Does this mean the...
1
by: Boniek | last post by:
Hi Sometimes I have problems with my forms which are inherited from other forms and base forms are in other project. When I change something in base forms my normal forms are broken in Visual in...
13
by: Lorne Smith | last post by:
Hi, First, sorry for the crosspost, but it seemed appropriate... :) I've come accross what I consider to be a bug, but I don't know if it's already known or not. (VS .Net 2003 Pro - VB.Net) ...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
2
by: John | last post by:
What is the difference between a New Form and an Inherited Form? Thanks John ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1...
0
by: Sean | last post by:
I've been noticing that I seem to be "losing" the ability to compile inherited forms. The first couple debug starts are fine but occassionally the compiler complains of a variable or a control that...
4
by: dbuchanan | last post by:
Is the following behavior normal? Both the 'Protected sub' in the inherited form and the 'Private Shadows sub' in the derived form fires. My interpretation of MSDN help on the topic "Shadows"...
2
by: Robert Smith | last post by:
Hello, I have a problem with inherited forms in my solution. I have one project with my base forms in and another (my main project) with my inherited forms in it. There are times when I load the...
3
by: Jeff User | last post by:
Hello I am using C#, .net1.1 Vis Studio 2003 I am using homeBase.aspx.cs page as a base for several other aspx/aspx.cs web pages. The base page handles some operations that are common to all...
4
by: Mikus Sleiners | last post by:
I can't seem to add new controls to form that is inherited from another form. I have BaseForm wich have table layout on it 2 panelsm and some buttons. Now i create InheritedForm : BaseForm and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.