soucre code :
#include <Windows.h>
#include <stdio.h>
#include <string>
#define Address 0x00785198 // Address By Cheat engine
#define Offset 0xd2ed58 // Hex Offset By Cheat Engines
#define Value 23452
int main()
{
}
int UIMain()
{
return 0;
}
#pragma once
namespace TESTJJJJJ {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for lol
/// </summary>
public ref class lol : public System::Windows::Forms::Form
{
public:
lol(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~lol()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::CheckBox^ checkBox1;
protected:
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System::Drawing::Point(13, 9);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(75, 23);
this->button1->TabIndex = 2;
this->button1->Text = L"button1";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &lol::button1_Click);
//
// checkBox1
//
this->checkBox1->AutoSize = true;
this->checkBox1->Location = System::Drawing::Point(112, 107);
this->checkBox1->Name = L"checkBox1";
this->checkBox1->Size = System::Drawing::Size(80, 17);
this->checkBox1->TabIndex = 3;
this->checkBox1->Text = L"checkBox1";
this->checkBox1->UseVisualStyleBackColor = true;
this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &lol::checkBox1_CheckedChanged_2);
//
// lol
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 262);
this->Controls->Add(this->checkBox1);
this->Controls->Add(this->button1);
this->Name = L"lol";
this->Text = L"lol";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void SpeedPosuvaci()
{
Sleep (2);
if (checkBox1->Checked)
{
*(int*)((*(int*)Address) + Offset) = Value;
}
Sleep (2);
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
//float i = float::Parse(textBox1->Text);
}
private: System::Void checkBox1_CheckedChanged_2(System::Object^ sender, System::EventArgs^ e) {
/* while ((this->checkBox1->Checked)&1)
{
Sleep (50);// Hotkey Function
*(int*)((*(int*)Address) + Offset) = Value;
Sleep (50);
}*/
if (checkBox1->Checked)
{
while (checkBox1->Checked)
{
Sleep (1);
SpeedPosuvaci();
Sleep (1);
}
}
else
{
SpeedPosuvaci();
}
}
};
}
skrátka, když na ten checkBox1 kliknu, jadro Whilu se začne dít (funguje to psaní Value do pointra) ale ma forma prestane pracovat, a neda se to vypnout, ani nic podobneho, nevim čim to je, skoušel sem tam dávát i Sleep (50); a však, stejne nefunguje, to znamená, že je chyba nekde jinde.
prosím o pomoc, diky predem