计算机充电网
 


  一个图片按钮类  
编辑:网络小飞  来源:我的回收站  发表时间:2007-11-22  被查阅【】次<% Else %><% End If %>
Google

picButton.cs文件

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Streamsea.Properties;

namespace Streamsea.Forms
{
    /**//// <summary>
    /// 图片按钮
    /// </summary>
    public partial class ucPictureButton : UserControl
    {
        private bool bPressed;
        private Image pressImg;
        private Image backImg;
        private Image disableImg;

        private Image m_img;
        private PictureBoxSizeMode m_sizemode = PictureBoxSizeMode.StretchImage;

        /**//// <summary>
        /// 构造函数
        /// </summary>
        public ucPictureButton()
        {
            base.Font = new Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
        }

        private Size _GetPreferredSize()
        {
            if (this.m_img == null)
            {
                return base.Size;
            }
            return this.m_img.Size;
        }

        private Rectangle _ImageRectangle
        {
            get
            {
                Rectangle rectangle1 = new Rectangle(0, 0, 0, 0);
                if (this.m_img != null)
                {
                    switch (this.m_sizemode)
                    {
                        case PictureBoxSizeMode.Normal:
                            rectangle1.Size = this.m_img.Size;
                            return rectangle1;

                        case PictureBoxSizeMode.StretchImage:
                            rectangle1.Size = base.ClientSize;
                            return rectangle1;

                        case ((PictureBoxSizeMode)2):
                            return rectangle1;

                        case PictureBox

[1[2] [3] [4] [5] 

返回顶部】【 】【关闭窗口
  上篇文章:在.NET CF下实现Web Service压缩传输   下篇文章:利用C#编写WebService进行多线程上传
计算机充电网 为您服务 关于本站 免责声明 法律法规 网址之家 便民查询 本站地图
 
Copyright © 72598.COM All Rights Reserved. 
E-mail:admin@72598.com QQ:360107618
粤ICP备06034384号