我的编程空间,编程开发者的网络收藏夹
学习永远不晚

C#实现屏幕抓图并保存的示例代码

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

C#实现屏幕抓图并保存的示例代码

实践过程

效果

代码

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private int _X, _Y;

    [StructLayout(LayoutKind.Sequential)]
    private struct ICONINFO
    {
        public bool fIcon;
        public Int32 xHotspot;
        public Int32 yHotspot;
        public IntPtr hbmMask;
        public IntPtr hbmColor;
    }

    [StructLayout(LayoutKind.Sequential)]
    private struct CURSORINFO
    {
        public Int32 cbSize;
        public Int32 flags;
        public IntPtr hCursor;
        public Point ptScreenPos;
    }

    [DllImport("user32.dll", EntryPoint = "GetSystemMetrics")]
    private static extern int GetSystemMetrics(int mVal);

    [DllImport("user32.dll", EntryPoint = "GetCursorInfo")]
    private static extern bool GetCursorInfo(ref CURSORINFO cInfo);

    [DllImport("user32.dll", EntryPoint = "CopyIcon")]
    private static extern IntPtr CopyIcon(IntPtr hIcon);

    [DllImport("user32.dll", EntryPoint = "GetIconInfo")]
    private static extern bool GetIconInfo(IntPtr hIcon, out ICONINFO iInfo);

    [DllImport("kernel32")]
    private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);

    [DllImport("kernel32")]
    private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval,
        int size, string filePath);

    #region 定义快捷键

    //如果函数执行成功,返回值不为0。       
    //如果函数执行失败,返回值为0。要得到扩展错误信息,调用GetLastError。        
    [DllImport("user32.dll", SetLastError = true)]
    public static extern bool RegisterHotKey(
        IntPtr hWnd, //要定义热键的窗口的句柄            
        int id, //定义热键ID(不能与其它ID重复)                       
        KeyModifiers fsModifiers, //标识热键是否在按Alt、Ctrl、Shift、Windows等键时才会生效         
        Keys vk //定义热键的内容            
    );

    [DllImport("user32.dll", SetLastError = true)]
    public static extern bool UnregisterHotKey(
        IntPtr hWnd, //要取消热键的窗口的句柄            
        int id //要取消热键的ID            
    );

    //定义了辅助键的名称(将数字转变为字符以便于记忆,也可去除此枚举而直接使用数值)        
    [Flags()]
    public enum KeyModifiers
    {
        None = 0,
        Alt = 1,
        Ctrl = 2,
        Shift = 4,
        WindowsKey = 8
    }

    #endregion

    public string path;

    public void IniWriteValue(string section, string key, string value)
    {
        WritePrivateProfileString(section, key, value, path);
    }

    public string IniReadValue(string section, string key)
    {
        StringBuilder temp = new StringBuilder(255);
        int i = GetPrivateProfileString(section, key, "", temp, 255, path);
        return temp.ToString();
    }

    private Bitmap CaptureNoCursor() //抓取没有鼠标的桌面
    {
        Bitmap _Source = new Bitmap(GetSystemMetrics(0), GetSystemMetrics(1));
        using (Graphics g = Graphics.FromImage(_Source))
        {
            g.CopyFromScreen(0, 0, 0, 0, _Source.Size);
            g.Dispose();
        }

        return _Source;
    }


    private Bitmap CaptureDesktop() //抓取带鼠标的桌面
    {
        try
        {
            int _CX = 0, _CY = 0;
            Bitmap _Source = new Bitmap(GetSystemMetrics(0), GetSystemMetrics(1));
            using (Graphics g = Graphics.FromImage(_Source))
            {
                g.CopyFromScreen(0, 0, 0, 0, _Source.Size);
                g.DrawImage(CaptureCursor(ref _CX, ref _CY), _CX, _CY);
                g.Dispose();
            }

            _X = (800 - _Source.Width) / 2;
            _Y = (600 - _Source.Height) / 2;
            return _Source;
        }
        catch
        {
            return null;
        }
    }

    private Bitmap CaptureCursor(ref int _CX, ref int _CY)
    {
        IntPtr _Icon;
        CURSORINFO _CursorInfo = new CURSORINFO();
        ICONINFO _IconInfo;
        _CursorInfo.cbSize = Marshal.SizeOf(_CursorInfo);
        if (GetCursorInfo(ref _CursorInfo))
        {
            if (_CursorInfo.flags == 0x00000001)
            {
                _Icon = CopyIcon(_CursorInfo.hCursor);

                if (GetIconInfo(_Icon, out _IconInfo))
                {
                    _CX = _CursorInfo.ptScreenPos.X - _IconInfo.xHotspot;
                    _CY = _CursorInfo.ptScreenPos.Y - _IconInfo.yHotspot;
                    return Icon.FromHandle(_Icon).ToBitmap();
                }
            }
        }

        return null;
    }

    string Cursor;
    string PicPath;

    private void button1_Click(object sender, EventArgs e)
    {
        try
        {
            path = Application.StartupPath.ToString();
            path = path.Substring(0, path.LastIndexOf("\\"));
            path = path.Substring(0, path.LastIndexOf("\\"));
            path += @"\Setup.ini";
            if (checkBox1.Checked == true)
            {
                Cursor = "1";
            }
            else
            {
                Cursor = "0";
            }

            if (txtSavaPath.Text == "")
            {
                PicPath = @"D:\";
            }
            else
            {
                PicPath = txtSavaPath.Text.Trim();
            }

            IniWriteValue("Setup", "CapMouse", Cursor);
            IniWriteValue("Setup", "Dir", PicPath);
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
    }

    private void button2_Click(object sender, EventArgs e)
    {
        this.Hide();
    }

    private void button3_Click(object sender, EventArgs e)
    {
        if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
        {
            txtSavaPath.Text = folderBrowserDialog1.SelectedPath;
        }
    }

    private void Form1_StyleChanged(object sender, EventArgs e)
    {
        RegisterHotKey(Handle, 81, KeyModifiers.Shift, Keys.F);
    }

    public bool flag = true;

    private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        //注销Id号为81的热键设定    
        UnregisterHotKey(Handle, 81);
        timer1.Stop();
        flag = false;
        Application.Exit();
    }

    string MyCursor;
    string MyPicPath;

    private void Form1_Activated(object sender, EventArgs e)
    {
        RegisterHotKey(Handle, 81, KeyModifiers.Shift, Keys.F);
        path = Application.StartupPath.ToString();
        path = path.Substring(0, path.LastIndexOf("\\"));
        path = path.Substring(0, path.LastIndexOf("\\"));
        path += @"\Setup.ini";
        MyCursor = IniReadValue("Setup", "CapMouse");
        MyPicPath = IniReadValue("Setup", "Dir");
        if (MyCursor == "" || MyPicPath == "")
        {
            checkBox1.Checked = true;
            txtSavaPath.Text = @"D:\";
        }
        else
        {
            if (MyCursor == "1")
            {
                checkBox1.Checked = true;
            }
            else
            {
                checkBox1.Checked = false;
            }

            txtSavaPath.Text = MyPicPath;
        }
    }

    private void getImg()
    {
        DirectoryInfo di = new DirectoryInfo(MyPicPath);
        if (!di.Exists)
        {
            Directory.CreateDirectory(MyPicPath);
        }

        if (MyPicPath.Length == 3)
            MyPicPath = MyPicPath.Remove(MyPicPath.LastIndexOf(":") + 1);
        string PicPath = MyPicPath + "\\IMG_" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
                         DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() +
                         DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".bmp";
        Bitmap bt;
        if (MyCursor == "0")
        {
            bt = CaptureNoCursor();
            bt.Save(PicPath);
        }
        else
        {
            bt = CaptureDesktop();
            bt.Save(PicPath);
        }
    }

    protected override void WndProc(ref Message m)
    {
        const int WM_HOTKEY = 0x0312;
        //按快捷键     
        switch (m.Msg)
        {
            case WM_HOTKEY:
                switch (m.WParam.ToInt32())
                {
                    case 81: //按下的是Shift+Q                   
                        getImg();
                        break;
                }

                break;
        }

        base.WndProc(ref m);
    }

    private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) //双击显示设置窗体
    {
        this.Show();
    }

    private void 设置ToolStripMenuItem_Click(object sender, EventArgs e) //单击设置打开设置窗体
    {
        this.Show();
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        RegisterHotKey(Handle, 81, KeyModifiers.Shift, Keys.F);
    }

    private void Form1_FormClosing(object sender, FormClosingEventArgs e)
    {
        this.Hide();
        if (flag == true)
        {
            e.Cancel = true;
        }
    }

    private void Form1_Load(object sender, EventArgs e)
    {
    }
}
partial class Form1
{
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows 窗体设计器生成的代码

    /// <summary>
    /// 设计器支持所需的方法 - 不要
    /// 使用代码编辑器修改此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
        this.components = new System.ComponentModel.Container();
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
        this.button1 = new System.Windows.Forms.Button();
        this.button2 = new System.Windows.Forms.Button();
        this.groupBox1 = new System.Windows.Forms.GroupBox();
        this.button3 = new System.Windows.Forms.Button();
        this.txtSavaPath = new System.Windows.Forms.TextBox();
        this.label1 = new System.Windows.Forms.Label();
        this.checkBox1 = new System.Windows.Forms.CheckBox();
        this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
        this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
        this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
        this.设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.timer1 = new System.Windows.Forms.Timer(this.components);
        this.groupBox1.SuspendLayout();
        this.contextMenuStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // button1
        // 
        this.button1.Location = new System.Drawing.Point(82, 91);
        this.button1.Name = "button1";
        this.button1.Size = new System.Drawing.Size(75, 23);
        this.button1.TabIndex = 2;
        this.button1.Text = "保存设置";
        this.button1.UseVisualStyleBackColor = true;
        this.button1.Click += new System.EventHandler(this.button1_Click);
        // 
        // button2
        // 
        this.button2.Location = new System.Drawing.Point(163, 91);
        this.button2.Name = "button2";
        this.button2.Size = new System.Drawing.Size(75, 23);
        this.button2.TabIndex = 3;
        this.button2.Text = "关闭";
        this.button2.UseVisualStyleBackColor = true;
        this.button2.Click += new System.EventHandler(this.button2_Click);
        // 
        // groupBox1
        // 
        this.groupBox1.Controls.Add(this.button3);
        this.groupBox1.Controls.Add(this.txtSavaPath);
        this.groupBox1.Controls.Add(this.label1);
        this.groupBox1.Controls.Add(this.checkBox1);
        this.groupBox1.Location = new System.Drawing.Point(13, 14);
        this.groupBox1.Name = "groupBox1";
        this.groupBox1.Size = new System.Drawing.Size(301, 71);
        this.groupBox1.TabIndex = 5;
        this.groupBox1.TabStop = false;
        this.groupBox1.Text = "功能设置";
        // 
        // button3
        // 
        this.button3.Location = new System.Drawing.Point(257, 42);
        this.button3.Name = "button3";
        this.button3.Size = new System.Drawing.Size(35, 23);
        this.button3.TabIndex = 3;
        this.button3.Text = "...";
        this.button3.UseVisualStyleBackColor = true;
        this.button3.Click += new System.EventHandler(this.button3_Click);
        // 
        // txtSavaPath
        // 
        this.txtSavaPath.BackColor = System.Drawing.Color.White;
        this.txtSavaPath.Location = new System.Drawing.Point(69, 44);
        this.txtSavaPath.Name = "txtSavaPath";
        this.txtSavaPath.ReadOnly = true;
        this.txtSavaPath.Size = new System.Drawing.Size(182, 21);
        this.txtSavaPath.TabIndex = 2;
        // 
        // label1
        // 
        this.label1.AutoSize = true;
        this.label1.Location = new System.Drawing.Point(9, 49);
        this.label1.Name = "label1";
        this.label1.Size = new System.Drawing.Size(65, 12);
        this.label1.TabIndex = 1;
        this.label1.Text = "存放目录:";
        // 
        // checkBox1
        // 
        this.checkBox1.AutoSize = true;
        this.checkBox1.Location = new System.Drawing.Point(11, 20);
        this.checkBox1.Name = "checkBox1";
        this.checkBox1.Size = new System.Drawing.Size(198, 16);
        this.checkBox1.TabIndex = 0;
        this.checkBox1.Text = "抓取鼠标(抓图快捷键为Shift+F)";
        this.checkBox1.UseVisualStyleBackColor = true;
        // 
        // notifyIcon1
        // 
        this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
        this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
        this.notifyIcon1.Text = "啸天屏幕抓图";
        this.notifyIcon1.Visible = true;
        this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
        // 
        // contextMenuStrip1
        // 
        this.contextMenuStrip1.AutoSize = false;
        this.contextMenuStrip1.BackColor = System.Drawing.Color.White;
        this.contextMenuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
        this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.设置ToolStripMenuItem,
        this.退出ToolStripMenuItem});
        this.contextMenuStrip1.Name = "contextMenuStrip1";
        this.contextMenuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
        this.contextMenuStrip1.ShowImageMargin = false;
        this.contextMenuStrip1.ShowItemToolTips = false;
        this.contextMenuStrip1.Size = new System.Drawing.Size(50, 55);
        // 
        // 设置ToolStripMenuItem
        // 
        this.设置ToolStripMenuItem.AutoSize = false;
        this.设置ToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.设置ToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
        this.设置ToolStripMenuItem.Name = "设置ToolStripMenuItem";
        this.设置ToolStripMenuItem.Size = new System.Drawing.Size(50, 22);
        this.设置ToolStripMenuItem.Text = "设置";
        this.设置ToolStripMenuItem.Click += new System.EventHandler(this.设置ToolStripMenuItem_Click);
        // 
        // 退出ToolStripMenuItem
        // 
        this.退出ToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.退出ToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
        this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
        this.退出ToolStripMenuItem.Size = new System.Drawing.Size(69, 22);
        this.退出ToolStripMenuItem.Text = "退出";
        this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
        // 
        // timer1
        // 
        this.timer1.Enabled = true;
        this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(326, 123);
        this.Controls.Add(this.groupBox1);
        this.Controls.Add(this.button1);
        this.Controls.Add(this.button2);
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
        this.MaximizeBox = false;
        this.MinimizeBox = false;
        this.Name = "Form1";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "屏幕抓图";
        this.StyleChanged += new System.EventHandler(this.Form1_StyleChanged);
        this.Load += new System.EventHandler(this.Form1_Load);
        this.Activated += new System.EventHandler(this.Form1_Activated);
        this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
        this.groupBox1.ResumeLayout(false);
        this.groupBox1.PerformLayout();
        this.contextMenuStrip1.ResumeLayout(false);
        this.ResumeLayout(false);

    }

    #endregion

    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Button button2;
    private System.Windows.Forms.GroupBox groupBox1;
    private System.Windows.Forms.TextBox txtSavaPath;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.CheckBox checkBox1;
    private System.Windows.Forms.Button button3;
    private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
    private System.Windows.Forms.NotifyIcon notifyIcon1;
    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 设置ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
    private System.Windows.Forms.Timer timer1;
}

到此这篇关于C#实现屏幕抓图并保存的示例代码的文章就介绍到这了,更多相关C#屏幕抓图内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

C#实现屏幕抓图并保存的示例代码

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

C#实现屏幕抓图并保存的示例代码

这篇文章主要为大家详细介绍了如何利用C#实现屏幕抓图并保存的功能,文中的示例代码讲解详细,对我们学习C#有一定的帮助,感兴趣的小伙伴可以了解一下
2022-12-09

C#实现自定义屏保的示例代码

这篇文章主要为大家详细介绍了如何利用C#实现自定义屏保的功能,文中的示例代码讲解详细,对我们学习C#有一定的帮助,感兴趣的小伙伴可以跟随小编一起了解一下
2022-12-31

Android截屏保存png图片的实例代码

代码如下:import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException; import android.app
2022-06-06

android屏幕圆角实现方法的示例代码

现在很多全面屏手机的屏幕四角做成圆的,其圆润的感觉给人带来别样的视觉体验。先来一张我大锤子镇楼(不是广告呀,锤子没给钱),大家来直观感受一下圆角的魅力。锤子.jpg当然这种是硬件上实现的,我怀疑也是方的显示屏,然后做了个圆角遮蔽。那对于我们
2023-05-30

Android画图并保存图片的具体实现代码

Canvas是一个画布,你可以建立一个空白的画布,就直接new一个Canvas对象,不需要参数。也可以先使用BitmapFactory创建一个Bitmap对象,作为新的Canvas对象的参数,也就是说这个画布不是空白的,如果你想保存图片的话
2022-06-06

IOS 屏幕适配方案实现缩放window的示例代码

背景:公司有个iPad项目(只支持横屏),是11年开发的,那时的iPad只有1024x768的分辨率,所以没有屏幕适配的问题,frame都是写死的。后来不同尺寸的iPad相继出现,本来应该会出现屏幕不能适配的问题,但是由于该项目没有设置启动
2022-05-20

如何分析C++实现功能齐全的屏幕截图示例

如何分析C++实现功能齐全的屏幕截图示例,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。屏幕截图已经成为了所有IM即时通讯软件的必备模块,也是日常办公中使用最频繁
2023-06-25

Android实现文件存储并读取的示例代码

要求: 输入文件名,文件内容分别存储在手机内存和外存中,并且都可以读去取出来。 步骤: 1.创建一个名为CDsaveFile的Android项目 2.编写布局文件activity_main.xml:
2022-06-06

C#实现图片轮播功能的示例代码

这篇文章主要为大家详细介绍了如何利用C#实现图片轮播功能,文中的示例代码讲解详细,对我们学习C#有一定的帮助,感兴趣的小伙伴可以跟随小编一起了解一下
2022-12-19

