zoukankan      html  css  js  c++  java
  • QQ聊天窗口效果

    rtbDetail:显示聊天信息
    rtbChat:用户输入信息
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    
    namespace WindowsFormsApplication4
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            [DllImport("user32.dll")]
            private static extern int SendMessage(IntPtr hWnd,int msg,int wParam,IntPtr IParam);
            private const int WM_VSCROLL = 0x115;
            private const int SB_BOTTOM = 7;
            private int lastSelectedIndex = -1;
    
            private void btnSend_Click(object sender, EventArgs e)
            {
                rtbDetail.Text += rtbChat.Text+Environment.NewLine;
                rtbChat.Text = "";
                SendMessage(rtbDetail.Handle,WM_VSCROLL,SB_BOTTOM,new IntPtr(0));
                rtbChat.Focus();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
                rtbChat.Focus();
                this.AcceptButton = btnSend;
            }
        }
    }
    
  • 相关阅读:
    aaa
    https://download.csdn.net/download/qq_33200967/10679367
    hadoop修改
    xa
    commit
    mybatis
    centos7 部署openstf
    selenium api docs
    Chrome浏览器在自动化中的应用
    selenium自动化测试各浏览器驱动下载地址
  • 原文地址:https://www.cnblogs.com/wangshuai/p/1682817.html
Copyright © 2011-2022 走看看