hello
i trying to make a KeyGen , A-Z and 0-9
I have a book on c++ programming and its called : C++ PROGRAMMING : in easy steps
and at the back of the book there is a lottery picker ( but its not gonna make you millions lol )
and the program is in Microsoft Visial c++ ( what i have :P ) and it generates six random numbers from 1-49. and all the code gives me is the FUNCTIONAL code to make the button make the text boxes to put the rendom numbers in.
and i did try to put it into my program code that i maded to try the code but it did not work and then i tryed editting the code to try to fix it in ect but i just get errors ect
well my program atm looks like this
http://i130.photobucket.com/albums/p...a92/Keygen.jpg
but the button dos notting
and my code atm looks like this
Code:
#pragma once
namespace myKeyGen {
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 Form1
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::TextBox^ textBox4;
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->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System::Drawing::Point(30, 49);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(102, 23);
this->button1->TabIndex = 0;
this->button1->Text = L"Generate Key";
this->button1->UseVisualStyleBackColor = true;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(304, 91);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(57, 13);
this->label1->TabIndex = 1;
this->label1->Text = L"By **** ****";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(59, 21);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(251, 13);
this->label2->TabIndex = 2;
this->label2->Text = L"Click the Generate Key button to get your Key Code";
//
// textBox1
//
this->textBox1->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox1->Location = System::Drawing::Point(163, 50);
this->textBox1->MaxLength = 4;
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(45, 22);
this->textBox1->TabIndex = 10;
this->textBox1->WordWrap = false;
//
// textBox2
//
this->textBox2->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
this->textBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox2->Location = System::Drawing::Point(214, 50);
this->textBox2->MaxLength = 4;
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(45, 22);
this->textBox2->TabIndex = 11;
this->textBox2->WordWrap = false;
//
// textBox3
//
this->textBox3->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
this->textBox3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox3->Location = System::Drawing::Point(265, 50);
this->textBox3->MaxLength = 4;
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(45, 22);
this->textBox3->TabIndex = 12;
this->textBox3->WordWrap = false;
//
// textBox4
//
this->textBox4->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
this->textBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox4->Location = System::Drawing::Point(316, 50);
this->textBox4->MaxLength = 4;
this->textBox4->Name = L"textBox4";
this->textBox4->Size = System::Drawing::Size(45, 22);
this->textBox4->TabIndex = 13;
this->textBox4->WordWrap = false;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(373, 113);
this->Controls->Add(this->textBox4);
this->Controls->Add(this->textBox3);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->button1);
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
this->Name = L"Form1";
this->RightToLeftLayout = true;
this->Text = L"KeyGen";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
};
}
lol big big code
well i want my program to random generate 4 numbers ( from 0-9 ) and 12 letters ( from A-Z )
e.g
2GEN-6JKE-4SDR-1RED
so what i would like is that when i click the button "Generate Key" it will make a random key and then out print it into the text boxs
http://i130.photobucket.com/albums/p...92/keygen2.jpg
so if you can make up a litte code to help me do that or if you have some tips or links or somethink pls post here
THANK YOU VERY VERY MUCH!!!