Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

thesad

@thesad
About
Posts
25
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need help on game creation
    T thesad

    I had created game using Form, and 2 arrays of pictureboxes. I make everything, but it go very slow, so I asked my theacher how can it make faster, he said what it some function, that make project of game faster, but he didn't know hier names. So I tried search in msdn but fuond nothig. Can anybody help with this functions ? I using visual studio c++.

    C / C++ / MFC csharp c++ visual-studio game-dev help

  • error LNK2005
    T thesad

    I added #pragma once in first line of classes.h but I still get that error

    Managed C++/CLI help question

  • error LNK2005
    T thesad

    I had created class in one classes.h file. I included this file in Form1.h, created Class^ c = gcnew Class(); and call one of function. When I wanted to run my procjet I get error LNK2005: "public: void __clrcall class::Prepare(class System::String ^)" (?Prepare@class@@$$FQ$AAMXP$AAVString@System@@@Z) already defined in Myproject.obj Where could I do wrong?

    Managed C++/CLI help question

  • Need help with forms
    T thesad

    thak you for advice What book you recomend?

    .NET (Core and Framework) help tutorial question

  • Need help with forms
    T thesad

    I need open new form and close that form, from wich it was opened. How to do it?

    .NET (Core and Framework) help tutorial question

  • help me to make my program work faster
    T thesad

    what do you mean saying "double-buffering" ? -- modified at 10:39 Tuesday 13th March, 2007 I find out what is double-buffering, and added. It really helped. Tank you all for your help.

    .NET (Core and Framework)

  • help me to make my program work faster
    T thesad

    private: System::Void tmr_for_move_Tick(System::Object^ sender, System::EventArgs^ e) { Move_usr(); if(b_usr.pct->Visible == true) Move_bl_usr(); for(int i=0; ipct->Visible == true) Move_bl_em(i); if(b_usr.pct->Visible == true) Check_hit_em(i); if(b_em[i]->pct->Visible == true) Check_hit_usr(i); else if(em[i]->pct->Visible == true) Shooting_em(i); } } private: void Move_em(int i){ if(em[i]->pct->Left + em[i]->step_x > min_x && em[i]->pct->Left + em[i]->step_x < max_x) em[i]->pct->Left += em[i]->step_x; else em[i]->step_x *= -1; if(em[i]->pct->Top + em[i]->step_y > min_y && em[i]->pct->Top + em[i]->step_y <= max_y) em[i]->pct->Top += em[i]->step_y; else em[i]->step_y *= -1; if(em[i]->pct->Left == max_x) em[i]->step_x = - em[i]->step_x; if(em[i]->pct->Top == max_y - 58) em[i]->step_y = - em[i]->step_y; if(em[i]->step_x > 0) em[i]->pct->Load("e_r.jpg"); else if(em[i]->step_x < 0) em[i]->pct->Load("e_l.jpg"); if(em[i]->step_y > 0) em[i]->pct->Load("e_d.jpg"); else if(em[i]->step_y < 0) em[i]->pct->Load("e_u.jpg"); } Other procedures are same, but move different object. private: object usr, b_usr; private: static unsigned short int hits = 0; private: static unsigned short int n = 10; private: static unsigned short int m = 32; private: static array^ em; private: static array^ b_em; ref struct object { int step_x, step_y; System::Windows::Forms::PictureBox^ pct; };

    .NET (Core and Framework)

  • help me to make my program work faster
    T thesad

    I use two picturebox's arrays, wich have 10 elenemts, two timers. My form is maximized and transparent. Then the form wasn't trasnparent, program was going on the right speed.

    .NET (Core and Framework)

  • help me to make my program work faster
    T thesad

    I had written my program, but it work so slow, that all work looks like one big photo album. I tried optimizate with visual studio, but it gave nothig. What could I do to increse program working speed?

    .NET (Core and Framework)

  • I need help for creating array [modified]
    T thesad

    thank you for your help :)

    Managed C++/CLI

  • I need help for creating array [modified]
    T thesad

    I need to create an 2 dimension array, wich type is picture box, so I have write such code: private: static unsigned short int n = 100; private: static array < System::Windows::Forms::PictureBox^ >^ m; m = gcnew array < System::Windows::Forms::PictureBox^ > (n); for(int i=0; i < n; i++){ m[i] = gcnew array < System::Windows::Forms::PictureBox^ >(n); for( int j = 0; j < n; j++){ m[i, j] = gcnew System::Windows::Forms::PictureBox(); m[i, j]->Location = System::Drawing::Point(200 + i, 250); m[i, j]->Visible = true; m[i, j]->Size = System::Drawing::Size(1, 1); m[i, j]->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage; m[i, j]->Load("a.gif"); Controls->Add(m[i, j]); } } but i get an error, that this array is not 2 dimension what can be wrong?

    Managed C++/CLI

  • help on project biulding
    T thesad

    then how create setup? I use visual studio c++ 2005 express edition.

    .NET (Core and Framework) csharp dotnet help question

  • help on project biulding
    T thesad

    I had finished my project and I want give to my frien. How should I biuld my project, that it work at my friend computer (he don't have .Net framework)?

    .NET (Core and Framework) csharp dotnet help question

  • Error with 'System.NullReferenceException' [modified]
    T thesad

    thank you for your help :)

    Managed C++/CLI graphics help question

  • Error with 'System.NullReferenceException' [modified]
    T thesad

    Here is all code : #pragma once namespace Littletanks { ref struct tank { int step_x, step_y; System::Windows::Forms::PictureBox^ pct; }; using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public ref class wnd_main : public System::Windows::Forms::Form { public: wnd_main(void) { InitializeComponent(); } protected: ~wnd_main() { if (components) delete components; } private: System::ComponentModel::IContainer^ components; private: int max_x, max_y, min_x, min_y; private: tank usr, b_usr; private: static array^ em; private: static array^ b_em; #pragma region Windows Form Designer generated code void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); this->usr.pct = (gcnew System::Windows::Forms::PictureBox()); this->b_usr.pct = (gcnew System::Windows::Forms::PictureBox()); this->SuspendLayout(); // // pct_usr // this->usr.pct->Location = System::Drawing::Point(235, 391); this->usr.pct->Size = System::Drawing::Size(50, 50); this->usr.pct->TabStop = false; // // pct_em // array^ em = gcnew array(10); array^ b_em = gcnew array(10); for(int i=0; i <10; i++){ this->em[i]->pct = gcnew System::Windows::Forms::PictureBox(); this->em[i]->pct->Location = System::Drawing::Point(250, 250); this->em[i]->pct->Visible = true; this->em[i]->pct->Size = System::Drawing::Size(50, 50); this->b_em[i]->pct = gcnew System::Windows::Forms::PictureBox(); this->b_em[i]->pct->Load("b_em[i]->jpg"); this->b_em[i]->pct->Location = System::Drawing::Point(13, 64); this->b_em[i]->pct->Size = System::Drawing::Size(5, 5); this->b_em[i]->pct->Visible = false; this->Controls->Add(this->b_em[i]->pct); this->Controls->Add(this->em[i]->pct); } this->b_usr.pct->Load("b_usr.jpg"); this->b_usr.pct->Location = System::Drawing::Point(97, 142); this->b_usr.pct->Size = System::Drawing::Size(5, 5); this->b_usr.pct->Visible = false; // wnd_main // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->BackColor = System::Drawing::SystemColors::Window; this->ClientSize = System::Drawin

    Managed C++/CLI graphics help question

  • Error with 'System.NullReferenceException' [modified]
    T thesad

    I wrote taht you had sad, but still at same line is that error

    Managed C++/CLI graphics help question

  • Error with 'System.NullReferenceException' [modified]
    T thesad

    the em array defined so : static array^ em; and tank is structure : ref struct tank { int step_x, step_y; System::Windows::Forms::PictureBox^ pct; }; What do you mean saying to create objects for array?:)

    Managed C++/CLI graphics help question

  • Error with 'System.NullReferenceException' [modified]
    T thesad

    I had written : for(int i=0; i <10; i++){ em[i]->pct = (gcnew System::Windows::Forms::PictureBox()); em[i]->pct->Location = System::Drawing::Point(250, 250); em[i]->pct->Visible = true; em[i]->pct->Size = System::Drawing::Size(50, 50); } And I got this error :

    An unhandled exception of type 'System.NullReferenceException' occurred in Little tanks.exe

    Additional information: Object reference not set to an instance of an object.

    at this line : em[i]->pct = (gcnew System::Windows::Forms::PictureBox()); what did I do wrong?

    Managed C++/CLI graphics help question

  • problem with Random
    T thesad

    thanks for your help:)

    Managed C++/CLI help data-structures question lounge

  • problem with Random
    T thesad

    I had written a program and I need use Random class, so I wrote : Random^ i = gcnew Random(); for(int i=0; i<10; i++) { em[i]->pct->Left = i->Next(min_x, max_x); em[i]->pct->Top = i->Next(min_y, max_y); } em is static array< tank^ >^ em; and tank is : ref struct tank { int step_x, step_y; System::Windows::Forms::PictureBox^ pct; }; but I get an error : error C2227: left of '->Next' must point to class/struct/union/generic type type is 'int' Where is problem??

    Managed C++/CLI help data-structures question lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups