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

Forms inheritance problem

Hi,

I created two base forms: frmList and frmDetail, compiled
them into a dll, and then want to use in my new project.
The problem: When I created new inherited form, say
frmClients, I cannot load the form in design view - the
IDE complains with
"Argument 'Path' is Nothing or empty." error.

It does not stop however the project to compile, and even
works correctly while running the project.

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load
it.

Does anyone know what may be the problem and how to fix
it?

Any help will be greatly appreciated.

Nov 20 '05 #1
7 1498
I dont think this is possible. The reason for this is that once you have
compiled it into a library, non of the source information is then available
for the IDE using that reference.

I suggest that you complete your design and debug it and fully test it, once
you have done this you can then put the form into a library.

Regards - OHM
Sergey Poberezovskiy wrote:
Hi,

I created two base forms: frmList and frmDetail, compiled
them into a dll, and then want to use in my new project.
The problem: When I created new inherited form, say
frmClients, I cannot load the form in design view - the
IDE complains with
"Argument 'Path' is Nothing or empty." error.

It does not stop however the project to compile, and even
works correctly while running the project.

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load
it.

Does anyone know what may be the problem and how to fix
it?

Any help will be greatly appreciated.

Nov 20 '05 #2
There is something wierd happening - I cannot event load
an inherited form within the dll project - event though I
can easily load both frmList and frmDetail in design view.

Any ideas?..
-----Original Message-----
I dont think this is possible. The reason for this is that once you havecompiled it into a library, non of the source information is then availablefor the IDE using that reference.

I suggest that you complete your design and debug it and fully test it, onceyou have done this you can then put the form into a library.
Regards - OHM
Sergey Poberezovskiy wrote:
Hi,

I created two base forms: frmList and frmDetail, compiled them into a dll, and then want to use in my new project. The problem: When I created new inherited form, say
frmClients, I cannot load the form in design view - the
IDE complains with
"Argument 'Path' is Nothing or empty." error.

It does not stop however the project to compile, and even works correctly while running the project.

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load
it.

Does anyone know what may be the problem and how to fix
it?

Any help will be greatly appreciated.

.

Nov 20 '05 #3
This may help ?

http://visualbasic.about.com/library.../aa081703a.htm

Regards OHM
Sergey Poberezovskiy wrote:
There is something wierd happening - I cannot event load
an inherited form within the dll project - event though I
can easily load both frmList and frmDetail in design view.

Any ideas?..
-----Original Message-----
I dont think this is possible. The reason for this is that once you
have compiled it into a library, non of the source information is
then available for the IDE using that reference.

I suggest that you complete your design and debug it and fully test
it, once you have done this you can then put the form into a library.

Regards - OHM
Sergey Poberezovskiy wrote:
Hi,

I created two base forms: frmList and frmDetail, compiled
them into a dll, and then want to use in my new project.
The problem: When I created new inherited form, say
frmClients, I cannot load the form in design view - the
IDE complains with
"Argument 'Path' is Nothing or empty." error.

It does not stop however the project to compile, and even
works correctly while running the project.

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load
it.

Does anyone know what may be the problem and how to fix
it?

Any help will be greatly appreciated.

.

Nov 20 '05 #4
OOps. Sorry, I dont think I can help you further on this as its not
something I normally do, Perhaps you could repost the question again and I
will not take part. That way maybe you will get an answer.

Regards - OHM

Sergey Poberezovskiy wrote:
I'm using 2003 Enterprise Architect - so this is not
applicable either...
-----Original Message-----
This may help ?

http://visualbasic.about.com/library.../aa081703a.htm

Regards OHM
Sergey Poberezovskiy wrote:
There is something wierd happening - I cannot event load
an inherited form within the dll project - event though I
can easily load both frmList and frmDetail in design view.

Any ideas?..

-----Original Message-----
I dont think this is possible. The reason for this is that once you
have compiled it into a library, non of the source information is
then available for the IDE using that reference.

I suggest that you complete your design and debug it and fully test
it, once you have done this you can then put the form into a
library.

Regards - OHM
Sergey Poberezovskiy wrote:
> Hi,
>
> I created two base forms: frmList and frmDetail, compiled
> them into a dll, and then want to use in my new project.
> The problem: When I created new inherited form, say
> frmClients, I cannot load the form in design view - the
> IDE complains with
> "Argument 'Path' is Nothing or empty." error.
>
> It does not stop however the project to compile, and even
> works correctly while running the project.
>
> Unfortunately, I cannot add controls on the form
> (frmClients) in design view - the IDE simply won't load
> it.
>
> Does anyone know what may be the problem and how to fix
> it?
>
> Any help will be greatly appreciated.
.

