zoukankan      html  css  js  c++  java
  • QQ自动登录里的一些控件知识

    在这个程序里面有个读取计算机指定文件的知识:

      private void button2_Click(object sender, EventArgs e)
            {
                openFileDialog1.ShowDialog();
                textBox1.Text = openFileDialog1.FileName;
            }
    

    就是点击这个btn,然后就去搜索计算机的文件,红色字体就是,然后就读取出他的路径名称。

    还有就是下面的这3个知识点

     private void button1_Click(object sender, EventArgs e)
            {
                if (listView1.Items.Count == 0) 
    {
    MessageBox.Show("请先添加需要登录的QQ/TM号码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
    return; } for (int j = 0; j < listView1.Items.Count; j++) { if (listView1.Items[j].Checked==true) System.Diagnostics.Process.Start(textBox1.Text,listView1.Items[j].SubItems[2].Text); } }

      

      //这个方法,直要输入进去数字,就会触发
            private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
            {
                //e.KeyChar获取的是你按下键的字符  
                //e.KeyChar的值的形式是:ASII码+'输入的值'
                 e.Handled = e.KeyChar < '0' || e.KeyChar > '9';   //允许输入数字
                 if(e.KeyChar==(char)8)   //允许输入回退键
                     {   
                 e.Handled=false;
                      }
            }
    

      

  • 相关阅读:
    MongoDB 与 MySQL 性能比较
    PySpider简易教程
    使用redis有什么缺点
    禅道
    Shell02
    Shell01
    性能测试06
    性能测试05
    性能测试04
    性能测试03
  • 原文地址:https://www.cnblogs.com/ZkbFighting/p/9491864.html
Copyright © 2011-2022 走看看