Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Using Alpha in PNG to Make a Magic Card

, 12 Oct 2007
Trying to use PNG to make a magic card for your friend
magiccard.zip
magiccard_src.zip
MagicCard
bin
Release
MagicCard.exe
MagicCard.pdb
MagicCard.vshost.exe
icon.ico
MagicCard.csproj.user
Properties
Settings.settings
Resources
align.png
bw.png
execute.png
font.png
preview.png
reset.png
namespace MagicCard
{
    partial class FormMain
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (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()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
            this.panelControl = new System.Windows.Forms.Panel();
            this.groupBoxBackText = new System.Windows.Forms.GroupBox();
            this.textBoxBackText = new System.Windows.Forms.TextBox();
            this.groupBoxFrontText = new System.Windows.Forms.GroupBox();
            this.textBoxFrontText = new System.Windows.Forms.TextBox();
            this.buttonExportWeb = new System.Windows.Forms.Button();
            this.buttonExportImage = new System.Windows.Forms.Button();
            this.buttonGenerate = new System.Windows.Forms.Button();
            this.panelMain = new System.Windows.Forms.Panel();
            this.panelDisplay = new System.Windows.Forms.Panel();
            this.pictureBoxPreview = new System.Windows.Forms.PictureBox();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.toolStripButtonPreview = new System.Windows.Forms.ToolStripButton();
            this.toolStripButtonFont = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.toolStripButtonBW = new System.Windows.Forms.ToolStripButton();
            this.toolStripButtonReset = new System.Windows.Forms.ToolStripButton();
            this.timerPreview = new System.Windows.Forms.Timer(this.components);
            this.fontDialogText = new System.Windows.Forms.FontDialog();
            this.saveFileDialogImage = new System.Windows.Forms.SaveFileDialog();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            this.saveFileDialogExecute = new System.Windows.Forms.SaveFileDialog();
            this.panelControl.SuspendLayout();
            this.groupBoxBackText.SuspendLayout();
            this.groupBoxFrontText.SuspendLayout();
            this.panelMain.SuspendLayout();
            this.panelDisplay.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).BeginInit();
            this.toolStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // panelControl
            // 
            this.panelControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.panelControl.Controls.Add(this.groupBoxBackText);
            this.panelControl.Controls.Add(this.groupBoxFrontText);
            this.panelControl.Controls.Add(this.buttonExportWeb);
            this.panelControl.Controls.Add(this.buttonExportImage);
            this.panelControl.Controls.Add(this.buttonGenerate);
            this.panelControl.Location = new System.Drawing.Point(13, 13);
            this.panelControl.Name = "panelControl";
            this.panelControl.Size = new System.Drawing.Size(200, 559);
            this.panelControl.TabIndex = 0;
            // 
            // groupBoxBackText
            // 
            this.groupBoxBackText.Controls.Add(this.textBoxBackText);
            this.groupBoxBackText.ForeColor = System.Drawing.Color.Silver;
            this.groupBoxBackText.Location = new System.Drawing.Point(4, 164);
            this.groupBoxBackText.Name = "groupBoxBackText";
            this.groupBoxBackText.Size = new System.Drawing.Size(193, 152);
            this.groupBoxBackText.TabIndex = 8;
            this.groupBoxBackText.TabStop = false;
            this.groupBoxBackText.Text = "Back Text";
            // 
            // textBoxBackText
            // 
            this.textBoxBackText.Location = new System.Drawing.Point(6, 19);
            this.textBoxBackText.Multiline = true;
            this.textBoxBackText.Name = "textBoxBackText";
            this.textBoxBackText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.textBoxBackText.Size = new System.Drawing.Size(181, 127);
            this.textBoxBackText.TabIndex = 0;
            this.textBoxBackText.Text = "Hello World";
            // 
            // groupBoxFrontText
            // 
            this.groupBoxFrontText.Controls.Add(this.textBoxFrontText);
            this.groupBoxFrontText.ForeColor = System.Drawing.Color.Silver;
            this.groupBoxFrontText.Location = new System.Drawing.Point(3, 3);
            this.groupBoxFrontText.Name = "groupBoxFrontText";
            this.groupBoxFrontText.Size = new System.Drawing.Size(194, 154);
            this.groupBoxFrontText.TabIndex = 7;
            this.groupBoxFrontText.TabStop = false;
            this.groupBoxFrontText.Text = "Front Text";
            // 
            // textBoxFrontText
            // 
            this.textBoxFrontText.Location = new System.Drawing.Point(6, 19);
            this.textBoxFrontText.Multiline = true;
            this.textBoxFrontText.Name = "textBoxFrontText";
            this.textBoxFrontText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.textBoxFrontText.Size = new System.Drawing.Size(182, 129);
            this.textBoxFrontText.TabIndex = 0;
            this.textBoxFrontText.Text = "This is a test";
            // 
            // buttonExportWeb
            // 
            this.buttonExportWeb.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.buttonExportWeb.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            this.buttonExportWeb.Location = new System.Drawing.Point(83, 361);
            this.buttonExportWeb.Name = "buttonExportWeb";
            this.buttonExportWeb.Size = new System.Drawing.Size(114, 33);
            this.buttonExportWeb.TabIndex = 2;
            this.buttonExportWeb.Text = "Export HTML";
            this.buttonExportWeb.UseVisualStyleBackColor = true;
            this.buttonExportWeb.Click += new System.EventHandler(this.buttonExportWeb_Click);
            // 
            // buttonExportImage
            // 
            this.buttonExportImage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.buttonExportImage.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            this.buttonExportImage.Location = new System.Drawing.Point(83, 322);
            this.buttonExportImage.Name = "buttonExportImage";
            this.buttonExportImage.Size = new System.Drawing.Size(114, 33);
            this.buttonExportImage.TabIndex = 1;
            this.buttonExportImage.Text = "Export Image";
            this.buttonExportImage.UseVisualStyleBackColor = true;
            this.buttonExportImage.Click += new System.EventHandler(this.buttonExportImage_Click);
            // 
            // buttonGenerate
            // 
            this.buttonGenerate.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.buttonGenerate.Image = global::MagicCard.Properties.Resources.execute;
            this.buttonGenerate.Location = new System.Drawing.Point(3, 322);
            this.buttonGenerate.Name = "buttonGenerate";
            this.buttonGenerate.Size = new System.Drawing.Size(74, 72);
            this.buttonGenerate.TabIndex = 0;
            this.buttonGenerate.Text = "Generate";
            this.buttonGenerate.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.buttonGenerate.UseVisualStyleBackColor = true;
            this.buttonGenerate.Click += new System.EventHandler(this.buttonGenerate_Click);
            // 
            // panelMain
            // 
            this.panelMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.panelMain.BackColor = System.Drawing.Color.DarkGray;
            this.panelMain.Controls.Add(this.panelDisplay);
            this.panelMain.Controls.Add(this.toolStrip1);
            this.panelMain.ForeColor = System.Drawing.Color.Black;
            this.panelMain.Location = new System.Drawing.Point(220, 13);
            this.panelMain.Name = "panelMain";
            this.panelMain.Size = new System.Drawing.Size(640, 559);
            this.panelMain.TabIndex = 1;
            // 
            // panelDisplay
            // 
            this.panelDisplay.Controls.Add(this.pictureBoxPreview);
            this.panelDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panelDisplay.Location = new System.Drawing.Point(0, 79);
            this.panelDisplay.Name = "panelDisplay";
            this.panelDisplay.Size = new System.Drawing.Size(640, 480);
            this.panelDisplay.TabIndex = 2;
            // 
            // pictureBoxPreview
            // 
            this.pictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pictureBoxPreview.Location = new System.Drawing.Point(0, 0);
            this.pictureBoxPreview.Name = "pictureBoxPreview";
            this.pictureBoxPreview.Size = new System.Drawing.Size(640, 480);
            this.pictureBoxPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
            this.pictureBoxPreview.TabIndex = 1;
            this.pictureBoxPreview.TabStop = false;
            // 
            // toolStrip1
            // 
            this.toolStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButtonPreview,
            this.toolStripButtonFont,
            this.toolStripSeparator1,
            this.toolStripButtonBW,
            this.toolStripButtonReset});
            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
            this.toolStrip1.Margin = new System.Windows.Forms.Padding(3);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(640, 79);
            this.toolStrip1.TabIndex = 1;
            this.toolStrip1.Text = "toolStrip1";
            // 
            // toolStripButtonPreview
            // 
            this.toolStripButtonPreview.Image = global::MagicCard.Properties.Resources.preview;
            this.toolStripButtonPreview.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.toolStripButtonPreview.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonPreview.Margin = new System.Windows.Forms.Padding(3);
            this.toolStripButtonPreview.Name = "toolStripButtonPreview";
            this.toolStripButtonPreview.Padding = new System.Windows.Forms.Padding(4);
            this.toolStripButtonPreview.Size = new System.Drawing.Size(60, 73);
            this.toolStripButtonPreview.Text = "Preview";
            this.toolStripButtonPreview.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.toolStripButtonPreview.Click += new System.EventHandler(this.toolStripButtonPreview_Click);
            // 
            // toolStripButtonFont
            // 
            this.toolStripButtonFont.Image = global::MagicCard.Properties.Resources.font;
            this.toolStripButtonFont.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.toolStripButtonFont.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonFont.Margin = new System.Windows.Forms.Padding(3);
            this.toolStripButtonFont.Name = "toolStripButtonFont";
            this.toolStripButtonFont.Padding = new System.Windows.Forms.Padding(4);
            this.toolStripButtonFont.Size = new System.Drawing.Size(60, 73);
            this.toolStripButtonFont.Text = "Font";
            this.toolStripButtonFont.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.toolStripButtonFont.Click += new System.EventHandler(this.toolStripButtonFont_Click);
            // 
            // toolStripSeparator1
            // 
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 79);
            // 
            // toolStripButtonBW
            // 
            this.toolStripButtonBW.Image = global::MagicCard.Properties.Resources.bw;
            this.toolStripButtonBW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.toolStripButtonBW.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonBW.Margin = new System.Windows.Forms.Padding(3);
            this.toolStripButtonBW.Name = "toolStripButtonBW";
            this.toolStripButtonBW.Padding = new System.Windows.Forms.Padding(4);
            this.toolStripButtonBW.Size = new System.Drawing.Size(60, 73);
            this.toolStripButtonBW.Text = "B/W";
            this.toolStripButtonBW.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.toolStripButtonBW.Click += new System.EventHandler(this.toolStripButtonBW_Click);
            // 
            // toolStripButtonReset
            // 
            this.toolStripButtonReset.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.toolStripButtonReset.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonReset.Image")));
            this.toolStripButtonReset.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.toolStripButtonReset.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonReset.Margin = new System.Windows.Forms.Padding(3);
            this.toolStripButtonReset.Name = "toolStripButtonReset";
            this.toolStripButtonReset.Padding = new System.Windows.Forms.Padding(4);
            this.toolStripButtonReset.Size = new System.Drawing.Size(60, 73);
            this.toolStripButtonReset.Text = "Reset";
            this.toolStripButtonReset.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.toolStripButtonReset.Click += new System.EventHandler(this.toolStripButtonReset_Click);
            // 
            // timerPreview
            // 
            this.timerPreview.Interval = 50;
            this.timerPreview.Tick += new System.EventHandler(this.timerPreview_Tick);
            // 
            // fontDialogText
            // 
            this.fontDialogText.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            // 
            // saveFileDialogImage
            // 
            this.saveFileDialogImage.Filter = "PNG|*.PNG";
            // 
            // saveFileDialogExecute
            // 
            this.saveFileDialogExecute.Filter = "Application|*.EXE";
            // 
            // FormMain
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.Black;
            this.ClientSize = new System.Drawing.Size(872, 584);
            this.Controls.Add(this.panelMain);
            this.Controls.Add(this.panelControl);
            this.ForeColor = System.Drawing.Color.Silver;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "FormMain";
            this.Text = "Magic Card";
            this.panelControl.ResumeLayout(false);
            this.groupBoxBackText.ResumeLayout(false);
            this.groupBoxBackText.PerformLayout();
            this.groupBoxFrontText.ResumeLayout(false);
            this.groupBoxFrontText.PerformLayout();
            this.panelMain.ResumeLayout(false);
            this.panelMain.PerformLayout();
            this.panelDisplay.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).EndInit();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Panel panelControl;
        private System.Windows.Forms.Button buttonGenerate;
        private System.Windows.Forms.Panel panelMain;
        private System.Windows.Forms.Button buttonExportImage;
        private System.Windows.Forms.Button buttonExportWeb;
        private System.Windows.Forms.Timer timerPreview;
        private System.Windows.Forms.GroupBox groupBoxFrontText;
        private System.Windows.Forms.GroupBox groupBoxBackText;
        private System.Windows.Forms.TextBox textBoxBackText;
        private System.Windows.Forms.TextBox textBoxFrontText;
        private System.Windows.Forms.FontDialog fontDialogText;
        private System.Windows.Forms.ToolStrip toolStrip1;
        private System.Windows.Forms.ToolStripButton toolStripButtonPreview;
        private System.Windows.Forms.ToolStripButton toolStripButtonFont;
        private System.Windows.Forms.ToolStripButton toolStripButtonBW;
        private System.Windows.Forms.Panel panelDisplay;
        private System.Windows.Forms.PictureBox pictureBoxPreview;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripButton toolStripButtonReset;
        private System.Windows.Forms.SaveFileDialog saveFileDialogImage;
        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
        private System.Windows.Forms.SaveFileDialog saveFileDialogExecute;

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jacky Yiu
Architect MouxIdea Limited
Hong Kong Hong Kong
1981 Born in Hong Kong
1996 Become Badminton Trainer
1997 Hong Kong's Return to China
1998 The Year After Hong Kong's Return to China
1999 The Year Before Millennium
2000 First touch of programming - ASP(guestbook)
2001 Outstanding Student Award - Computing Department
2002 Xcellence Developer Awards - Best Graphical Focused Application(Game) Award
2003 Microsoft MVP - .NET
2004 Be lost in Technology
2005 Microsoft MVP - C#
2006 Microsoft MVP - C#
2007 Getting Marry - Cheers~
2008 Microsoft MVP - C#
2009 Microsoft MVP - C#
2010 Microsoft MVP - C#
2011 Start my software hut
 
http://www.csharpfans.com


http://www.bugyiu.com


http://www.mouxidea.com

| Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 12 Oct 2007
Article Copyright 2007 by Jacky Yiu
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid