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

C# 

Using Console App Code in Windows Forms?

I am making a trainer for the game Assault Cube as it is my first real C# project. Using VAMemory I can read and write the memory addresses to change stuff like health/ammo. I want to use this code in my Windows Form so that it'll modify the addresses on a button click event.

Check the picture in my spoiler for a possibly better explanation.

Spoiler (Click to View)
Apparently I need to pass vam to Form1.cs or subscribe to the events in Program.cs, but I have absolutely no idea how to do either or even understand why this needs to be done. Searching the docs helped me a little but I'm still really stuck... :(
[Image: Ijqx9DX.png]
Quick Love my posts please!
Are you trying to do some design pattern?? if not then just copy the code from main and put it on the button accordingly..
(Aug 29, 2020 06:18 AM)Accord Wrote:  Are you trying to do some design pattern?? if not then just copy the code from main and put it on the button accordingly..

No design pattern. I just really want to learn how to do it. I tried moving the code from main into the form and it just gave me a bunch of other problems.
[Image: Ijqx9DX.png]
Quick Love my posts please!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersOct 28, 2023 10:25 AM 6 254 Oct 28, 2023 10:25 AM
Last Post: Hackers
by user344335Apr 10, 2023 11:11 AM 0 146 Apr 10, 2023 11:11 AM
Last Post: user344335
[.NET] by SIM-63814Mar 5, 2023 02:14 PM 12 389 Mar 5, 2023 02:14 PM
Last Post: Swizzi00