Help with Inherits in forms. NOW I REALY NEED HELP 
Author Message
 Help with Inherits in forms. NOW I REALY NEED HELP

HI

Okay now I have the problem in my first child form, I am having this
problem on and off, I can't see any of the Child forms when I inherit
from a base form, I can't see the forms in the IDE!!!!!

I have posted a big .bmp earlier in this group you can see the error in
that picture.

Okay her is the scenario:
I have a base form called clsform it inherits form windows forms, and
then I have a lot of child forms to this clsform, when I try to look at
the child forms in the IDE I can't see them, I have figured some of the
error out but I can't really see what the problem is.
In my clsform_load I have among other thing this lines of code:

Private Sub clsForm_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        Try
            Dictionary.Initialize(DataBase, Security.UserName)
            Dictionary.TranslateForm(Me)
End try
End sub

The Dictionary is my class, and I translate some string in that class, I
have been using this function for some time, but now when I write those
lines in my clsForm_load I get the error where I can't see the child
forms in the IDE.
I guess there must be some error in the Dictionary.Initialize, but I
can't see what the error is, can you please help me, I am getting
DotNetNUT.

And can you tell my why I can compile the project but I can't view the
child form in the IDE, it is like the IDE checks for error better then
the compiler, is that right?

Is there a way where I can out comment a piece of code for the
IDE/de{*filter*} but still use it in my program when I run the program?

Here is the code from the Dictionary.Initialize:

Public Sub Initialize(ByRef mclsDb As clsDatabase, ByVal Username As
String)
        Try
            mDicclsDataBase = mclsDb
            InitLangTag(Username)

        Catch e As Exception
        Throw New clsException(" Something", e)
        End Try
End Sub

Private Sub InitLangTag(ByVal pUserName As String)
        Dim mLangTag As Object

        mLangTag = mclsDataRead.Read("SELECT APPLANGUAGE FROM SECURITY
WHERE USERNAME ='" + pUserName + "'")
        If Not mLangTag Is Nothing Then
            If mLangTag(0).ToString = "" Then
                mLanguageTag = "Original"
            Else
                mLanguageTag = mLangTag(0).ToString.ToUpper
            End If
        Else
            mLanguageTag = "Original"
        End If
End Sub

Thanks
Tim P



Tue, 01 Feb 2005 17:10:52 GMT  
 Help with Inherits in forms. NOW I REALY NEED HELP

Tim,

Did you ever solve this problem?

I have a Visual Studio.NET project called MyProject. A form called
frmDerived inherits from another form called frmBase. All code is
written in VB.NET. The application runs fine, and I can load the code
window for the derived form. But when I try to view the form in the
Designer, I get this error:-

An error occurred while loading the document. Fix the error, and then
try loading the document again. The error message follows:

An exception occurred while trying to create an instance of
MyProject.frmBase. The exception was "Constructor on type
MyProject.frmBase not found."

Any help would be much appreciated!

Cheers,
Conor.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 15 Feb 2005 23:35:08 GMT  
 Help with Inherits in forms. NOW I REALY NEED HELP
Hi

Sorry about the late replay.

Yes I fund something that looks like a solution.

It seems like the IDE design viewer pre-compiles the code and it finds an
error and try to tell you that you have an error, but the error message
isn't to any help.

But I fund that when I tried to out comment some of the code in the mother
form, the error disappeared, you have to do this to find the error.
To see if the error is gone, you have to first out comment then rebuild the
project and then restart you IDE or the solution I am not sure, but you
have to restart the project, then the error disappears.

I found that my error manly was about using some object without checking
them for "not nothing", I can show you, the out commented lines in this
piece of code is the lines that I added to get write of the error.

 If TwoOrHigherColumnRecords Is Nothing Then
   'If Not OneColumnRecords Is Nothing Then
      If OneColumnRecords.Length = 0 Then
         Return Nothing
      Else
         Return OneColumnRecords
      End If
   'End If
  Else
   'If Not TwoOrHigherColumnRecords Is Nothing Then
      If TwoOrHigherColumnRecords.Length = 0 Then
         Return Nothing
      Else
         Return TwoOrHigherColumnRecords
      End If
   'End If
 End If

This is not the best think about the .Net IDE.
Hope that help you with your problem.

Regards
Tim Pedersen




Sun, 06 Mar 2005 19:59:06 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. * * * URGENT I realy need you help * * *

2. Need help on how to inherit a TreeNodeCollection....

3. REALY STUPID QUESTION PLEASE HELP

4. I REALY NEEED HELP !!!

5. custom form control: Cannot view design view of forms that inherit this form

6. HELP!! Student needs help with module/form error

7. help, help, help...I'm begging here :-\ RE RE POST simple code help needed

8. help,help,help,help,help,help,help,help,help,help,help,help,help,

9. HELP HELP HELP, Need help, in IE Control

10. Add Inherited Form - not all existing forms shown

11. Inherits - Whats the difference between Form.Textbox and Form.TextboxBase

12. i can't open a inherited form with form editor (beta 2)

 

 
Powered by phpBB® Forum Software