Click here to Skip to main content
15,915,770 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionC++/CLI Beginner Questions Pin
TripShock10-Feb-09 3:07
TripShock10-Feb-09 3:07 
AnswerRe: C++/CLI Beginner Questions Pin
led mike10-Feb-09 4:33
led mike10-Feb-09 4:33 
GeneralRe: C++/CLI Beginner Questions Pin
TripShock10-Feb-09 5:20
TripShock10-Feb-09 5:20 
GeneralRe: C++/CLI Beginner Questions Pin
Mark Salsbery10-Feb-09 5:58
Mark Salsbery10-Feb-09 5:58 
GeneralRe: C++/CLI Beginner Questions Pin
led mike10-Feb-09 6:03
led mike10-Feb-09 6:03 
QuestionAdvice for remote dabase.... Pin
Thilek10-Feb-09 0:31
Thilek10-Feb-09 0:31 
AnswerRe: Advice for remote dabase.... Pin
led mike10-Feb-09 4:38
led mike10-Feb-09 4:38 
GeneralRe: Advice for remote dabase.... Pin
Thilek10-Feb-09 5:59
Thilek10-Feb-09 5:59 
i use .net for this program..

below is my coding :-

#pragma once
#include <mysql.h>


namespace trialcpp {

	using namespace System;
	using namespace System::ComponentModel;
	
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace MySql::Data::MySqlClient;


	/// <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^  cmdLogin;
	private: System::Windows::Forms::Button^  cmdExit;

	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->cmdLogin = (gcnew System::Windows::Forms::Button());
			this->cmdExit = (gcnew System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// cmdLogin
			// 
			this->cmdLogin->Location = System::Drawing::Point(52, 190);
			this->cmdLogin->Name = L"cmdLogin";
			this->cmdLogin->Size = System::Drawing::Size(75, 23);
			this->cmdLogin->TabIndex = 0;
			this->cmdLogin->Text = L"Login";
			this->cmdLogin->UseVisualStyleBackColor = true;
			this->cmdLogin->Click += gcnew System::EventHandler(this, &Form1::cmdLogin_Click);
			// 
			// cmdExit
			// 
			this->cmdExit->Location = System::Drawing::Point(175, 190);
			this->cmdExit->Name = L"cmdExit";
			this->cmdExit->Size = System::Drawing::Size(75, 23);
			this->cmdExit->TabIndex = 1;
			this->cmdExit->Text = L"Exit";
			this->cmdExit->UseVisualStyleBackColor = true;
			this->cmdExit->Click += gcnew System::EventHandler(this, &Form1::Exit_Click);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(326, 266);
			this->Controls->Add(this->cmdExit);
			this->Controls->Add(this->cmdLogin);
			this->Name = L"Form1";
			this->Text = L"Form1";
			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
			this->ResumeLayout(false);

		}
#pragma endregion

	

	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
				
			 }
	private: System::Void Exit_Click(System::Object^  sender, System::EventArgs^  e) {

				this->Close();

			 }
	  

	private: System::Void cmdLogin_Click(System::Object^  sender, System::EventArgs^  e) {
 
     MySqlDataAdapter^ mySqlDataAdapter=gcnew MySqlDataAdapter();

	MySqlConnection ^conDatabase = gcnew MySqlConnection("Server=sql304.speedhosting.co.cc;Uid='speed_2972829';Pwd='kettavan'; Protocol=tcp; Pooling=false");

	conDatabase->Open();


    System::Windows::Forms::MessageBox::Show("Connection Successful");
	
	conDatabase->Close();

				 }	 

	};

GeneralRe: Advice for remote dabase.... Pin
Mark Salsbery10-Feb-09 6:00
Mark Salsbery10-Feb-09 6:00 
GeneralRe: Advice for remote dabase.... Pin
led mike10-Feb-09 6:51
led mike10-Feb-09 6:51 
GeneralRe: Advice for remote dabase.... Pin
Thilek10-Feb-09 17:06
Thilek10-Feb-09 17:06 
QuestionC++/CLI Convert long Strings to Int Pin
J_E_D_I9-Feb-09 8:53
J_E_D_I9-Feb-09 8:53 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Luc Pattyn9-Feb-09 9:27
sitebuilderLuc Pattyn9-Feb-09 9:27 
AnswerRe: C++/CLI Convert long Strings to Int Pin
Mark Salsbery9-Feb-09 9:30
Mark Salsbery9-Feb-09 9:30 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Luc Pattyn9-Feb-09 9:44
sitebuilderLuc Pattyn9-Feb-09 9:44 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Mark Salsbery9-Feb-09 9:48
Mark Salsbery9-Feb-09 9:48 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Luc Pattyn9-Feb-09 10:13
sitebuilderLuc Pattyn9-Feb-09 10:13 
GeneralRe: C++/CLI Convert long Strings to Int Pin
led mike9-Feb-09 10:15
led mike9-Feb-09 10:15 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Mark Salsbery9-Feb-09 10:19
Mark Salsbery9-Feb-09 10:19 
GeneralRe: C++/CLI Convert long Strings to Int Pin
Luc Pattyn9-Feb-09 10:47
sitebuilderLuc Pattyn9-Feb-09 10:47 
QuestionC++/CLI string formatting Pin
J_E_D_I9-Feb-09 8:44
J_E_D_I9-Feb-09 8:44 
GeneralRe: C++/CLI string formatting Pin
Luc Pattyn9-Feb-09 9:29
sitebuilderLuc Pattyn9-Feb-09 9:29 
GeneralRe: C++/CLI string formatting Pin
Mark Salsbery9-Feb-09 9:35
Mark Salsbery9-Feb-09 9:35 
Questionupdate listbox?? Pin
Thilek9-Feb-09 5:30
Thilek9-Feb-09 5:30 
AnswerRe: update listbox?? Pin
Mark Salsbery9-Feb-09 6:10
Mark Salsbery9-Feb-09 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.