|
Please don't cross-post. Posting your question in the appropriate forum is sufficient.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Why you asked this question again on this forum?
|
|
|
|
|
|
Hi, I am using Visual Studio 2005 C++/CLI. I posted this before with no responses so maybe no one knows. I want to use an existing Form from another project (I don't want to recreate the 50 controls on the Form). I can include the Form into my project but if I then try to modify the Form from the Solution Explorer by right clicking on the form name and selecting 'View Designer', I can't because this option is not available to me like it is with the Forms that I created in this project. Can Forms AND their design views be copied from one project to another?
Thanks
Buck
|
|
|
|
|
What you are talking about may be possible but it might be better asked in a Visual Studio forum since your question deals more with a VS feature. IMHO, the relationship between C++/CLI and the View Designer can be broken with little effort.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks for the reply, I will check that out.
Buck
|
|
|
|
|
Hi Buck,
I see two approaches that should work:
if the form you want to copy is the only form in its project (or constitutes the majority of
the existing project), I would use Windows Explorer and duplicate the entire folder containing
project, source files, and resources; then choose a new folder name and open the copied
project, modifying what needs to be changed, and adding what you want to add.
if the form you want to copy is to become something other than the main form of an
existing project, I would simply copy all the related files (myform.cs, myform.Designer.cs,
myform.resx) to the new projects folder, then add these "existing items" to the project,
then modify what needs to be modified.
Whatever approach you choose, if you want to rename the form's class and/or the form's
file name(s), I would do it using Visual, not in Explorer nor by editing the project files.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc,
Luc Pattyn wrote: would simply copy all the related files (myform.cs, myform.Designer.cs,
myform.resx) to the new projects folder
You must have C# on your mind!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Sure, but then I figure C++ can't be lagging that much
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
The designers in C++/CLI are one or more version behind C#. In .NET 1.0, there was no Windows Forms Designer. If you change the name of the form's class without making other manual changes, the designer will cease to work.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi George,
I was not aware of that, but then I don't use C++ very much.
Thanks for the info.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
BuckBrown wrote: I don't want to recreate the 50 controls on the Form
Perhaps you shouldn't develop a form with 50 controls on it?
|
|
|
|
|
how do a person run an outside exe(application) inside a C++ form?
like making is a child thread of that form?
thanks in advance
|
|
|
|
|
I use System::Diagnostics::ProcessStartInfo. Ex below
<code>Diagnostics::ProcessStartInfo ^pInfo;
if ( String::IsNullOrEmpty(SoundString) == false )
{
if ( System::IO::File::Exists(SoundString) == true )
{
pInfo = gcnew Diagnostics::ProcessStartInfo();
pInfo->Verb = "play";
pInfo->FileName = SoundString;
pInfo->CreateNoWindow = true;
pInfo->UseShellExecute = false;
Diagnostics::Process::Start(pInfo);
}
else
LogDebugInfo(String::Format(L"SoundString file {0} does not exists", SoundString));
}
else
{
LogDebugInfo(L"SoundString string was empty");
} </code>
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
i need a project on c++. can somebody suggest me a web site from where i can avail a good one.
|
|
|
|
|
|
|
boost !
http://www.boost.org
|
|
|
|
|
I am trying to learn C++. I am trying to write a program that will allow a 5 digit number to be input and then print the digits seperated by three spaces. I have the following, but when I try to compille it I am getting an error. I would defenitely appreciate any help.
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main();
{
a = number1 / g%;
b = a / g%;
c = b/ g%;
d= c/ g%;
e = d/g;
g = 10
cout << "Enter a five digit number : ";
cin >> number 1;
cout << "a b c d e" << endl;
system("PAUSE");
return 0;
}
keep getting the following errors, when trying to compile the program
How would I fix this?
expected ';' unqualified-id before ‘{‘ token
expected ’;’ or ‘;’ before ‘{‘ token
jada 23
|
|
|
|
|
Hi,
error messages normally contain line numbers, and Visual and other IDEs are capable of
displaying line numbers in the left margin, so how hard can it be?
seems like you add and forget to add semi-colons...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Seems tough if you have never written a progrma before.
the line error is for line 8.
I am wating to understandd why I am getting the error.
jada 23
|
|
|
|
|
By the time you posted this, I had explained it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is the managed C++ forum, the visual C++ forum was the right place for this question. You may think I'm a Nazi for saying so, truth is, a lot more people will see your question ( and therefore can help you ) if you post in the right place.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
jada0923 wrote: int main();
Oh, and you didn't forget a ;. the ; in this line is in error. It means you're announcing your intent to write a main method, elsewhere, and everything that follows is therefore a method without a name, which is the error.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|