473,799 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changes To Visual Studio 2005 Forms/Project Not Reflected at Runtime

22 New Member
I have a Visual Studio 2005 C# Windows application. I suddenly realized that when i changed the startup object to another form, the initial startup form would still be first to appear on running the application. I thought i would look at it later and opened a different C# solution that i am also working on. On this one, I made some changes to a form by placing controls on it. But the controls dont appear at runtime, although their visible property is correctly set to true. I try to set some breakpoints in code, but both solutions don't appear to recognize them. However, when i create a new solution, everything seems fine. Any ideas?
Dec 4 '07 #1
7 2250
Plater
7,872 Recognized Expert Expert
Where did you change the initial startup form?
There should be something to the effect of:
Expand|Select|Wrap|Line Numbers
  1. Application.Run(new Form1());
  2.  
in the main() function.

You would need to change that line to change what form is loaded at startup.

Also, if ANY copies of the program are open (or "stuck" open, check your taskmanager) it will not actually finish BUILDing and your changes won't show up when you tell it to "run", you'll just have another copy of the old build running.
Dec 4 '07 #2
vanc
211 Recognized Expert New Member
I have a Visual Studio 2005 C# Windows application. I suddenly realized that when i changed the startup object to another form, the initial startup form would still be first to appear on running the application. I thought i would look at it later and opened a different C# solution that i am also working on. On this one, I made some changes to a form by placing controls on it. But the controls dont appear at runtime, although their visible property is correctly set to true. I try to set some breakpoints in code, but both solutions don't appear to recognize them. However, when i create a new solution, everything seems fine. Any ideas?
As Plater said, you should look at program.cs and change for initial form if you have only one project. The startup object is for another project in your solution.
Cheers.
Dec 4 '07 #3
gkinu
22 New Member
Where did you change the initial startup form?
There should be something to the effect of:
Expand|Select|Wrap|Line Numbers
  1. Application.Run(new Form1());
  2.  
in the main() function.

You would need to change that line to change what form is loaded at startup.

Also, if ANY copies of the program are open (or "stuck" open, check your taskmanager) it will not actually finish BUILDing and your changes won't show up when you tell it to "run", you'll just have another copy of the old build running.
Thanks for your reply. I had actually checked the main() function. No problem there. I even restarted the IDE and the Laptop to no avail. Its now the second day and I have been forced to create another solution and imported the files. Everything works ok now, bugt I don't know for how long.
Dec 6 '07 #4
Plater
7,872 Recognized Expert Expert
Perhaps you could post some of the offending code?

And have you looked in taskmanager to see if any copies of the program are still running?
Dec 6 '07 #5
gkinu
22 New Member
Perhaps you could post some of the offending code?

And have you looked in taskmanager to see if any copies of the program are still running?

There is no code in particular. Remember the problem is not only startup form, but even any changes i make is not reflected when i run the application e.g. I place new controls on the form, they wont be seen even though visible is set to true. When i place breakpoints in the code, its like they are not recognized.
Dec 10 '07 #6
Plater
7,872 Recognized Expert Expert
When you run in debug mode, do your breakpoints stay solid red or go hollow circles?
Are you sure you are calling the right objects? And don't have multiple forms named "Form1" or something?
Dec 10 '07 #7
gkinu
22 New Member
When you run in debug mode, do your breakpoints stay solid red or go hollow circles?
Are you sure you are calling the right objects? And don't have multiple forms named "Form1" or something?
There is only one Form1. Breakpoints stay solid red.

Anyway, i recreated a new solution and imported all the forms and other classes. Its working now, but old one still does not. So I would still be very intrerested to know what could have happened. And remember it also affected another completely different solution the same way!

Thanks very much for your help.
Dec 11 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1832
by: Victor S. | last post by:
1. What is System.Windows.Forms.VisualStyles.TextMetricsCharacterSet good for? 2. Are the Indic scripts supported? Are all supported scripts fully supported? (for printing and fine measuring) Is the printing done by GDI++ without using Unicribe? 3. Is the Text.Encoder/Decoder provided by the OS or by the Framework?
0
1529
by: Dr. Zharkov | last post by:
Hello. To see the graphics of technology DirectX 9.0 SDK Update - June 2005 in project Visual Basic, WindowsApplication1 from Visual Studio 2005 Beta 1, in file My Project, MyApplication.vb in a method: <Global.System.Diagnostics.DebuggerStepThrough()> _ Protected Overrides Sub OnCreateMainForm()
4
2396
by: Skc | last post by:
We have a developer who has made an application in Visual Studio 2003 and this will not work in our version of Visual Studio 2002. Error message: Solution file loading error: The selected file is not a valid Visual Studio Solution file. When we try to load a project file, we get: Unable to read the project file. The project was created with a newer
9
7703
by: slimicus | last post by:
The IDE crashes about every 10-20 minutes for me.. its been doing this ever since I started this project (The project was a 2003 project but I recreated it in 2005) When it crashes, its usually after I close the app I'm testing.. lets say I'm debugging the app, and I get an exception, and I have to stop the execution for whatever reason, after that, next time I try to compile (as in either Build or Build in Run, or even build a setup...
3
2372
by: Tin Gherdanarra | last post by:
A colleague gave me a project where there was a /designer/ window for database connectivity (drag&drop from the toolbox), but I can't find out how to get a /designer/ window in my own project. Shift-F7 does not work. What do I have to do in order to get a /designer/ window? Thanks Tin
8
6275
by: WT | last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the OnInit code ? No chance to fire it as OnPreInit is run befor OnInit. ??? CS
1
1602
by: John Kotuby | last post by:
Hi all, I have experienced several problems after installing SP1 for Visual Studio 2005 Professional. The problems are occurring on 2 different Windows XP SP2 development machines that have been serviced packed. I am working on an ASP.NET 2.0 Web Application in Visual Basic. 1. Publicly declared user controls on the Master page are no longer being recognized by Intellisense. Webforms that were created before SP1 are still working fine...
1
3602
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in some files and work on it. Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer, connected to websiteOrder.sln located in Visual Source Safe 6.0(source safe located in another...
6
2601
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, If I am using Visual Studio 2005 to build a C# Class Library (COM), it is as default dependent on .Net Runtime Framework 2.0 when running? If I am using Visual Studio 2003 to build a C# Class Library (COM), it is as default dependent on .Net Runtime Framework 1.1 when running? How to check the .Net Framework Runtime dependencies when using Visual Studio?
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10475
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.