Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

tecnocronus

Visual c++

Recommended Posts

o título diz quase tudo, bem, eu estou procurando qual windows form é usado para abrir arquivos, na verdade nem é o windows form, é que eu sei fazer menus, mais eu quero saber como, quando escolher um meno abrir aquela janela que tu escolhe qual arquivo tu quer abrir

 

p.s: uso você+++ 2008 express edition

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu particularmente não entende de c++ (só um pouco) eu só conheço C, eu acho que agora o problema é como associar o menu abrir a essa winfor, vou te mostrar como está meu código (está muito no começo, eu estou aprendendo a desenha com você ainda):

#pragma once


namespace TecnoCronusScriptManager {

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::ToolStripMenuItem^  toolStripMenuItem1;
protected: 

private: System::Windows::Forms::ToolStripMenuItem^  sairToolStripMenuItem;
private: System::Windows::Forms::MenuStrip^  menuStrip1;
private: System::Windows::Forms::ToolStripMenuItem^  abrirToolStripMenuItem;
private: System::Windows::Forms::FolderBrowserDialog^  folderBrowserDialog1;

protected: 







protected: 

protected: 

protected: 

protected: 


protected: 




private: System::ComponentModel::IContainer^  components;

protected: 


private:
	/// <summary>
	/// Required designer variable.
	/// </summary>


#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->toolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
		this->abrirToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
		this->sairToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
		this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
		this->folderBrowserDialog1 = (gcnew System::Windows::Forms::FolderBrowserDialog());
		this->menuStrip1->SuspendLayout();
		this->SuspendLayout();
		// 
		// toolStripMenuItem1
		// 
		this->toolStripMenuItem1->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->abrirToolStripMenuItem, 
			this->sairToolStripMenuItem});
		this->toolStripMenuItem1->Name = L"toolStripMenuItem1";
		this->toolStripMenuItem1->Size = System::Drawing::Size(56, 20);
		this->toolStripMenuItem1->Text = L"Arquivo";
		this->toolStripMenuItem1->Click += gcnew System::EventHandler(this, &Form1::toolStripMenuItem1_Click);
		// 
		// abrirToolStripMenuItem
		// 
		this->abrirToolStripMenuItem->ForeColor = System::Drawing::SystemColors::ControlText;
		this->abrirToolStripMenuItem->Name = L"abrirToolStripMenuItem";
		this->abrirToolStripMenuItem->Size = System::Drawing::Size(108, 22);
		this->abrirToolStripMenuItem->Text = L"Abrir";
		// 
		// sairToolStripMenuItem
		// 
		this->sairToolStripMenuItem->Name = L"sairToolStripMenuItem";
		this->sairToolStripMenuItem->Size = System::Drawing::Size(108, 22);
		this->sairToolStripMenuItem->Text = L"Sair";
		// 
		// menuStrip1
		// 
		this->menuStrip1->BackColor = System::Drawing::SystemColors::Highlight;
		this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->toolStripMenuItem1});
		this->menuStrip1->Location = System::Drawing::Point(0, 0);
		this->menuStrip1->Name = L"menuStrip1";
		this->menuStrip1->Size = System::Drawing::Size(963, 24);
		this->menuStrip1->TabIndex = 0;
		this->menuStrip1->Text = L"menuStrip1";
		// 
		// folderBrowserDialog1
		// 
		this->folderBrowserDialog1->HelpRequest += gcnew System::EventHandler(this, &Form1::folderBrowserDialog1_HelpRequest);
		// 
		// Form1
		// 
		this->AutoScaleDimensions = System::Drawing::SizeF(8, 20);
		this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
		this->ClientSize = System::Drawing::Size(963, 531);
		this->Controls->Add(this->menuStrip1);
		this->Font = (gcnew System::Drawing::Font(L"Trebuchet MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
			static_cast<System::Byte>(0)));
		this->ForeColor = System::Drawing::SystemColors::Desktop;
		this->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
		this->Name = L"Form1";
		this->Text = L"TecnoCronus Script Manager";
		this->menuStrip1->ResumeLayout(false);
		this->menuStrip1->PerformLayout();
		this->ResumeLayout(false);
		this->PerformLayout();

	}
#pragma endregion

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

private: System::Void folderBrowserDialog1_HelpRequest(System::Object^  sender, System::EventArgs^  e) {
	 }
};
}

 

e muito obrigado pela ajuda até agora.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.