Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
AnswerRe: Changing data in DataTable does not update bound DataGridView Pin
alyeasad8-Jun-06 1:49
alyeasad8-Jun-06 1:49 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
iswoolley8-Jun-06 2:02
iswoolley8-Jun-06 2:02 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
PyroManiak8-Jun-06 7:52
PyroManiak8-Jun-06 7:52 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
iswoolley8-Jun-06 22:26
iswoolley8-Jun-06 22:26 
Questionusing C# code in VC++(MFC) application Pin
Shailesh Ha8-Jun-06 1:16
Shailesh Ha8-Jun-06 1:16 
AnswerRe: using C# code in VC++(MFC) application Pin
Jun Du8-Jun-06 7:57
Jun Du8-Jun-06 7:57 
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha12-Jun-06 21:31
Shailesh Ha12-Jun-06 21:31 
AnswerRe: using C# code in VC++(MFC) application Pin
Koushik Biswas8-Jun-06 8:04
Koushik Biswas8-Jun-06 8:04 
It is easier said than done. Firstly, take a look at this article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkcominteroppart2cservertutorial.asp[^].

It will tell you that in order for C++ to call C#, the C# assembly should be written in such a way that C++ can treat it as a COM object.

In your case, you want the UI part to be in C#, and for business logic and processing part you want to continue the C++ MFC code. So the better way is to do the opposite - make the C# call your existing C++ code. Create a new C# project, create your UI, and when it is time to code the business logic, make calls to a C++ DLL. Convert your C++ code to a COM object. Then you can call it directly from your C# application. See here on how to do that:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkCOMInteropPart1CClientTutorial.asp?frame=true[^]

Now if you are too lazy to do COM, and if your C++ MFC code is not really so gigantic, you can consider a re-write. Create a C# project, create your desired flashy cool UI, and type in the business logic part in C# as well. As you have said "I am new to Dot Net" - by doing so you will be 1 step farther from calling yourself "new"...Big Grin | :-D


Koushik Biswas

who else?
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha9-Jun-06 2:06
Shailesh Ha9-Jun-06 2:06 
GeneralRe: using C# code in VC++(MFC) application Pin
Koushik Biswas9-Jun-06 6:25
Koushik Biswas9-Jun-06 6:25 
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha11-Jun-06 19:03
Shailesh Ha11-Jun-06 19:03 
QuestionHTML to PDF Converter Pin
saud_a_k8-Jun-06 1:07
saud_a_k8-Jun-06 1:07 
AnswerRe: HTML to PDF Converter Pin
rfjeld8-Jun-06 1:28
rfjeld8-Jun-06 1:28 
Questionhowto use datagridview footer ? help ??? Pin
cmpeng348-Jun-06 1:01
cmpeng348-Jun-06 1:01 
AnswerRe: howto use datagridview footer ? help ??? Pin
leckey8-Jun-06 5:32
leckey8-Jun-06 5:32 
Questiona question about relational database with c# ? [modified] Pin
cmpeng348-Jun-06 0:52
cmpeng348-Jun-06 0:52 
AnswerRe: a question about relational database with c# ? [modified] Pin
Stephan Samuel8-Jun-06 0:55
Stephan Samuel8-Jun-06 0:55 
AnswerRe: a question about relational database with c# ? [modified] Pin
alyeasad8-Jun-06 2:02
alyeasad8-Jun-06 2:02 
Questioncomparision Pin
Mahmood Ilyas8-Jun-06 0:42
Mahmood Ilyas8-Jun-06 0:42 
AnswerRe: comparision Pin
Stephan Samuel8-Jun-06 0:52
Stephan Samuel8-Jun-06 0:52 
GeneralRe: comparision Pin
Mahmood Ilyas8-Jun-06 1:23
Mahmood Ilyas8-Jun-06 1:23 
Questionsignatures of a file [modified] Pin
Gulfaraz8-Jun-06 0:38
Gulfaraz8-Jun-06 0:38 
AnswerRe: signatures of a file [modified] Pin
Paul Brower8-Jun-06 1:45
Paul Brower8-Jun-06 1:45 
QuestionConnection Error Pin
pirogramci8-Jun-06 0:28
pirogramci8-Jun-06 0:28 
AnswerRe: Connection Error Pin
Stephan Samuel8-Jun-06 0:50
Stephan Samuel8-Jun-06 0:50 

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.