common file dialog

Status
Niet open voor verdere reacties.

jellever

Gebruiker
Lid geworden
7 feb 2008
Berichten
401
Beste lezers,

ik ben begonnen met c++ te leren en ben bezig een klein programmatje te schrijven maar ik crash al meteen:p. Ik wil een save dialog om de locatie van de "backup"aan te geven maar heb al van alles gebprobeerd maar niks werkt of ik doe het verkeerd(meest waarscheinlijk:shocked: ). Zouden jullie mij kunnen helpen? Ik wil dat als je op button1 klikt de save dialog op komt.



ik gebruik visual c++ express edition.

code:
Code:
"
#pragma once


namespace winformsapp2 {

	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::Label^  label_ftp;
	private: System::Windows::Forms::GroupBox^  frame;

	private: System::Windows::Forms::Label^  label_user;
	private: System::Windows::Forms::TextBox^  input_password;
	private: System::Windows::Forms::TextBox^  input_user;
	private: System::Windows::Forms::TextBox^  input_ftp;
	private: System::Windows::Forms::Label^  label_position;
	private: System::Windows::Forms::Label^  label_name_backup;
	private: System::Windows::Forms::Label^  label_password;
	private: System::Windows::Forms::Button^  button1;



	private: System::Windows::Forms::TextBox^  textBox1;




	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->label_ftp = (gcnew System::Windows::Forms::Label());
			this->frame = (gcnew System::Windows::Forms::GroupBox());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->input_password = (gcnew System::Windows::Forms::TextBox());
			this->input_user = (gcnew System::Windows::Forms::TextBox());
			this->input_ftp = (gcnew System::Windows::Forms::TextBox());
			this->label_position = (gcnew System::Windows::Forms::Label());
			this->label_name_backup = (gcnew System::Windows::Forms::Label());
			this->label_password = (gcnew System::Windows::Forms::Label());
			this->label_user = (gcnew System::Windows::Forms::Label());
			this->frame->SuspendLayout();
			this->SuspendLayout();
			// 
			// label_ftp
			// 
			this->label_ftp->AutoSize = true;
			this->label_ftp->Location = System::Drawing::Point(19, 31);
			this->label_ftp->Name = L"label_ftp";
			this->label_ftp->Size = System::Drawing::Size(51, 13);
			this->label_ftp->TabIndex = 0;
			this->label_ftp->Text = L"ftp server";
			// 
			// frame
			// 
			this->frame->Controls->Add(this->textBox1);
			this->frame->Controls->Add(this->button1);
			this->frame->Controls->Add(this->input_password);
			this->frame->Controls->Add(this->input_user);
			this->frame->Controls->Add(this->input_ftp);
			this->frame->Controls->Add(this->label_position);
			this->frame->Controls->Add(this->label_name_backup);
			this->frame->Controls->Add(this->label_password);
			this->frame->Controls->Add(this->label_user);
			this->frame->Controls->Add(this->label_ftp);
			this->frame->Location = System::Drawing::Point(12, 51);
			this->frame->Name = L"frame";
			this->frame->Size = System::Drawing::Size(412, 360);
			this->frame->TabIndex = 1;
			this->frame->TabStop = false;
			this->frame->Text = L"backup configuration";
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(193, 117);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(100, 20);
			this->textBox1->TabIndex = 9;
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(310, 117);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 8;
			this->button1->Text = L"save file";
			this->button1->UseVisualStyleBackColor = true;
			
			// 
			// input_password
			// 
			this->input_password->Location = System::Drawing::Point(229, 82);
			this->input_password->Name = L"input_password";
			this->input_password->Size = System::Drawing::Size(137, 20);
			this->input_password->TabIndex = 7;
			// 
			// input_user
			// 
			this->input_user->Location = System::Drawing::Point(229, 57);
			this->input_user->Name = L"input_user";
			this->input_user->Size = System::Drawing::Size(137, 20);
			this->input_user->TabIndex = 6;
			// 
			// input_ftp
			// 
			this->input_ftp->Location = System::Drawing::Point(229, 31);
			this->input_ftp->Name = L"input_ftp";
			this->input_ftp->Size = System::Drawing::Size(137, 20);
			this->input_ftp->TabIndex = 5;
			// 
			// label_position
			// 
			this->label_position->AutoSize = true;
			this->label_position->Location = System::Drawing::Point(19, 127);
			this->label_position->Name = L"label_position";
			this->label_position->Size = System::Drawing::Size(91, 13);
			this->label_position->TabIndex = 4;
			this->label_position->Text = L"directorie for save";
			// 
			// label_name_backup
			// 
			this->label_name_backup->AutoSize = true;
			this->label_name_backup->Location = System::Drawing::Point(19, 105);
			this->label_name_backup->Name = L"label_name_backup";
			this->label_name_backup->Size = System::Drawing::Size(72, 13);
			this->label_name_backup->TabIndex = 3;
			this->label_name_backup->Text = L"name backup";
			// 
			// label_password
			// 
			this->label_password->AutoSize = true;
			this->label_password->Location = System::Drawing::Point(19, 82);
			this->label_password->Name = L"label_password";
			this->label_password->Size = System::Drawing::Size(52, 13);
			this->label_password->TabIndex = 2;
			this->label_password->Text = L"password";
			// 
			// label_user
			// 
			this->label_user->AutoSize = true;
			this->label_user->Location = System::Drawing::Point(19, 57);
			this->label_user->Name = L"label_user";
			this->label_user->Size = System::Drawing::Size(53, 13);
			this->label_user->TabIndex = 1;
			this->label_user->Text = L"username";
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(436, 423);
			this->Controls->Add(this->frame);
			this->Name = L"Form1";
			this->Text = L"Form1";
			this->frame->ResumeLayout(false);
			this->frame->PerformLayout();
			this->ResumeLayout(false);

		}
		
#pragma endregion






    






};
}

Alvast bedankt:thumb:
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan