Click here to Skip to main content
15,903,201 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Calling managed function from unmanaged function Pin
N a v a n e e t h10-Sep-09 6:08
N a v a n e e t h10-Sep-09 6:08 
GeneralRe: Calling managed function from unmanaged function [modified] Pin
santoshkaif10-Sep-09 7:21
santoshkaif10-Sep-09 7:21 
GeneralRe: Calling managed function from unmanaged function Pin
N a v a n e e t h10-Sep-09 16:10
N a v a n e e t h10-Sep-09 16:10 
GeneralRe: Calling managed function from unmanaged function Pin
santoshkaif10-Sep-09 18:43
santoshkaif10-Sep-09 18:43 
QuestionRe: Calling managed function from unmanaged function Pin
santoshkaif21-Sep-09 2:20
santoshkaif21-Sep-09 2:20 
AnswerRe: Calling managed function from unmanaged function Pin
N a v a n e e t h22-Sep-09 15:31
N a v a n e e t h22-Sep-09 15:31 
QuestionMultiple Forms in VS2005 Pin
rtshield6-Sep-09 15:17
rtshield6-Sep-09 15:17 
AnswerRe: Multiple Forms in VS2005 Pin
N a v a n e e t h6-Sep-09 15:58
N a v a n e e t h6-Sep-09 15:58 
rtshield wrote:
I'm wondering how do i get the Login form to call methods from the initial (parent) form?


You can make the methods public and when login form is instantiated, pass the parent forms instance to login form via constructor.
if (loginForm == nullptr) {
   loginForm = gcnew Login(this);
   loginForm->Show();
} else {
   loginForm->Activate();
}
Login forms constructor should also be modified to accept a parent forms object.
// forward declaration!
// required to avoid circular dependencies
ref class ParentForm;

ref class LoginForm : public Form
{
private:
    ParentForm^ parentForm = nullptr; // use this object to access parent form's members.
public:
    LoginForm(ParentForm^ p)
         : parentForm(p)
    {
    }
}
You need to forward declare parent form in the header file and include parentform.h in your CPP file to avoid circular dependencies.

Smile | :)


QuestionWeird problem with writing to a label in a form. (VC++ 2008) Pin
alzaeem4-Sep-09 6:55
alzaeem4-Sep-09 6:55 
AnswerRe: Weird problem with writing to a label in a form. (VC++ 2008) Pin
N a v a n e e t h4-Sep-09 18:12
N a v a n e e t h4-Sep-09 18:12 
GeneralRe: Weird problem with writing to a label in a form. (VC++ 2008) Pin
alzaeem5-Sep-09 17:32
alzaeem5-Sep-09 17:32 
AnswerRe: Weird problem with writing to a label in a form. (VC++ 2008) Pin
Luc Pattyn6-Sep-09 1:20
sitebuilderLuc Pattyn6-Sep-09 1:20 
Questionmodify a DLL(binary) to call another DLL function/exe or embed a code...I need some concepts clarification Pin
Member 43963092-Sep-09 21:58
Member 43963092-Sep-09 21:58 
AnswerRe: modify a DLL(binary) to call another DLL function/exe or embed a code...I need some concepts clarification Pin
Richard MacCutchan3-Sep-09 2:24
mveRichard MacCutchan3-Sep-09 2:24 
Questionthe error in managed c++ function call unmanaged c++ function Pin
jetjeankimo2-Sep-09 17:43
jetjeankimo2-Sep-09 17:43 
AnswerRe: the error in managed c++ function call unmanaged c++ function Pin
N a v a n e e t h3-Sep-09 0:00
N a v a n e e t h3-Sep-09 0:00 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
jetjeankimo3-Sep-09 16:12
jetjeankimo3-Sep-09 16:12 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
N a v a n e e t h4-Sep-09 5:59
N a v a n e e t h4-Sep-09 5:59 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
jetjeankimo4-Sep-09 16:31
jetjeankimo4-Sep-09 16:31 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
N a v a n e e t h4-Sep-09 17:51
N a v a n e e t h4-Sep-09 17:51 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
jetjeankimo4-Sep-09 18:21
jetjeankimo4-Sep-09 18:21 
GeneralRe: the error in managed c++ function call unmanaged c++ function Pin
jetjeankimo5-Sep-09 21:33
jetjeankimo5-Sep-09 21:33 
QuestionSpy++ Pin
ant-damage2-Sep-09 2:19
ant-damage2-Sep-09 2:19 
AnswerRe: Spy++ Pin
Randor 2-Sep-09 10:20
professional Randor 2-Sep-09 10:20 
GeneralRe: Spy++ Pin
ant-damage3-Sep-09 4:22
ant-damage3-Sep-09 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.