Hello! As a student of Computer Science, I am not new to C++ and I also have done fair bit of programming in csharp and Visual Basic. But at this time I am finding it really hard working on windows form application in visual c++. I am currently using Microsoft Visual Studios 2008. I am really ashamed not to able to show even a form if I click on Botton present in Form1. I tried to work my way up by looking at the sample application but I was buzzed. So please Help me to make a simple program. I have posted below a sample project please evaluate it........I want to show up second Form If I click on the button.
Last edited by rocky_upadhaya; January 16th, 2010 at 10:48 AM.
I don't have anything on my PC that will open .rar files but the fact that you're mentioning forms suggest you're probably in the wrong forum. If you're using .net, you need to go to the managed C++ forum.
Hello! As a student of Computer Engineering, I am not new to C++ and I also have done fair bit of programming in csharp and Visual Basic. But at this time I am finding it really hard working on windows form application in visual c++. I am currently using Microsoft Visual Studios 2008. I am really ashamed not to able to show even a form if I click on Botton present in Form1. I tried to work my way up by looking at the sample application but I was buzzed. So please Help me to make a simple program. I have posted below a sample project please evaluate it........I want to show up second Form If I click on the button.
Last edited by rocky_upadhaya; February 11th, 2010 at 06:29 AM.
rename your Home form to Form1 first or rename all other currances of Form1 to Home (it's not c# and it won't be renamed automaitcally)
add #include "PostFix.h" in Form1.h
add using namespace Stack; below the last #include (because it's a different namespace form Stack1)
add ^ before frmNewItem because it's a reference type
replace new PostFix(); with gcnew PostFix(); because it's a managed code
a fixed version of your project attached
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
please say what changes i required to make it run?? I'm all confused....is working on visual C++ is far harder than C# or java? I know Intermidiate level of understanding of syntax of C++ but only on console level...
please say what changes i required to make it run?? I'm all confused
you're kidding me, right? have overlooked my last post where I attached the fixed version? there is a list of changes I made or you'll have to make yourself.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
Yeah! I got your fixed version and thanks for the Help....I was just asking what changes did you make to make the previous version work?? please dont get angry...this complex statements of visual c++ is foolin me too....cheers...
Last edited by rocky_upadhaya; January 16th, 2010 at 11:42 AM.
---
files should have the same name as the class inside. so, you should either rename your Home.h file to Form1.h (because the class is called Form1 or rename all other ocurrances of Form1 to Home (it's not c# and it won't be renamed automaitcally if you change the filename)
---
add #include "PostFix.h" in Form1.h so that the Form1 class is aware of the existence of the PostFix class. (if you need some class that is defined in a different file you always have to include the header file (acually not always but for now it's ok))
---
add using namespace Stack; below the last #include in the Form1.h file (this is like c#, I think you already know that ;]
---
add ^ before frmNewItem because it's a reference type
---
replace new PostFix(); with gcnew PostFix(); because it's a managed code (new is for unmanaged, native classes)
these are all changes I made. hope this helps.
Last edited by memeloo; January 16th, 2010 at 11:54 AM.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.