| View previous topic :: View next topic |
| Author |
Message |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Thu Mar 06, 2008 12:03 am Post subject: [C++]Using C# GUI? |
|
|
I've seen people doing that.
And how can I check if a button was pressed on my C# form? |
|
| Back to top |
|
 |
Henley Grandmaster Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 671
|
Posted: Thu Mar 06, 2008 12:20 am Post subject: |
|
|
| Uhh so in your C++ code you wanna know when the button in your C# GUI is pressed? |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Thu Mar 06, 2008 12:26 am Post subject: |
|
|
| I want to use my C# GUI, and I asked how can I know when a button is pressed on my C# form which I wanna use in C++, so in the C++ application, how can I know when a button was pressed on the C# form? |
|
| Back to top |
|
 |
Ridor Newbie cheater
Reputation: 0
Joined: 28 Feb 2008 Posts: 14
|
Posted: Thu Mar 06, 2008 12:35 am Post subject: |
|
|
| What you probally saw was people using C++ .NET. The managed version of C++ where you get the form designer and everything. |
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Thu Mar 06, 2008 1:04 am Post subject: |
|
|
| Ridor wrote: | | What you probally saw was people using C++ .NET. The managed version of C++ where you get the form designer and everything. |
Microsoft Visual C++. Download from Microsoft DL center. _________________
Blog
| Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Thu Mar 06, 2008 1:05 am Post subject: |
|
|
No, it wasn't... I saw a source code, long ago, (which I deleted...) that used a delphi form and functions...
I wanna do that but with C# form.
And I don't want C++.NET...  |
|
| Back to top |
|
 |
AlienX-P Advanced Cheater
Reputation: 0
Joined: 31 Jan 2008 Posts: 52
|
Posted: Thu Mar 06, 2008 3:53 am Post subject: |
|
|
Code a DLL in C++ and call it in C#?
Not sure what you're really asking about.. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Mar 06, 2008 5:49 am Post subject: |
|
|
| The dll is prolly the best idea because you have to get the C++ code inside the C# process. unless you pipe it, but im not familiar with piping in C#. Look into it and see if you can do it? |
|
| Back to top |
|
 |
killersamurai Expert Cheater
Reputation: 0
Joined: 10 Sep 2007 Posts: 197 Location: Colorado
|
Posted: Thu Mar 06, 2008 10:36 am Post subject: |
|
|
| Here is how to do it between two c++ programs. All you have to do is translate it to c# for the sending part. |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Thu Mar 06, 2008 11:40 am Post subject: |
|
|
| killersamurai wrote: | | Here is how to do it between two c++ programs. All you have to do is translate it to c# for the sending part. |
Not exacly what I meant but I guess it can be used for the same purpose.
Thanks. |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Thu Mar 06, 2008 3:23 pm Post subject: |
|
|
Make your C# application ComVisible (I think it's something like [AttributeComVisible] or something--Google it), then do something like:
| Code: |
App: Load DLL into its memory or something
DLL: Entry Point: call C# application with init, and have it pass in a callback, which you can add to the button click. |
I think it would probably be easiest though, to just use a dll import, and call the dll method on your button click event in C#. _________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Thu Mar 06, 2008 3:36 pm Post subject: |
|
|
| samuri25404 wrote: | Make your C# application ComVisible (I think it's something like [AttributeComVisible] or something--Google it), then do something like:
| Code: |
App: Load DLL into its memory or something
DLL: Entry Point: call C# application with init, and have it pass in a callback, which you can add to the button click. |
I think it would probably be easiest though, to just use a dll import, and call the dll method on your button click event in C#. |
But its a DLL I want to inject into a process, not import and call functions from it...  |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Thu Mar 06, 2008 5:02 pm Post subject: |
|
|
Piping would probably be best, then. _________________
|
|
| Back to top |
|
 |
|