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?
7 2220
Where did you change the initial startup form?
There should be something to the effect of: -
Application.Run(new Form1());
-
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.
vanc 211
Expert 100+
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.
Where did you change the initial startup form?
There should be something to the effect of: -
Application.Run(new Form1());
-
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.
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?
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.
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?
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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)...
|
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...
|
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...
|
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...
|
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....
|
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
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |