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

.NET 

Converting theme from vb to c#

Was originally trying to have this junked due to the fact that some of the users here are assholes and feel the need to talk shit because I am trying to get help but whatever, it's cool.

Not sure what exactly the original thread said but I was looking for help with converting a theme from vb to c#.
I ended up compiling a dll and using that after some help from this amazing user. https://hackforums.net/member.php?action...id=2786325
It's funny how the normal users always seem so much more respectful than the Ub3r members with the exception of a few of them.
You can convert the class file into a .dll & use that in your C# project.
What Earn said OP.

Just compile the theme as a DLL.

In order to use the theme in your C# project go to your toolbox and right click anywhere, you should see a menu item that says "Choose items...". Click that, then click the "Browse" button and locate your two DLL theme files. The theme components should then be in your toolbox.
(Feb 24, 2016 07:46 PM)Earn Wrote:  You can convert the class file into a .dll & use that in your C# project.

(Feb 24, 2016 07:52 PM)My Computer Wrote:  What Earn said OP.

Just compile the theme as a DLL.

In order to use the theme in your C# project go to your toolbox and right click anywhere, you should see a menu item that says "Choose items...". Click that, then click the "Browse" button and locate your two DLL theme files. The theme components should then be in your toolbox.

Tried to compile these into dlls and i'm getting errors with the imports and a bunch of other stuff.
(Feb 24, 2016 08:01 PM)Lor‌d Wrote:  Tried to compile these into dlls and i'm getting errors with the imports and a bunch of other stuff.

If you copied the code to a class library project then you need to go to the main menu (the menu at the top that says file, edit, view, etc) and click Project -> Add reference -> Assemblies. In the assemblies tab there will be a search text box. Inside this textbox you need to type 'System.Windows.Forms' and 'System.Drawing'. Once you found these assemblies just check them and click the "Ok" button. After that you should not get any errors.
(Feb 24, 2016 08:26 PM)My Computer Wrote:  If you copied the code to a class library project then you need to go to the main menu (the menu at the top that says file, edit, view, etc) and click Project -> Add reference -> Assemblies. In the assemblies tab there will be a search text box. Inside this textbox you need to type 'System.Windows.Forms' and 'System.Drawing'. Once you found these assemblies just check them and click the "Ok" button. After that you should not get any errors.

Ok that fixed most of the errors but now I have 23 errors saying "System.Text is a namespace and cannot be used as an expression"
(Feb 24, 2016 08:33 PM)Lor‌d Wrote:  Ok that fixed most of the errors but now I have 23 errors saying "System.Text is a namespace and cannot be used as an expression"

Did you import the namespaces at the top of your code ('System.Windows.Forms' or 'System.Drawing')?
(Feb 24, 2016 08:39 PM)My Computer Wrote:  Did you import the namespaces at the top of your code ('System.Windows.Forms' or 'System.Drawing')?

I have these imports.
Code
Imports System.Drawing.Text
Imports System.Drawing.Drawing2D
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
(Feb 24, 2016 08:40 PM)Lor‌d Wrote:  I have these imports.
Code
Imports System.Drawing.Text
Imports System.Drawing.Drawing2D
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

You probably did not import 'System.Drawing' namespace. Go to Main Menu -> Project -> [YOUR PROJECT NAME HERE] Properties -> References. Tell me what references are listed on that tab page.
(Feb 24, 2016 08:42 PM)My Computer Wrote:  You probably did not import 'System.Drawing' namespace. Go to Main Menu -> Project -> [YOUR PROJECT NAME HERE] Properties -> References. Tell me what references are listed on that tab page.

[Image: w6SjoGQ.png]
(Feb 24, 2016 08:46 PM)Lor‌d Wrote:  -snip-

Think I found the solution your problem. Press CTRL + F, a search box should appear. Click the down arrow (looks like a V). You should now get two textboxes. In the first textbox type "System.Text" and in the bottom one type "Text". Then press ALT + A.

Or you can replace them manually.
(Feb 24, 2016 08:51 PM)My Computer Wrote:  Think I found the solution your problem. Press CTRL + F, a search box should appear. Click the down down arrow (looks like a V). You should now get two textboxes. In the first textbox type "System.Text" and in the bottom one type "Text". Then press ALT + A.

Or you can replace them manually.

Wow yep, that fixed it.
Thanks so much!
(Feb 24, 2016 08:53 PM)Lor‌d Wrote:  Wow yep, that fixed it.
Thanks so much!

No problem. If you need any more help with anything just ask.
Why do you even run a coding service...? I am %99 sure that tool xbox modding tool you're selling or using or whatever is just ripped source code.
(Feb 25, 2016 02:19 PM)Ninja Wrote:  Why do you even run a coding service...? I am %99 sure that tool xbox modding tool you're selling or using or whatever is just ripped source code.

What tool are you referring to? I'm not selling anything...
Also, where do you see that I run a coding service..?
And just because I have never compiled a dll before doesn't mean that I am ripping source codes.
I've been coding in vb for almost 4 years now and have never had to compile a dll. You have to start somewhere.
I'm sorry I don't know everything there is to know about coding. I try my best and if my best isn't good enough then I guess that's too bad.


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
[C#] by passwordsMay 14, 2017 08:11 AM 25 594 May 14, 2017 08:11 AM
Last Post: passwords
[.NET] by The Elite NoobJul 28, 2012 09:46 AM 12 2,317 Jul 28, 2012 09:46 AM
Last Post: CyberR00T