Awesome tutorial man i'm sure this well get in handy for me someday :honored:
Thanks man, hope it does! Its been extremely useful for me in the past couple projects i've worked on.
Awesome tutorial man i'm sure this well get in handy for me someday :honored:
Thanks man, hope it does! Its been extremely useful for me in the past couple projects i've worked on.
Great job on your post Absolute Zero
No problem dude! I figured you of all people would like this, since I remember you asking me about threading and bg workers a while back 😀
Definitely :p I found another way, very similar to this, it involves building a thread like that but it gets called in the Program.cs, calling the Thread like ConstantWrite.Start(); above the Application.Run(new Form1) and ConstantWrite.Abort() below that,
The whole thing looks like this;
public static Thread ConstantWrite = new Thread(new ThreadStart(CWrite)); public static bool toggle; public static void CWrite() { bool sleep = false; while (true) { //run code inside here, you can use bools to toggle, or ints. if (toggle) { //do stuff; } if (!sleep) Thread.Sleep(100); } }
Your method looks nice and compact, very similar tho 😀
Also, not sure if this helps, but if you declare your thread outside a button like it is above, you can then call it inside a button just by typing (in my case) ConstantWrite.Start(); 😛
Definitely :p I found another way, very similar to this, it involves building a thread like that but it gets called in the Program.cs, calling the Thread like ConstantWrite.Start(); above the Application.Run(new Form1) and ConstantWrite.Abort() below that,
The whole thing looks like this;public static Thread ConstantWrite = new Thread(new ThreadStart(CWrite)); public static bool toggle; public static void CWrite() { bool sleep = false; while (true) { //run code inside here, you can use bools to toggle, or ints. if (toggle) { //do stuff; } if (!sleep) Thread.Sleep(100); } }Your method looks nice and compact, very similar tho 😀
Also, not sure if this helps, but if you declare your thread outside a button like it is above, you can then call it inside a button just by typing (in my case) ConstantWrite.Start(); :p
Or you just could hook into any game adress and run your code inside it xD
Definitely :p I found another way, very similar to this, it involves building a thread like that but it gets called in the Program.cs, calling the Thread like ConstantWrite.Start(); above the Application.Run(new Form1) and ConstantWrite.Abort() below that,
The whole thing looks like this;public static Thread ConstantWrite = new Thread(new ThreadStart(CWrite)); public static bool toggle; public static void CWrite() { bool sleep = false; while (true) { //run code inside here, you can use bools to toggle, or ints. if (toggle) { //do stuff; } if (!sleep) Thread.Sleep(100); } }Your method looks nice and compact, very similar tho 😀
Also, not sure if this helps, but if you declare your thread outside a button like it is above, you can then call it inside a button just by typing (in my case) ConstantWrite.Start(); :p
Its the same thing but runs before the first form is loaded, its basically a manual bgw with a toggle because of the bool 😛