private SplashForm() { // ==================================================================================== // Setup the form // ==================================================================================== this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; // make form transparent this.TransparencyKey = this.BackColor; // tie up the events this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.Paint += new System.Windows.Forms.PaintEventHandler(this.SplashForm_Paint); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); // load and make the bitmap transparent if (m_bmp == null) { throw new Exception("Splash bitmap CAN'T be null."); } //--m_bmp.MakeTransparent(col); // resize the form to the size of the iamge this.Width = m_bmp.Width; this.Height = m_bmp.Height; // center the form this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; // thread handling m_delegateClose = new DelegateCloseSplash(InternalCloseSplash); }
public SplashForm(Bitmap bmpFile, Color col) { // ==================================================================================== // Setup the form // ==================================================================================== this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; // make form transparent this.TransparencyKey = this.BackColor; // tie up the events this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.Paint += new System.Windows.Forms.PaintEventHandler(this.SplashForm_Paint); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); // load and make the bitmap transparent m_bmp = bmpFile; if(m_bmp == null) throw new Exception("Failed to load the bitmap file"); // if(col != null) // m_bmp.MakeTransparent(col); // resize the form to the size of the iamge this.Width = m_bmp.Width; this.Height = m_bmp.Height; // center the form this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; // thread handling m_delegateClose = new DelegateCloseSplash(InternalCloseSplash); }
/// <summary> /// Formulario Splash que se encarga de mostrar la Imagen (TRANSPARENTE)de Inicio de la aplicación /// y Cargar los Assemblies que se cargan al Ejecutar la misma /// </summary> /// <param name="RutaArchivoImagen">Ruta del Archivo Imagen</param> /// <param name="ColorTransparencia">Color de Fondo que debe ser considerado Transparente en la Imagen a mostrar</param> public FSplashHilos(String RutaArchivoImagen, Color ColorTransparencia) { Debug.Assert(RutaArchivoImagen != null && RutaArchivoImagen.Length > 0, "A proporcinado una Directorio no Valido para el Cargado de la Imagen del Splash"); // ==================================================================================== // Configuramos el Formularios // ==================================================================================== this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; // Volvemos el Formularios Splash Transparente this.TransparencyKey = this.BackColor; // Enganchamos los Eventos this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.Paint += new System.Windows.Forms.PaintEventHandler(this.SplashForm_Paint); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); //Cargamos la Imagen en un BitMap y la volvemos Transparente Imagen_BitMap = new Bitmap(RutaArchivoImagen); if (Imagen_BitMap == null) { throw new Exception("No se Pudo Cargar el Archivo de Imagen " + RutaArchivoImagen); } Imagen_BitMap.MakeTransparent(ColorTransparencia); // Readecuamos el Tamaño del Formulario al Tamaño de la Imagen this.Width = Imagen_BitMap.Width; this.Height = Imagen_BitMap.Height; // Centramos el Formulario this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Cursor = System.Windows.Forms.Cursors.AppStarting; // Ejecutamos el Hilo de Ejecución Delegado_Cerrar_Splash = new DelegateCloseSplash(InternalCloseSplash); //para visualizar los assemblies lblLibrerias = new Label(); lblLibrerias.Location = new Point(25, 25); lblLibrerias.Size = new Size(new Point(100, 20)); lblLibrerias.BackColor = System.Drawing.Color.Transparent; lblLibrerias.AutoSize = true; this.Controls.Add(lblLibrerias); timerLibrerias = new System.Windows.Forms.Timer(); timerLibrerias.Enabled = true; timerLibrerias.Start(); timerLibrerias.Tick += new EventHandler(timerLibrerias_Tick); }
public SplashForm() { InitializeComponent(); // Setup the form this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; this.TransparencyKey = this.BackColor; this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; delegateClose = new DelegateCloseSplash(InternalCloseSplash); }
public SplashForm(Bitmap bmpFile, Color col, string strText, System.Drawing.Font fontText, PointF TextPos, System.Drawing.Color TextColor) { // ==================================================================================== // Setup the form // ==================================================================================== this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; // make form transparent this.TransparencyKey = this.BackColor; m_strText = strText; m_Font = fontText; m_TextPos = TextPos; m_TextColor = TextColor; // tie up the events this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.Paint += new System.Windows.Forms.PaintEventHandler(this.SplashForm_Paint); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); // load and make the bitmap transparent m_bmp = bmpFile; if (m_bmp == null) { throw new Exception("Failed to load the bitmap file"); } // if(col != null) // m_bmp.MakeTransparent(col); // resize the form to the size of the iamge this.Width = m_bmp.Width + 10; this.Height = m_bmp.Height + 10; // center the form this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; // thread handling m_delegateClose = new DelegateCloseSplash(InternalCloseSplash); }
public SplashForm(String imageFile, Color col) { Debug.Assert(imageFile != null && imageFile.Length > 0, "A valid file path has to be given"); // ==================================================================================== // Setup the form // ==================================================================================== this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; // make form transparent this.TransparencyKey = this.BackColor; // tie up the events this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SplashForm_KeyUp); this.Paint += new System.Windows.Forms.PaintEventHandler(this.SplashForm_Paint); this.MouseDown += new MouseEventHandler(SplashForm_MouseClick); // load and make the bitmap transparent m_bmp = new Bitmap(imageFile); if (m_bmp == null) { throw new Exception("Failed to load the bitmap file " + imageFile); } m_bmp.MakeTransparent(col); // resize the form to the size of the iamge this.Width = m_bmp.Width; this.Height = m_bmp.Height; // center the form this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; // thread handling m_delegateClose = new DelegateCloseSplash(InternalCloseSplash); }
public SplashWindow() { InitializeComponent(); m_delegateClose = new DelegateCloseSplash(InternalCloseSplash); }