Posts

Showing posts with the label Interop

The legend of Forever Alone guy who wrote himself a wrapper for C# to use as ActiveX.

Image
Woa, me and my classmates are planning to go to the cinema to enjoy "Madagascar 3" next week. It's fantastic because the girl I like love this movie so much. I invited her to join us but she couldn't, that's so sad. It's not the worst thing when I realized that all my guys would go with their girlfriends and I would go alone. In my band of 6 or 7, I am the only one who is single. Ridiculous. Really I am a bad mood, and I can't work for final exam until I make something crazy. I decide to call some C# code in a VBScript @@ Thanks stackoverflow stuff for helping. Target Wrap a .NET user control in an ActiveX class Solution 1/ Create the Class Library in VS 2010: Open your Visual Studio in Administrator mode please (some system access will be made). Create a new, empty Class Library project and add into it a Windows Form. Drag to the from 1 button named btnDo and 1 label named lblResult. Then bind the button clicking event with thes...

How to wrap a C# library for using in Java, a folk tale about an idiot coding at midnight.

Image
Hi guy, long time no see. I miss u so muchhhhh :x Sorry readers, thing in front of me is the mirror. This post begins here. U know, it's 3 am, today is my birthday, I have an AI tutorial class this afternoon and I've not slept yet. I'm so excited now. I've just archived the great idiots things that almost idiots couldn't archive. I feel like the most idiot ever. From now on, I'm able to call an idiot C# method in the idiot language Java. I'm gonna tell you how. Before continuing, check if you've installed Windows OS, .NET framework and MS VS already. Firstly, prepare an idiot C# library by yourself. Open your Notepad++ and type this code (do not copy here because this text is not colored): using System; using System.Windows.Forms; public class CSharpHelloWorld {     public CSharpHelloWorld() { }     public void displayHelloWorld()     {         MessageBox.Show("Hello Java, I'm ...