C++实现对RGB图片进行编码的示例代码

这篇文章主要为大家详细介绍了如何利用得到的RGB信息重新对RGB图片进行编码,以及对其他图片如BMP所得到的RGB信息进行编码从而得到*.jpg文件,感兴趣的可以了解一下
2023-05-19

编程热搜

  • Python 学习之路 - Python
    一、安装Python34Windows在Python官网(https://www.python.org/downloads/)下载安装包并安装。Python的默认安装路径是:C:\Python34配置环境变量:【右键计算机】--》【属性】-
    Python 学习之路 - Python
  • chatgpt的中文全称是什么
    chatgpt的中文全称是生成型预训练变换模型。ChatGPT是什么ChatGPT是美国人工智能研究实验室OpenAI开发的一种全新聊天机器人模型,它能够通过学习和理解人类的语言来进行对话,还能根据聊天的上下文进行互动,并协助人类完成一系列
    chatgpt的中文全称是什么
  • C/C++中extern函数使用详解
  • C/C++可变参数的使用
    可变参数的使用方法远远不止以下几种,不过在C,C++中使用可变参数时要小心,在使用printf()等函数时传入的参数个数一定不能比前面的格式化字符串中的’%’符号个数少,否则会产生访问越界,运气不好的话还会导致程序崩溃
    C/C++可变参数的使用
  • css样式文件该放在哪里
  • php中数组下标必须是连续的吗
  • Python 3 教程
    Python 3 教程 Python 的 3.0 版本,常被称为 Python 3000,或简称 Py3k。相对于 Python 的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0 在设计的时候没有考虑向下兼容。 Python
    Python 3 教程
  • Python pip包管理
    一、前言    在Python中, 安装第三方模块是通过 setuptools 这个工具完成的。 Python有两个封装了 setuptools的包管理工具: easy_install  和  pip , 目前官方推荐使用 pip。    
    Python pip包管理
  • ubuntu如何重新编译内核
  • 改善Java代码之慎用java动态编译

目录