Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: autocomplete control in file opne dialog Pin
Jose Lamas Rios17-Aug-05 18:38
Jose Lamas Rios17-Aug-05 18:38 
GeneralRe: autocomplete control in file opne dialog Pin
ThatsAlok17-Aug-05 23:10
ThatsAlok17-Aug-05 23:10 
GeneralRe: autocomplete control in file opne dialog Pin
Jose Lamas Rios18-Aug-05 2:49
Jose Lamas Rios18-Aug-05 2:49 
GeneralRe: autocomplete control in file opne dialog Pin
ThatsAlok19-Aug-05 19:21
ThatsAlok19-Aug-05 19:21 
GeneralCoCreateGuid Pin
Al_Pennyworth17-Aug-05 12:22
Al_Pennyworth17-Aug-05 12:22 
GeneralRe: CoCreateGuid Pin
Jack Puppy17-Aug-05 12:48
Jack Puppy17-Aug-05 12:48 
GeneralRe: CoCreateGuid Pin
TheGreatAndPowerfulOz17-Aug-05 13:52
TheGreatAndPowerfulOz17-Aug-05 13:52 
GeneralSplash Screen Window problem Pin
gr8coaster32917-Aug-05 12:06
gr8coaster32917-Aug-05 12:06 
I have just added a splash screen to my program. i can compile it without errors but when i try to run it the splash screen does not exit and it continually opens the next window, until i endup with about 10 windows and i close the program.

i am not sure what code is causing the problem so i will just post the splash screen form code:

#pragma once

#include "Form1.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 MyProgram
{
	/// <summary>
	/// Summary for frm_splash_screen
	///
	/// 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 frm_splash_screen : public System::Windows::Forms::Form
	{
	public:
		frm_splash_screen(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">"description of the parameter"</param>
		virtual void Dispose(Boolean disposing) override
		{
			if (disposing && components)
			{
				delete components;
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::Label^  lbl_splash_screen;
	private: System::Windows::Forms::Timer^  timer1;
	private: System::Windows::Forms::PictureBox^  pictureBox1;
	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->components = (gcnew System::ComponentModel::Container());
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(frm_splash_screen::typeid));
			this->lbl_splash_screen = (gcnew System::Windows::Forms::Label());
			this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
			this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
			this->SuspendLayout();
			// 
			// lbl_splash_screen
			// 
			this->lbl_splash_screen->AutoSize = true;
			this->lbl_splash_screen->BackColor = System::Drawing::Color::Transparent;
			this->lbl_splash_screen->Font = (gcnew System::Drawing::Font(L"Porky\'s", 36, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->lbl_splash_screen->ForeColor = System::Drawing::Color::Gold;
			this->lbl_splash_screen->Location = System::Drawing::Point(110, 105);
			this->lbl_splash_screen->Name = L"lbl_splash_screen";
			this->lbl_splash_screen->Size = System::Drawing::Size(336, 64);
			this->lbl_splash_screen->TabIndex = 0;
			this->lbl_splash_screen->Text = L"Splash Screen";
			this->lbl_splash_screen->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
			// 
			// timer1
			// 
			this->timer1->Enabled = true;
			this->timer1->Interval = 6000;
			this->timer1->Tick += gcnew System::EventHandler(this, &frm_splash_screen::cmd_time_reached);
			// 
			// pictureBox1
			// 
			this->pictureBox1->AutoSize = true;
			this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox1.Image")));
			this->pictureBox1->Location = System::Drawing::Point(480, 172);
			this->pictureBox1->Name = L"pictureBox1";
			this->pictureBox1->Size = System::Drawing::Size(54, 73);
			this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::AutoSize;
			this->pictureBox1->TabIndex = 1;
			this->pictureBox1->TabStop = false;
			// 
			// frm_splash_screen
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));
			this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Center;
			this->ClientSize = System::Drawing::Size(546, 257);
			this->ControlBox = false;
			this->Controls->Add(this->pictureBox1);
			this->Controls->Add(this->lbl_splash_screen);
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;
			this->MaximizeBox = false;
			this->MinimizeBox = false;
			this->Name = L"frm_splash_screen";
			this->ShowIcon = false;
			this->ShowInTaskbar = false;
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
			this->Text = L"frm_splash_screen";
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void cmd_time_reached(System::Object^  sender, System::EventArgs^  e) 
			 {
				 Form1^ frm2 = gcnew Form1();
				 frm2->ShowDialog(this);
                                 this->Close();
			 }
	};
}


when i run this the splash screen never closes and it continues to open the Form1 form.

Any help is greatly appreciated.

- Kyle
GeneralRe: Splash Screen Window problem Pin
Christian Graus17-Aug-05 12:18
protectorChristian Graus17-Aug-05 12:18 
GeneralRe: Splash Screen Window problem Pin
gr8coaster32917-Aug-05 12:58
gr8coaster32917-Aug-05 12:58 
GeneralRe: Splash Screen Window problem Pin
Christian Graus17-Aug-05 13:14
protectorChristian Graus17-Aug-05 13:14 
GeneralRe: Splash Screen Window problem Pin
gr8coaster32917-Aug-05 13:47
gr8coaster32917-Aug-05 13:47 
GeneralRe: Splash Screen Window problem Pin
Christian Graus17-Aug-05 13:53
protectorChristian Graus17-Aug-05 13:53 
GeneralRe: Splash Screen Window problem Pin
Phil J Pearson17-Aug-05 23:51
Phil J Pearson17-Aug-05 23:51 
Questionhow can i close other running application in my application Pin
m.rastgar17-Aug-05 11:50
m.rastgar17-Aug-05 11:50 
AnswerRe: how can i close other running application in my application Pin
Christian Graus17-Aug-05 11:58
protectorChristian Graus17-Aug-05 11:58 
AnswerRe: how can i close other running application in my application Pin
Ravi Bhavnani17-Aug-05 17:16
professionalRavi Bhavnani17-Aug-05 17:16 
GeneralLooking to extract text from a Word Doc Pin
wjgaddis17-Aug-05 11:02
wjgaddis17-Aug-05 11:02 
GeneralNeed SOAP Information Pin
LighthouseJ17-Aug-05 10:53
LighthouseJ17-Aug-05 10:53 
GeneralRe: Need SOAP Information Pin
Christian Graus17-Aug-05 11:59
protectorChristian Graus17-Aug-05 11:59 
GeneralRe: Need SOAP Information Pin
LighthouseJ17-Aug-05 12:10
LighthouseJ17-Aug-05 12:10 
GeneralRe: Need SOAP Information Pin
Christian Graus17-Aug-05 12:14
protectorChristian Graus17-Aug-05 12:14 
GeneralRe: Need SOAP Information Pin
LighthouseJ17-Aug-05 12:31
LighthouseJ17-Aug-05 12:31 
QuestionHow to update CListCtrl when item is inserted Pin
Ian Bowler17-Aug-05 8:13
Ian Bowler17-Aug-05 8:13 
AnswerRe: How to update CListCtrl when item is inserted Pin
Maximilien17-Aug-05 8:36
Maximilien17-Aug-05 8:36 

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.