Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Converting a theme from VB To C#

So I used teleriks converter and fixed a few errors that happend after that but now im down to the last 24 error and I really cant seem to fix them.
Anyone with some free time who wants to help me?
Much appriciated! 🤝

Never done it before so not sure how I would do it.
^haha true
but w/o dll:
Search up a good decompiler and use their generated code
[Image: a56ab293be.png]
(this is ILSpy)
then you just have to modifly sum stuff (much but ez in my case)
then you have the code w/o the dll in your project
online converters are shit
(May 14, 2017 02:07 AM)passwords Wrote:  Never done it before so not sure how I would do it.

Create a class lib project, make all control classes public (if not already) and build as release. To use, right click the toolbox in your form view then select "choose items" and select the dll you compiled.
(May 14, 2017 02:07 AM)w4zt3d Wrote:  ^haha true
but w/o dll:
Search up a good decompiler and use their generated code
[Image: a56ab293be.png]
(this is ILSpy)
then you just have to modifly sum stuff (much but ez in my case)
then you have the code w/o the dll in your project
online converters are shit

But I only have the source code to the theme.


(May 14, 2017 02:15 AM)Owl Wrote:  Create a class lib project, make all control classes public (if not already) and build as release. To use, right click the toolbox in your form view then select "choose items" and select the dll you compiled.

A VB class lib? I tried that and I get like 500 errors haha
(May 14, 2017 03:21 AM)Owl Wrote:  He means build a VB app using it and open it in a decompiler where you can select the language (IL, C#, VB).

Yeah I opened it with ILSpy and It's pretty much like a bunch of files, really confused haha
Just compile the VB classes to a library. Create a new Class Library Project in VB.net and add all the control class files to the project, then build it, and you are done.
(May 14, 2017 05:22 AM)Ninja Wrote:  Just compile the VB classes to a library. Create a new Class Library Project in VB.net and add all the control class files to the project, then build it, and you are done.

I tried that but when I create a VB library I get like 500 errors again haha
(May 14, 2017 05:50 AM)passwords Wrote:  I tried that but when I create a VB library I get like 500 errors again haha

Which errors do you get? Can you post a screenshot or your code?
If the theme you have is indeed written in VB.net then you did something wrong. Did you add the files as is or did you open the files and copy the content?
(May 14, 2017 06:33 AM)Ninja Wrote:  Which errors do you get? Can you post a screenshot or your code?
If the theme you have is indeed written in VB.net then you did something wrong. Did you add the files as is or did you open the files and copy the content?

https://i.imgur.com/pD3OyWv.png
(May 14, 2017 06:36 AM)passwords Wrote:  https://i.imgur.com/pD3OyWv.png

Did you copy all the code or just the class? It seems you dont have the correct references. Why didn't you notice that it doesn't recognize things like Graphics and try to hover your mouse over it to see what it says? If you just hover your mouse over the error, the light bulb will appear, and if you click that it will tell you how to fix it...
(May 14, 2017 06:39 AM)Ninja Wrote:  Did you copy all the code or just the class? It seems you dont have the correct references. Why didn't you notice that it doesn't recognize things like Graphics and try to hover your mouse over it to see what it says? If you just hover your mouse over the error, the light bulb will appear, and if you click that it will tell you how to fix it...

I tried doing the lighbulb fix already, It just says "Generate property " and what ever I hover over.
(May 14, 2017 06:40 AM)passwords Wrote:  I tried doing the lighbulb fix already, It just says "Generate property " and what ever I hover over.

So it says Graphics is not found. Graphics comes from System.Drawing as a very simple 2 word Google search tells us. So just add a reference to System.Drawing and then do the light bulb fix.
(May 14, 2017 06:43 AM)Ninja Wrote:  So it says Graphics is not found. Graphics comes from System.Drawing as a very simple 2 word Google search tells us. So just add a reference to System.Drawing and then do the light bulb fix.

https://i.imgur.com/3qIimVl.png
(May 14, 2017 06:45 AM)passwords Wrote:  https://i.imgur.com/3qIimVl.png

You are obviously in way over your head with something this simple. How about you learn (.NET) programming first?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by cristlolJun 2, 2017 01:27 PM 4 218 Jun 2, 2017 01:27 PM
Last Post: cristlol
[.NET] by Lor‌dFeb 25, 2016 02:55 PM 14 530 Feb 25, 2016 02:55 PM
Last Post: Lor‌d
[.NET] by The Elite NoobJul 28, 2012 09:46 AM 12 2,317 Jul 28, 2012 09:46 AM
Last Post: CyberR00T