.

Nov 20 '05 #5
On Sun, 23 Nov 2003 20:21:55 -0800, Sergey Poberezovskiy wrote:

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load
it.


Does your form class have a constructor that takes NO arguments? That is
necessary for the form designer to be able to instantiate it. Can you show
us the code for the form class and information on the constructors?

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #6
Every form has an overloaded constructor, but one without
parameters amongst them. The code for the frmDetail, and
frmClient is as follows:

frmDetail:

Imports System.Windows.Forms

Namespace Forms
Public Class frmDetail
Inherits System.Windows.Forms.Form

Protected _id As Int32
Protected _openMode As Constants.FormOpenMode
Private _detailName As String =
Constants.EmptyString

#Region " Windows Form Designer generated code "

#Region " Constructor"
Public Sub New()
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
End Sub

Public Sub New(ByVal parentMDI As Form)
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
Me.ParentMDI = parentMDI
End Sub

Public Sub New(ByVal detailName As String)
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
Me.DetailName = detailName
End Sub

Public Sub New(ByVal parentMDI As Form, ByVal
detailName As String)
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
Me.ParentMDI = parentMDI
Me.DetailName = detailName
End Sub
#End Region

'Form overrides dispose to clean up the component
list.
Protected Overloads Overrides Sub Dispose(ByVal
disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As
System.ComponentModel.IContainer

'NOTE: The following procedure is required by the
Windows Form Designer
'It can be modified using the Windows Form
Designer.
'Do not modify it using the code editor.
Protected Friend WithEvents btnSave As
System.Windows.Forms.Button
Protected Friend WithEvents btnCancel As
System.Windows.Forms.Button

<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.btnSave = New System.Windows.Forms.Button
Me.btnCancel = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'btnSave
'
Me.btnSave.Anchor = CType
((System.Windows.Forms.AnchorStyles.Bottom Or
System.Windows.Forms.AnchorStyles.Right),
System.Windows.Forms.AnchorStyles)
Me.btnSave.DialogResult =
System.Windows.Forms.DialogResult.Cancel
Me.btnSave.Location = New System.Drawing.Point
(175, 298)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(70,
25)
Me.btnSave.TabIndex = 19
Me.btnSave.Text = "&Save"
'
'btnCancel
'
Me.btnCancel.Anchor = CType
((System.Windows.Forms.AnchorStyles.Bottom Or
System.Windows.Forms.AnchorStyles.Right),
System.Windows.Forms.AnchorStyles)
Me.btnCancel.DialogResult =
System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New
System.Drawing.Point(284, 298)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size
(70, 25)
Me.btnCancel.TabIndex = 17
Me.btnCancel.Text = "&Cancel"
'
'frmDetail
'
Me.AutoScaleBaseSize = New System.Drawing.Size
(5, 13)
Me.ClientSize = New System.Drawing.Size(367,
332)
Me.Controls.Add(Me.btnSave)
Me.Controls.Add(Me.btnCancel)
Me.MinimumSize = New System.Drawing.Size(375,
370)
Me.Name = "frmDetail"
Me.ResumeLayout(False)

End Sub
#End Region

#Region " Public Properties"
Public Property Id() As Int32
Get
Return _id
End Get
Set(ByVal Value As Int32)
If Not _id.Equals(Value) Then
_id = Value
sbSetFormText()
If Not Value.Equals(0) Then
sbSetRecord()
End If
End If
End Set
End Property

Public Property DetailName() As String
Get
Return _detailName
End Get
Set(ByVal Value As String)
_detailName = Value
End Set
End Property

Public WriteOnly Property ParentMDI() As Form
Set(ByVal Value As Form)
Me.MdiParent = Value
End Set
End Property

Public WriteOnly Property OpenMode() As
Constants.FormOpenMode
Set(ByVal Value As Constants.FormOpenMode)
_openMode = Value
sbSetFormText()
sbSetControlsMode()
End Set
End Property
#End Region

#Region " Private routines"
Protected Overridable Sub sbSetControlsMode()

End Sub

Protected Overridable Sub sbSetRecord()

End Sub

Protected Overridable Function fnCheck() As
Boolean

End Function

Protected Overridable Sub sbSetFormText()
Select Case _openMode
Case Constants.FormOpenMode.newRecord
Me.Text = "Create New " & _detailName
Case Constants.FormOpenMode.editRecord
Me.Text = "Modify " & _detailName
& " " & _id.ToString
Case Constants.FormOpenMode.viewRecord
Me.Text = "View " & _detailName & " "
& _id.ToString
End Select
End Sub
#End Region

Private Sub frm_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
General.SetFormPosition(Me)
End Sub

Private Sub frm_Closing(ByVal sender As Object,
ByVal e As System.ComponentModel.CancelEventArgs) Handles
MyBase.Closing
General.SaveFormPosition(Me)
Me.Dispose()
End Sub

Private Sub btnCancel_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnCancel.Click
Me.Close()
End Sub

End Class
End Namespace

And frmClient:

Friend Class frmClient
Inherits BaseClasses.Forms.frmDetail

#Region " Windows Form Designer generated code "
#Region " Constructor"
Public Sub New()
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
End Sub

Public Sub New(ByVal openMode As
Constants.FormOpenMode)
MyBase.New()
'This call is required by the Windows Form
Designer.
InitializeComponent()
Me.OpenMode = openMode
End Sub

Public Sub New(ByVal parentMDI As Form)
MyBase.New(parentMDI)
'This call is required by the Windows Form
Designer.
InitializeComponent()
End Sub

Public Sub New(ByVal parentMDI As Form, ByVal
openMode As Constants.FormOpenMode)
MyBase.New(parentMDI)
'This call is required by the Windows Form
Designer.
InitializeComponent()
Me.OpenMode = openMode
End Sub
#End Region

'Form overrides dispose to clean up the component
list.
Protected Overloads Overrides Sub Dispose(ByVal
disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the
Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.Text = "frmClient"
End Sub
#End Region

#Region " Overrides"
Protected Overrides Sub btnSave_Click(ByVal sender As
Object, ByVal e As System.EventArgs)

End Sub
#End Region

Protected Overrides Function fnCheck() As Boolean

End Function

Protected Overrides Sub sbSetControlsMode()

End Sub

Protected Overrides Sub sbSetRecord()

End Sub
End Class

There isn't much code in those as I cannot add controls
to it...
-----Original Message-----
On Sun, 23 Nov 2003 20:21:55 -0800, Sergey Poberezovskiy wrote:

Unfortunately, I cannot add controls on the form
(frmClients) in design view - the IDE simply won't load it.
Does your form class have a constructor that takes NO

arguments? That isnecessary for the form designer to be able to instantiate it. Can you showus the code for the form class and information on the constructors?
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mailaddress.
.

Nov 20 '05 #7
Hi,
I have a suggestion that you can try out. Sometimes these types of weird
errors occur when one of the system dlls copylocal property is set to
true. So please check properties of the system dlls in your references
section and make sure their copylocal property is set to false. SAve the
project and then reload it and see if you can get into the desinger.

Thanks
Anand Balasubramanian
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks

Nov 20 '05 #8

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

Similar topics

1
by: KK | last post by:
Windows Forms Inheritance, Incomplete? I was playing around with Windows Forms and found out this Forms Inheritance feature. The moment I saw that, I felt this can be used effectively if the...
2
by: KK | last post by:
** Posting it here cause after couple of days no body responded.** I was playing around with Windows Forms and found out this Forms Inheritance feature. The moment I saw that, I felt this can...
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: Mojtaba Faridzad | last post by:
Hi, I have some forms that they need to have access to some public variables. to solve this problem I decided to have a RootForm and all other forms are drived from this form. I can set my...
20
by: Michael Maes | last post by:
Hello, I have a BaseForm with (eg) one Timer in the Components'collection & one Button in the Controls'Collection Also there are three Subs: Load, ScanControls & ScanComponents. The BaseForm is...
0
by: fds | last post by:
Hello! I have a very specific question and that is about how to inherit a control for example the control System.Windows.Forms.TextBox without causing the environment to delete the control when...
0
by: Tony Johansson | last post by:
Hello! I have a very specific question and that is about how to inherit a visual control for example the control System.Windows.Forms.TextBox without causing the environment to delete the...
4
by: blueflyy | last post by:
Hello, I have a wierd problem with forms inheritance. I have 2 forms: A derives from Form. B derives from A. In form A I have a private Button and a property that looks like this: public...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.