当前位置:编程学习 > C#/ASP.NET >>

C# 中用了一个WebBrowser,然后在里面嵌套了一个iframe,我怎么在shift+Enter实现换行的时候把文字也换到下一行


 private void webBroContent_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            if (_isFirstKeyDown)
            {
                if (Main.sys_Send)
                {
                    if ((e.Shift || e.Control) && e.KeyCode == Keys.Enter)
                    {
                        webBroContent.Document.Window.Frames["showValue"].Document.Body.InnerHtml += "<br />";
                    }
                    else
                    {
                        //如果是回车键
                        if (e.KeyCode == Keys.Enter)
                        {
                            btnSend_Click(sender, e);
                        }
                    }
                }
                else if (!Main.sys_Send)
                {
                    if (e.Control && e.KeyCode == Keys.Enter)
                    {
                        btnSend_Click(sender, e);
                    }
                }
            }
            _isFirstKeyDown = !_isFirstKeyDown;

        }


怎么才能获得鼠标所在的文本位置呢?
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,