易截截图软件、单文件、免安装、纯绿色、仅160KB

C#移动无边框窗体

我在VS C# 2008添加了 DotNetBar的RibbonBar 控件,想让界面更美观些,就把窗体改成了无边框的,可是这样就不能移动啦
想通过移动RibbonBar 控件来移动整个窗体
网上找到了很多版本的方法都不行,点在空白窗体处也移动不了
例如
private Point mouseOffset;
private bool isMouseDown = false;

private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
    int xOffset;
    int yOffset;

    if (e.Button == MouseButtons.Left)
    {
        xOffset = -e.X /*- SystemInformation.FrameBorderSize.Width*/;
        yOffset = -e.Y /*- SystemInformation.CaptionHeight - SystemInformation.FrameBorderSize.Height*/;
        mouseOffset = new Point(xOffset, yOffset);
        isMouseDown = true;
    }
}
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
    if (isMouseDown)
    {
        Point mousePos = Control.MousePosition;
        mousePos.Offset(mouseOffset.X, mouseOffset.Y);
        Location = mousePos;
    }
}

private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
    if


相关问答:

利用C#编写txt转化到xml的程序

txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......

C#填网页表单的问题 - .NET技术 / C#

我这里有一个登陆WIFI网络的页面。由于WIFI经常断线,所以要反复地在这个网页上登陆,没法无人值守。
所以,我想做一个C#程序,放一个webbrowser控件,自动填表并自动点击提交按钮。
问题一:
基本照网上找的程序 ......

C#发邮件21cn

21cn的邮箱,在outlook配置后可以正常收发邮件,可是我写在C#中就不行,换成其它邮箱,163很早注册的。可以发送。查了很久,没有找到原因,请高手帮忙解答。。。小弟,谢了。。代码如下:
private void SendMail ......

关于ajax的一个问题 - .NET技术 / C#

我的ajax的updatepanel控件里的面不能执行response.write,可是我需要弹出对话框,我要怎么做呢?
有没有不需要response.write弹提示框的做法呢?
另外我的页面上有一个web用户控件,然后放一个gridview在updatepa ......

截取WINfrom中HTML的标签!!! - .NET技术 / C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Syst ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号