|
-
Nov 21st, 2002, 01:27 PM
#1
Thread Starter
Lively Member
linking forms togther
ALright, I need to know step by step how to link a button or anything to another forum. like when they click the " options " on the drop down menu it would open up frmoptions....so how do i do that step by step in .net?
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 01:42 PM
#2
Put this in the click event of the menu or button you need it in (or whereever)
VB Code:
dim frm as New frmOptions
frm.ShowDialog()
-
Nov 21st, 2002, 01:46 PM
#3
Thread Starter
Lively Member
how do i define it? cuz its givin me a compile error.
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 01:49 PM
#4
Make sure that the form is really called frmOptions?
On the form at the top where it says:
Public Class Form1
it should say:
Public Class frmOptions
If you change it then you will get an error in the autogenerated code too because there is one spot in there that you will need to change Form1 to frmOptions also. Or you could search and change it.
-
Nov 21st, 2002, 02:00 PM
#5
Thread Starter
Lively Member
this is what it says..look at the pic..
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 02:09 PM
#6
Originally posted by Edneeis
Make sure that the form is really called frmOptions?
On the form at the top where it says:
Public Class Form2
it should say:
Public Class frmOptions
If you change it then you will get an error in the autogenerated code too because there is one spot in there that you will need to change Form1 to frmOptions also. Or you could search and change it.
You see at the top of the picture in the code window it says 'Public Class Form1' well go to the Options form and make sure it says 'Public Class frmOptions' in that one.
-
Nov 21st, 2002, 02:13 PM
#7
Thread Starter
Lively Member
k they should be all named correctly now, but i get a compile error when i put it what u typed b4.
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 02:17 PM
#8
Did you search in the auto generated code for another reference that has to be changed to frmOptions?
-
Nov 21st, 2002, 02:22 PM
#9
Thread Starter
Lively Member
this is the only frmoption that there was....
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 02:47 PM
#10
I think you have to check 'Search Hidden Text' for it to search the collapsed regions. But there is onw spot in the in the 'Windows Form Designer generated code'.
Also make if you rename your startup form that you reset the startup object in the Project properties.
-
Nov 21st, 2002, 02:54 PM
#11
Thread Starter
Lively Member
here i found 2 more that were named frmoptions.
To get somthing out of life, you always need to be persistant.
-
Nov 21st, 2002, 03:32 PM
#12
Actually you should be searching for whatever it was called before you changed it to frmOptions. You need to change it TO frmOptions so it isn't currently named frmOptions.
-
Nov 21st, 2002, 10:54 PM
#13
Lively Member
Originally posted by johnsx2002
With this error i think that you have your startup object set to submain, instead of frmmain.
To change/check this, right click on your project (in solution explorer) and choose properties.
There is a combo box with you startup object selected. Make sure this is set to frmmain
Hope that helps
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
|