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
B

Badboy22TR

@Badboy22TR
About
Posts
13
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Single Textbox EventHandler for all
    B Badboy22TR

    It works!!! :) Thank you very much...

    Managed C++/CLI help question

  • Single Textbox EventHandler for all
    B Badboy22TR

    Hi, i have lots of textbox on my form, instead of adding several eventhandlers for textchanged or keypressed, i wrote a single one for all. It worked then i decided to move it to another class, but i can't bind it to eventhandler. I don't know what i did wrong. Can anyone help me please? //If i put the code on form's class it works this->textBox7->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &AA::SM_KeyPress); private: System::Void SM_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) { ...} //But when i try to do this, i got several errors //1>error C2276: '&' : illegal operation on bound member function expression //1>error C3350: 'System::Windows::Forms::KeyPressEventHandler' : a delegate constructor expects 2 argument(s) this->textBox9->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &AA::G1->SM_KeyPress); G1 is an another class, i added these lines to use library. #include "Genel.h" using namespace Util; private : Util::Genel^ G1; Thank you very much...

    Managed C++/CLI help question

  • SQL on a shared HDD via network
    B Badboy22TR

    If i attach mdf to Computer A's SQL Server manually then i make a constr for it without "|DataDirectory|" and Computer B runs exe via Computer A, will it work ?

    Database help database sysadmin question csharp

  • SQL on a shared HDD via network
    B Badboy22TR

    Hi, I have been used sql for my VC++. NET apps’ database. I want to make app that more than one user can use it from a shared hdd via network. E.g. let the app is on computer A, a hdd will be shared via network on computer A, and Computer B will use app via Computer A. After configuring .NET Framework settings with CasPol.exe, app is working. But whenever it try to reach database, this error occurs: “The file” \\....” Is on a network path that is not supported for database files. An attempt to attach auto-named database for file “\\...” failed. A database with the same name exists, or specified file cannot be opened, or its located on UNC share…”. Both of computers (A and B) have SQL Server 2005 Express Edition. At first i use Windows Auth. For login but after i had this error, i tried to make app use “Mix mode” and login as “sa 12345”. I changed Sys. Admin. Pass as “12345” and set “remote connections” settings to “TCP/IP”. How can i solve this problem? Or how do the apps which has same strategy as this app work? Can you help me ? Thanks… Erman

    Database help database sysadmin question csharp

  • Passing Data Between Forms, I tried and failed :)
    B Badboy22TR

    Thank your for your respond. Finally i solved it. I add a new header to project and move the EventArgs class to there. Now it works...

    Managed C++/CLI csharp c++ graphics tutorial question

  • Passing Data Between Forms, I tried and failed :)
    B Badboy22TR

    Hi, I tried to pass data between forms in VC++. I want to pass input data from child's textboxes to parent when child form closes. But all i have is errors. Can you tell me where my mistake(s) is ? //R2.h (Parent Form) #include Yeni.h using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; namespace xxx { public ref class R2 : public System::Windows::Forms::Form { ........... auto generated code............. } //The Button which creates Child Form private: System::Void pictureBox2_Click(System::Object^ sender, System::EventArgs^ e) { MdiParent->ActiveMdiChild->Close(); Yeni^ YRForm = gcnew Yeni(); YRForm->MdiParent=this->MdiParent; YRForm->Show();} //The Button in child form, which closes child form private: System::Void Yeni::pictureBox1_Click(System::Object^ sender, YeniUpdateEventArgs^ e) { String^ A = e->Isim; String^ B = e->Soyad; MessageBox::Show(this,"Isim : "+A+"Soyad : "+B,"Durum",MessageBoxButtons::OK); } //Yeni.h (Child Form) (I'm not sure where I should add "delegate") using namespace System; using .......... .... namespace xxx { public: delegate void YeniUpdateHandler(System::Object^ sender, YeniUpdateEventArgs^ e); public: YeniUpdateHandler^ YeniUpdated; public ref class YeniUpdateEventArgs : public System::EventArgs { private: String^ mIsim; private: String^ mSoyad; public: YeniUpdateEventArgs(String^ sIsim, String^ sSoyad) { this->mIsim = sIsim; this->mSoyad = sSoyad; } public: property String^ Isim { String^ get { return mIsim; } } public: property String^ Soyad { String^ get { return mSoyad; } } }; public ref class Yeni : public System::Windows::Forms::Form { ........... auto generated code............. } //The Button which closes child form private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) { String^ sIsim = textBox1->Text; String^ sSoyad = textBox2->Text; YeniUpdateEventArgs^ args = gcnew YeniUpdateEventArgs(sIsim, sSoyad); YeniUpdated(this, args); this->Close(); } I have 84 errors :)) Most of them is syntax errors. What are my mistakes ? Is anything missing in code or did i place smtg wrong? Thank you very much... PS:Please don't suggest any solution or example in VC#, becau

    Managed C++/CLI csharp c++ graphics tutorial question

  • Translation from C# to C++ [modified]
    B Badboy22TR

    Thank you very much :)

    Managed C++/CLI question csharp c++

  • Translation from C# to C++ [modified]
    B Badboy22TR

    Sorry, can you look to the code again ? It's C# (I pasted the wrong one which i tried to translate) Replace public with public : and String with String^ ? I got errors for "get"...

    Managed C++/CLI question csharp c++

  • Translation from C# to C++ [modified]
    B Badboy22TR

    What is the translation of this code from C# to C++ ?? public String A { get { return a; } } public String B { get { return b; } } Thank you...

    modified on Wednesday, February 20, 2008 8:21 AM

    Managed C++/CLI question csharp c++

  • Passing Data between Forms ???
    B Badboy22TR

    Hi, I have 2 forms (Form A, Form B). One of them is Parent(Form A), the other one is Child(Form B). Child form has textboxes which users can input smtg. I want to transfer data from Child Form's textboxes to Parent form textboxes. How can i do this ? I found some articles about Delegates but all in C#, i tried to convert them in VC ++ but everytime i had some errors. I tried to declare a delegate in Form A like: public ref class Randevu2 : public System::Windows::Forms::Form { public: R2(void) { InitializeComponent(); // //TODO: Add the constructor code here // } public delegate void DelDeneme(String^ s1, String^ s2); But everytime i had errors. Can any one suggest something or tell me that where i declare delegates?

    Managed C++/CLI question csharp

  • What's wrong with database? Can anybody help? [modified]
    B Badboy22TR

    Ok..Finally i solved the problem. If anyone has the same problem, just replace the whole path (eg. "C:\Documents and Settings\XYZ\My Documents\Microsoft Visual Studio 2005\Projects\Release\") ConnectionString in Dataset Header with |DataDirectory| this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"|DataDirectory|\\xxx.mdb\""; and if you have connection in form, write a simple code in Form_Load event, replace ConnectionString with something like : private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { String^ path = Application::StartupPath; this->oleDbConnection1->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\""+path+"\\hasta.mdb\""; }

    Managed C++/CLI help database question

  • What's wrong with database? Can anybody help? [modified]
    B Badboy22TR

    Thanks for your reply. I tried to do your suggests. I find that the problem is dataset. However i changed the connectionstring in the forms, connectionstring in dataset remains. What i can do for it? Can i write a function to dataset.h? like " String^ path = Application::StartupPath; this->oleDbConnection1->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\""+path+"\\xxx.mdb\""; "

    Managed C++/CLI help database question

  • What's wrong with database? Can anybody help? [modified]
    B Badboy22TR

    I use InstallShield for my project. My project has database, i put it to Install Shield's "Application Folder", although i changed the connection string "c:\Documents and Setting\bla bla bla\xxx.mdb" to "xxx.mdb" (software runs my computer well with this string), i don't run it correctly on an another computer after installed it. It crashed when program tried to reach database. An error generated like this "c:\Documents and Settings\........\xxx.mdb couldn't be found". I don't understand :( Why it didn't work although i changed the connection string? Can anybody hel me please ? -- modified at 5:00 Saturday 31st March, 2007

    Managed C++/CLI help database question
  • Login

  • Don't have an account? Register

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