Click here to Skip to main content
16,005,141 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Avoiding "using namespace" Pin
zaccheus10-Oct-06 13:10
zaccheus10-Oct-06 13:10 
AnswerRe: Avoiding "using namespace" Pin
George L. Jackson9-Oct-06 23:49
George L. Jackson9-Oct-06 23:49 
GeneralRe: Avoiding "using namespace" Pin
zaccheus10-Oct-06 8:08
zaccheus10-Oct-06 8:08 
Questionnewbie question Pin
ddpn428-Oct-06 17:28
ddpn428-Oct-06 17:28 
AnswerRe: newbie question Pin
bankai1238-Oct-06 18:08
bankai1238-Oct-06 18:08 
GeneralRe: newbie question Pin
ddpn429-Oct-06 4:25
ddpn429-Oct-06 4:25 
QuestionTranslate from C# some code. Pin
Tomas7-Oct-06 7:48
Tomas7-Oct-06 7:48 
AnswerRe: Translate from C# some code. Pin
Dave Doknjas7-Oct-06 13:56
Dave Doknjas7-Oct-06 13:56 
You might be interested in trying out the demo of our Instant C++ C# to C++/CLI converter. It produced the following for your sample (you may have one or two tweaks to do - let me know how it works for you):

private:
Form ^mParentForm;

public:
[Browsable(false)]
property Form ^Form
{
Form ^get()
{
if (this->mParentForm == nullptr)
{
if (this->Site->DesignMode)
{
IDesignerHost ^dh = safe_cast<idesignerhost^>(this->GetService(IDesignerHost::typeid));
if (dh != nullptr)
{
System::Object ^obj = dh->RootComponent;
if (obj != nullptr)
{
this->mParentForm = safe_cast<form^>(obj);
}
}
}
}
return this->mParentForm;
}
void set(Form ^value)
{
if (this->mParentForm != nullptr)
return;
if (value != nullptr)
{
this->mParentForm = value;

// subscribe to parent form's events
mParentForm->Closing += gcnew System::ComponentModel::CancelEventHandler(this, &OnClosing);
mParentForm->Resize += gcnew System::EventHandler(this, &OnResize);
mParentForm->Move += gcnew System::EventHandler(this, &OnMove);
mParentForm->Load += gcnew System::EventHandler(this, &OnLoad);

// get initial width and height in case form is never resized
mWindowInfo->Width = mParentForm->Width;
mWindowInfo->Height = mParentForm->Height;
this->mRegistryPath = "Software\\" + this->mParentForm->CompanyName + "\\" + System::Reflection::Assembly::GetEntryAssembly()->GetName()->Name;
this->mXMLFilePath = System::IO::Directory::GetParent(System::Reflection::Assembly::GetExecutingAssembly()->Location)->ToString() + "\\WindowStateInfo.xml";
this->mWindowStateInfo_DR = mWindowState_DS::WindowStateInfo::NewRow();
}
}
}


David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: VB to Python converter

QuestionPopup blockers Pin
ArvindMaadam7-Oct-06 1:53
ArvindMaadam7-Oct-06 1:53 
AnswerRe: Popup blockers Pin
hexorandor9-Oct-06 0:31
hexorandor9-Oct-06 0:31 
GeneralRe: Popup blockers Pin
ArvindMaadam9-Oct-06 2:05
ArvindMaadam9-Oct-06 2:05 
QuestionURGENT HELP Pin
bakararshad6-Oct-06 7:52
bakararshad6-Oct-06 7:52 
AnswerRe: URGENT HELP Pin
led mike6-Oct-06 8:46
led mike6-Oct-06 8:46 
GeneralRe: URGENT HELP Pin
George L. Jackson6-Oct-06 11:09
George L. Jackson6-Oct-06 11:09 
AnswerRe: URGENT HELP Pin
hexorandor6-Oct-06 11:16
hexorandor6-Oct-06 11:16 
AnswerRe: URGENT HELP Pin
George L. Jackson6-Oct-06 11:20
George L. Jackson6-Oct-06 11:20 
AnswerRe: URGENT HELP Pin
Christian Graus8-Oct-06 9:04
protectorChristian Graus8-Oct-06 9:04 
QuestionPaste does not work [modified] Pin
Dinka6-Oct-06 6:58
Dinka6-Oct-06 6:58 
QuestionGUIDs Pin
Julian Goldsmith5-Oct-06 8:03
Julian Goldsmith5-Oct-06 8:03 
QuestionRewrite this function pointer Pin
bankai1234-Oct-06 20:57
bankai1234-Oct-06 20:57 
AnswerRe: Rewrite this function pointer Pin
User 5838524-Oct-06 21:26
User 5838524-Oct-06 21:26 
QuestionCOM object that has been separated from the underlying RCW can not be used Pin
lafleon4-Oct-06 14:13
lafleon4-Oct-06 14:13 
QuestionOrganization of .cpp and header files. [modified] Pin
bankai1233-Oct-06 13:51
bankai1233-Oct-06 13:51 
AnswerRe: Organization of .cpp and header files. Pin
User 5838523-Oct-06 20:20
User 5838523-Oct-06 20:20 
QuestionChange to /clr option Pin
Epi3-Oct-06 3:27
Epi3-Oct-06 3:27 

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.