| | |
multiform windows appliction in VB . NET
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2003
Posts: 26
Reputation:
Solved Threads: 0
I'm trying to build a windows app with multiple forms. in project explorer i'm right clicking the current project, add->add existing item. then I select a form, but now the project won't build. I get these errors:
'Form1' is ambiguous in the namespace 'WindowsApplication1'.
'Sub Main' was not found in 'WindowsApplication1.Form1'.
Resources 'Form1.resx' and 'MathCalculator.resx' have the same manifest resource name 'WindowsApplication1.Form1.resources'.
am I not adding forms to my project correctly?
'Form1' is ambiguous in the namespace 'WindowsApplication1'.
'Sub Main' was not found in 'WindowsApplication1.Form1'.
Resources 'Form1.resx' and 'MathCalculator.resx' have the same manifest resource name 'WindowsApplication1.Form1.resources'.
am I not adding forms to my project correctly?
Your problem is that the form you are adding is named "Form1" and you already have a form named "Form1".
Change the class definition for one of the forums to "Form2" or anything else you would like.
To open a form from a button on another form, this is the code:
I'm pretty sure the above is right.. I'm spending to much time on ASP.NET Development, and C# Windows Form development ::blushes::
Change the class definition for one of the forums to "Form2" or anything else you would like.
To open a form from a button on another form, this is the code:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
'Assuming that the form you want to call is named Form2 Dim a as new Form2 a.Show()
I'm pretty sure the above is right.. I'm spending to much time on ASP.NET Development, and C# Windows Form development ::blushes::
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
When you rename the form, you also need to change the class name in the .vb file.
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
Similar Threads
- Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\... (ASP.NET)
- About Windows Forms C# .net 2003 (C#)
- 3 month trial/unlimited domains - Reliable Windows ASP.NET & Linux (Web Hosting Deals)
- Need Reseller Windows .Net Plan (Web Hosting Deals)
- $1.66/mo - Windows (with ASP.net 2)/Linux Shared Hosting (Web Hosting Deals)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: DOS "ROUTE" command
- Next Thread: adding totals in listboxes
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





