|
You could pass the instance of the form1 to form2 via the constructor and that would allow you to do objform1::Show() inside form2.
Or
You could use the singleton pattern to get the instance of the form object and do a ::Show() ::Hide()
|
|
|
|
|
Debun wrote: Form2::Hide();
Form1::Show();
You're hoping those methods are static, and they are not.
The easiest way to do this, is to make your three forms user controls, and hide/show them within the one form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I also have exactly the same problem, how do I create the user controls?
I am using visual c++ 2005 express.
I'm using form1 as mdicontainer.
The other suggestion doesn't work for me: I can't do #include "Form1.h" in the form2 header, it gives a lot of errors doing that.
Because of this, I can't pass "this" pointer of form1 to form2.
modified 9-Dec-22 14:04pm.
|
|
|
|
|
|
I am working on a IM client,I want a rich text box which supports fonts and emoticons for my chat window,Somebody please suggest me a third party control for .NET windows application(free or purchased both will do) which can solve my problem or else suggest me a way to do it programatically in winforms.
Zeeshan
|
|
|
|
|
using browser control is fairly decent idea
|
|
|
|
|
I have a list box in which random records are selected. I want to delete the selected records from list box when the user right clicks on the selected records.
|
|
|
|
|
you can check which mouse button did the user click in the mouseDown event of the ListBox, if its right mouse button, remove the selected items in the list.
Blumen
|
|
|
|
|
Hello,
I have a simple form with a textbox on it. I created a pointer to this textbox and passed it on to another subroutine in another class where I do my main stuff. Strange enough, when I ask to display something on my form with pointer->selected text="...". It is not diplayed until the fast code that immediately follows this statement is completely executed. This has the consequence that instead of having a real time like report on my display of what's going on, the display displays all the messages at once when all is finished in the routine.
Anyone an idea, how I can force the display to refresh immediately when asked ? Instead of staying blank up to the end of the subroutine.
|
|
|
|
|
Can you please explore on DoEvents() Functionality?
Regards,
Arun Kumar.A
|
|
|
|
|
can i create a c# application that being a services used in my pc any time.
etretyertyery
|
|
|
|
|
yes u can u have to use project type -- windows service. and if necessary installer class
|
|
|
|
|
hello
plz sybrata.jana can u read the dcom question and answer me . there are a complementary questions
bye
regards
etretyertyery
|
|
|
|
|
hello
can anybody give a small example of how to use the dcom
the example:
a client connect to a database threw a server
so we have an application in the server that permit to the client to connect to the database
plz i need that very much
regards
etretyertyery
|
|
|
|
|
U should have knowledge of remoting. Once a class is running in the server . U can create a instance of that object in ur client throw remoting then use it how ever u want. Knowledge of reflection is added benefit.
Pls get an idea from this.
http://blogs.msdn.com/adioltean/archive/2004/06/18/159479.aspx
|
|
|
|
|
hi
thanks very much for ur help, but there is a very difficult to me to do that, so in a sample question: can u send me the conception of a client that wanna to connect to an sql database threw a server (it is an application in the server that permit the connection to the database)
plz tell me what kind off application should i use in the server, what this application should return to the client application (is it an xml file).
again thanks very much,regards.
bye
etretyertyery
|
|
|
|
|
i have two text box on window form
both have code on validated event
it work well.
But when user open form & directly press close button then
this validated event call i want to pevent this thibg
any body have any idea please reply
|
|
|
|
|
Set CauseValidation property of the "Close" Button to False
Tirtha
Miles to go before I sleep
|
|
|
|
|
Hello ,
I have three forms FOrm1 , Form2, Form3 , i want to be able to go back to previous forms from current form .
I have called Form1 using Form1->show(); method from Form2, i get error messages stating form1 is an undeclared identifier. If i try to include form1 on form2 , i get series of errors .
I'm using the VC++ 2005 can someone help with this?
de
|
|
|
|
|
Hi,
If you are referring to Windows Forms, you have to create an object of the form before calling it.
Example: Create an object of Form1 in Form2 and call objForm1.Show();
But you will get a new instance of that form. If you want to go back and forth like in a web browser, you got to use usercontrols. Just use one form, and load the other forms inside this form. For this you need to have a master form and make usercontrols for other forms. There is a UserControl Class available in .NET controls, you can find it when you try to add a new component from with in a Project.
Regards,
Blumen
|
|
|
|
|
I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances.
Any ideas?
|
|
|
|
|
I am not sure it is a great idea, but you can do keystrokes with the SendKeys. I think a better solution would be when you want to call the same method if you can see the event that is getting called I would try to call it. Or if there is a button that can be clicked you can always do button.PerformClick()
Hope that helps.
Ben
|
|
|
|
|
I’m working in a big MFC application. I now have Several Forms to add into this application. The original developer says there is no reason to stick with MFC. So I need to convert this MFC application. I’m looking for websites and/or books on converting. Both the old and new application will need to be written in C++.
Any advice would help.
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
earlgraham wrote: new application will need to be written in C++
How come?
|
|
|
|
|
Hello
how can drag a row from a datagrid and drop it into a panel
plz help me
regards
etretyertyery
|
|
|
|