if (PrevBitmap != null)
{
Rectangle rectDest = new Rectangle(PrevBitmapLocation, PrevBitmapSize);
Rectangle rectSrc; if (bIsMouseOverPrev)
{
if (bIsMouseDown)
rectSrc = new Rectangle(new Point(PrevBitmapSize.Width * 2, 0), PrevBitmapSize);
else
rectSrc = new Rectangle(new Point(PrevBitmapSize.Width, 0), PrevBitmapSize);
}
else
rectSrc = new Rectangle(new Point(0, 0), PrevBitmapSize); //MessageBox.Show(bIsMouseOverClose.ToString()+bIsMouseDown.ToString());
grfx.DrawImage(PrevBitmap, rectDest, rectSrc, GraphicsUnit.Pixel);
}我用这段代码在窗体上绘制了图片
如何在鼠标移动到那个图片区域的显示显示提示
this.toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 1000;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;
this.toolTip1.IsBalloon = true;
//this.toolTip1.
toolTip1.SetToolTip(PrevBitmap, "是");因为PrevBitmap是图片不是控件所以执行不了
{
Rectangle rectDest = new Rectangle(PrevBitmapLocation, PrevBitmapSize);
Rectangle rectSrc; if (bIsMouseOverPrev)
{
if (bIsMouseDown)
rectSrc = new Rectangle(new Point(PrevBitmapSize.Width * 2, 0), PrevBitmapSize);
else
rectSrc = new Rectangle(new Point(PrevBitmapSize.Width, 0), PrevBitmapSize);
}
else
rectSrc = new Rectangle(new Point(0, 0), PrevBitmapSize); //MessageBox.Show(bIsMouseOverClose.ToString()+bIsMouseDown.ToString());
grfx.DrawImage(PrevBitmap, rectDest, rectSrc, GraphicsUnit.Pixel);
}我用这段代码在窗体上绘制了图片
如何在鼠标移动到那个图片区域的显示显示提示
this.toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 1000;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;
this.toolTip1.IsBalloon = true;
//this.toolTip1.
toolTip1.SetToolTip(PrevBitmap, "是");因为PrevBitmap是图片不是控件所以执行不了
解决方案 »
- C#的一個問題,高手來啊
- 有朋友用过NSIS打包工具的吗?问个多语言的问题。
- C# Soket通信如何获取网页动态信息(如何执行Ajax)
- html打包为可执行文件
- 去哪找managed directx 的c#示例代码,下了两个版本(2009,2007)的directx都是c++的示例
- windows 2003 的远程链接问题
- 求救:c#中LONG数据类型怎么处理
- ++++++++++++如何利用sql存储过程,删除一条符合条件的数据记录???
- net里如何把数据库里•:的乱码字符转换为全角的·?
- 用C#做Windows程序,如何使textBox不响应键盘事件?
- 菜鸟!!问个关于DotText的问题!!!!!急急!!!!!!!!!!!
- datagridview 排序后问题
是不是在图片原来区域再打上个孔件呢