|
-
Jun 12th, 2004, 11:11 PM
#1
Thread Starter
Junior Member
"Form Main"... eh?
OK - gotta question - can someone help?
I have a program with two forms. One form is the startup form, and the other is accessed when I press a button. I get a build error, and it seems that I'm missing the words "form main" somewhere in the first form. Anyone know where I need to enter that?
Ian
-
Jun 13th, 2004, 03:15 AM
#2
Hyperactive Member
Dear Ian, probably because of my poor english, I can't understand which is the problem. Probably if it were happened to me, I could recognize it immediately, but I never saw that behaviour...so I must investigate to solve it.
It's possible someone could recognize it and help you, but if it's not so, than post your code and, if possible, the exact text of the error message. The code you have to post, is not the entire application, obviously, but where Forms are declared and instanciated. Good job
Live long and prosper (Mr. Spock)
-
Jun 13th, 2004, 06:34 AM
#3
PowerPoster
Re: "Form Main"... eh?
Originally posted by Ian McKenzie
OK - gotta question - can someone help?
I have a program with two forms. One form is the startup form, and the other is accessed when I press a button. I get a build error, and it seems that I'm missing the words "form main" somewhere in the first form. Anyone know where I need to enter that?
Ian
I'll take a guess.
Assume your forms are named fclsStartup and fclsMain
in the button click event put
Dim frmMain as new fclsMain
frmMain.ShowDialog()
Try it. Depending on what you are doing, this may need amending, but it should work OK.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jun 13th, 2004, 02:54 PM
#4
Thread Starter
Junior Member
"Form Main" file
Thanks for the suggestion - it worked in a strange way... it caused me to look at what I had called the new form - I had changed the name of the form without altering the code. So my coding was fine except it referred to a nonexistent form.
Doh!
I'm really impressed and grateful that guys like you are out there.
Thanks again.
Ian
-
Jun 13th, 2004, 08:51 PM
#5
Lively Member
call it as the class... let us say you renam form2 to xxxform. the class still says
VB Code:
public class form1
.
.
.
end class
you should still say
VB Code:
dim f as new form2() 'class name
f.show
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|