|
I think it might be depend on the code that you are trying to convert. I don't think all C++ codes can be converted to C# code. Even it is possible, why we need to do that?
However, the question about converting from C++ to C# or Java are too wide and it is difficult to cover about how to covert.
So, wish you all the best!!
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Creamboy wrote: if it is possible to convert c++ code to c#
What is it you want to do? Call C++ code from C#? Or convert your C++ code to C#?
C++ can compile to COM dlls, which can be referenced in your C# app. If you need help compiling C++ to a COM dll, you should ask in the C++ forum.
You can also compile C++ to a C++.NET dll, called C++/CLI. Search for C++/CLI on this site for articles detailing how it's done. You can then use the resulting dll in your C# project.
Creamboy wrote: Also can i do the same for .java files?
Yes, you just have to recompile them using the J# compiler, which compiles your Java code files to a .NET dll or exe.
Another option is to use Mono's IKVM. Read more about that here[^].
|
|
|
|
|
Conversion is possible, but not easy.
We produce "C++ to C# Converter", which will convert a good portion of the C++ code to C#, but you will nearly always have to modify the converted code to get working C# code which is functionally equivalent.
David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Thanx y'all, you've all been very helpful. i'll just compile the C++ code to a COM dll and call it in my C# code.
Merci.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Hello! Let's say that i'm using Word 2007, and i have an add-in with a button. I create a word doc and i save it. Word is still running. How can i find where i saved the doc by pressing the add-in button? Does Visual Studio Office Tools has a solution for this problem?
Thanks a lot!
Any comment it's welcome!
|
|
|
|
|
I am confused You have a add-in written in C# for word 2007, correct?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
yes i have an add-in written in C#. I just want to know if vsto can detect the name of my saved document!
|
|
|
|
|
I am unsure if there is anything "built-in" to do that, but you could easy do that with .NET if there isn't.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
You will save my day if you tell me how to do it with .NET
|
|
|
|
|
Are you saving this file by your Word add-in, or doing it through word? Or does it need to work for either?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I'm saving this file through word
|
|
|
|
|
I don't know much about Addins for Microsoft office, what type of office resources do you have access to? Any access to Events, methods, etc?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I am using office 2007. You said that there is a solution using .NET. You can tell me more about this?
|
|
|
|
|
There isn't a predefined solution for this, but it can be done with .NET. First you have to have access to stuff from MS Word, such as Recent files as suggested below by Colin. If you have access to events and stuff from Word it can be easily done.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
alina_anitei wrote: detect the name
"detect"? what does that mean?
alina_anitei wrote: I just want to know if vsto can
What does the Documentation say?
|
|
|
|
|
it means to find the word document path that i've just created
|
|
|
|
|
alina_anitei wrote: it means to find the word document path that i've just created
And is there nothing in the documentation that tells you how to get at the MRU (Most Recently Used) file list? (I don't know much about the capabilities of Office 2007 integration with .NET, so I'm just trying to get you looking in the right direction so you might be able to see what's there)
|
|
|
|
|
Thanks a lot Colin. I used your advice and i solved my problem.
Here's the code:
using Office = Microsoft.Office.Core;
using Word = Microsoft.Office.Interop.Word;
public void OnTextButton(Office.IRibbonControl control)
{
Word.Range currentRange = Globals.ThisAddIn.Application.Selection.Range;
Microsoft.Office.Interop.Word.Window activeWin = (Microsoft.Office.Interop.Word.Window)control.Context;
if (activeWin.Application.ActiveDocument.Path =="")
{
MessageBox.Show("You didn't save the document.");
return;
}
else
{
currentRange.Text = "Path: " + activeWin.Application.ActiveDocument.Path +
"\r\n" + "Name: " + activeWin.Application.ActiveDocument.Name;
}
}
This works on Office 2007 and returns the name of the current document.
Thanks again!
|
|
|
|
|
alina_anitei wrote: that i've just created
Post that code
|
|
|
|
|
I can poste the add-in code for office 2007. It's ok?
|
|
|
|
|
alina_anitei wrote: I can poste the add-in code for office 2007. It's ok?
Well, just the relevant bits. There is nothing wrong with posting code, it is actively encouraged. Just don't go nuts and post everything.
|
|
|
|
|
i learn c#.i want to be best programmer.i want to your help.please send sample
|
|
|
|
|
lankaudaranga wrote: please send sample
You'd better send me a sterilised sample bottle first then. It might be a little warm by the time it gets to you.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: You'd better send me a sterilised sample bottle first then
You beat me to it. I left the page languish for too long as I attended something else before putting in my smart-alec answer.
|
|
|
|
|
Colin Angus Mackay wrote: before putting in my smart-alec answer.
He seems suspiciously Kylesque
|
|
|
|