2005/Jun/03






using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;

namespace dotNet
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1;

private Splash splash;
private System.ComponentModel.Container components = null;

public Form1()
{
InitializeComponent();

String swfPath = Directory.GetCurrentDirectory() +
Path.DirectorySeparatorChar + "menubar.swf";

this.axShockwaveFlash1.EmbedMovie = true;
this.axShockwaveFlash1.Movie = swfPath;


}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#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>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();
this.splash = new dotNet.Splash();
((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).BeginInit();
this.SuspendLayout();
//
// axShockwaveFlash1
//
this.axShockwaveFlash1.Dock = System.Windows.Forms.DockStyle.Fill;
this.axShockwaveFlash1.Enabled = true;
this.axShockwaveFlash1.Name = "axShockwaveFlash1";
this.axShockwaveFlash1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axShockwaveFlash1.OcxState")));
this.axShockwaveFlash1.Size = new System.Drawing.Size(488, 322);
this.axShockwaveFlash1.TabIndex = 0;
this.axShockwaveFlash1.FSCommand += new AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEventHandler(this.FlashFSCommand);
//
// splash
//
this.splash.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.splash.ClientSize = new System.Drawing.Size(300, 150);
this.splash.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.splash.Icon = ((System.Drawing.Icon)(resources.GetObject("splash.Icon")));
this.splash.Location = new System.Drawing.Point(360, 320);
this.splash.MaximumSize = new System.Drawing.Size(0, 0);
this.splash.MinimumSize = new System.Drawing.Size(0, 0);
this.splash.Name = "splash";
this.splash.Opacity = 1;
this.splash.ShowInTaskbar = false;
this.splash.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.splash.Text = "Splash";
this.splash.TopMost = true;
this.splash.Visible = false;
this.splash.VisibleChanged += new System.EventHandler(this.splash_VisibleChanged);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(488, 322);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.axShockwaveFlash1});
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private const int WM_MOUSEACTIVATE = 0x0021;
private const int HTCAPTION= 0x2;
protected override void WndProc(ref Message m)
{
if(m.Msg == WM_MOUSEACTIVATE)
{
if(m.LParam.ToInt32()==0x2040001)
{
m.Result = new IntPtr(HTCAPTION);
}
}
else
base.WndProc(ref m);

}

private void FlashFSCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
switch (e.command)
{
case "quit":
Application.Exit();
break;
case "about":
splash.Show();
this.Enabled = false;
break;
default:
break;
}
}

private void splash_VisibleChanged(object sender, System.EventArgs e)
{
if(this.splash.Visible == false)
this.Enabled = true;

}
}
}



ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
ให้ความรู้ดีจังคับ ขอบคุณคับ
#2  by   (217.91.102.4) At 2005-10-18 15:06, 
good.i like it
#3  by  yi (218.76.21.141) At 2005-10-19 09:48, 
Something is wrong ... doesn't work for me... all the time says SPLASH doesn't exist, or dotNET doesn't exist...should I have to something before run ??
#4  by  Gabriel (200.40.171.114) At 2005-11-02 01:52, 
Something is wrong ... doesn't work for me... all the time says SPLASH doesn't exist, or dotNET doesn't exist...should I have to something before run ??
#5  by  Gabriel (200.40.171.114) At 2005-11-02 01:52, 
SDFSDFSDF SDFSDFSDFSDFSDF SDF
#6  by   (200.105.229.170 /192.168.0.49) At 2006-05-12 22:08, 
SDFSDFSDF SDFSDFSDFSDFSDF SDF
#7  by   (200.105.229.170 /192.168.0.49) At 2006-05-12 22:10, 
0e072de3dc2b89f8f5c1 8953d290
#8  by   (63.99.92.8 /unknown) At 2006-09-30 09:52, 
Can some 1 write the URL to download the activeX required for the flash object to be added? plz help
#9  by   (196.218.31.244) At 2006-12-19 21:57, 
#10  by   (202.164.134.37) At 2007-01-31 11:37, 

<< Home