Locking feature.

February 20, 2011 § 3 Comments

Title = Locking feature.
Coder = GreenLeaf
Language = VC#

I have noticed recently no one has this feature on any “Moople Story” trainer or bot to which this has surprised me! What I am about to show you is something called “event handlers”, which we will be using “GUI events”. If you do not know what this means, please go learn the basics before attempting this as you will be cheating yourself.

What I will be showing you is a simple feature. This feature was shown on “Xentare Trainer” which had a button with a lock on it. Once the user clicked the lock, every other button became “disabled” in which, you cannot click the other buttons and make them do something as they were “disabled”.

Here is a simple snippet code that will “disable” picturebox1’s click function.

private bool locked = false;

private void pictureBox3_Click(object sender, EventArgs e)
{
if (locked == false)
{
locked = true;
this.pictureBox1.Click -= new System.EventHandler(this.pictureBox1_Click); //disable the picturebox1_click function
}
else
{
locked = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); //enable the picturebox1_click function
}
}

As you can see, we have a private boolean which is called locked. Locked is set to false. Once the user clicks picturebox3, locked does indeed == false, so it is switched to true, and at the same time, disables picturebox1’s click function! Now, once the user clicks picturebox3 again, locked does not equal (!=) false, so it goes to else and switches locked to false, and then enables picturebox1’s click function!
null

Rounded edges.

February 20, 2011 § Leave a comment

Title = Rounded edges.
Coder = GreenLeaf
Language = VC#

This piece of code works perfectly after implementing the Wndproc code as now the edges of your border-less form won’t be square…but rounded!

I gained this code by reading “The dummies book for c++” and just switched to c++ (very little switching also). This piece of code (identical too) is found on code-projects too!

using System.Runtime.InteropServices;

[DllImport(“Gdi32.dll”, EntryPoint = “CreateRoundRectRgn”)]
private static extern IntPtr CreateRoundRectRgn
(
int L,
int T,
int R,
int B,
int W,
int H
);

public Form1()
{
InitializeComponent();
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn( 0, 0, Width, Height, 20, 20));
}

Simply change the 20,20 part for a bigger or smaller ellipse. Releasing a piece of code for a bug fix as if you drag a button past top/bottom/left/right line of form, it creates a white line!
null

GreenLeafCoding.

February 20, 2011 § Leave a comment

Title = GreenLeafCoding.
Coder = GreenLeaf
Language = None

This blog was created under the influence of a older project called “GSB”.

When I was busy coding GSB, I got flamed, spammed, and what not for “stealing BT’S look”. I decided to scrap GSB for two main reasons; a) It got boring and b) I wanted something even better.

Ever since then, I went on a little break and just decided to stay on the low. Recently though, I was informed I had to go to a fucking rehab due to my school marks and what not.

My dad did switch the internet password (but it was really easy to guess), so this is why I am posting (other then my phones msn).

I had a long ass time to think of “what should I code” and it has recently hit my mind. The thing I love to always do to each and every one of my projects is to make it more efficient. This is the main reason why I never release! Each and every time I decide to code, I always find a better way to do this, and to do that!

This is why this blog is now alive. I will be switching the domain to .com soon, but for the meantime, we will be under the wordpress domain. This blog will hold the most efficient code related to anything (that I decide to work on) under Visual Basic, Visual C#, and Visual C++.

The only reason that I stopped releasing open source and other coder’s stopped releasing open source is due to; if I release open source, then what happens to my credits. This is a big thing that is happening to every forum on every hacking website. It takes just one kid to download the open source, switch the gui around, rename the form, and release under his name without any credits to the coder that released that open source.

This is why all I posted on this blog so far is the Wndproc method to moving a border less form. I will be keeping a close eye on any user that “all of a sudden” releases a border less form without proper credits due. I posted the code in VC#, but that can easily be converted to VC++.

I will be releasing a trainer called GreenLeaf eventually (which will contain all the code I post here), and hopefully no one will just rip the code that came from this blog. I will then release a open source of GreenLeaf that will contain all the code posted here + code that won’t be posted here and I pray no one just rips without credit due.

The languages that I will be mainly focusing on are; VC#, and VC++. The reason why I will focus on these two languages is because GreenLeaf will be a piped trainer. A piped trainer means that this trainer will use both languages.

Hopefully you read this and acknowledge what I typed.

Thank you.

Who am I?

February 19, 2011 § Leave a comment

Title = Who am I?
Coder = GreenLeaf
Language = None

I am Goomba.

I decided to make a new blog without all that “jazz” and my main goal here is to post as much code that will improve your functionality in coding.

Please do not comment anything immature you will be banned from commenting on this blog.

Thank you.

Wndproc method.

February 19, 2011 § Leave a comment

Title = Wndproc method.
Coder = GreenLeaf
Language = C#

This piece of code overrides the Wndproc method, thus you are now able to move a “border-less” windows form.

private const int WM_NCHITTEST = 0x84;
private const int HT_CLIENT = 0x1;
private const int HT_CAPTION = 0x2;

protected override void WndProc(ref Message m)
{
base.WndProc(ref m);

if (m.Msg == WM_NCHITTEST && m.Result.ToInt32() == HT_CLIENT)
{
m.Result = (IntPtr)HT_CAPTION;
}
}

Hello world!

February 19, 2011 § Leave a comment

Title = Hello world!
Coder = GreenLeaf
Language = None

Welcome to GreenLeafCoding.

This blog will give you the information you need on coding!