我有一个代码,念叨着我从代码项目(我认为)下载,我不什么是原来的下载链接尝试使用此
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Balloon.NET
{
public class BalloonWindow : Form
{
public static readonly int TIPMARGIN;
public static readonly int TIPTAIL;
public BalloonWindow();
public Point AnchorPoint { get; set; }
public BalloonWindow.BallonQuadrant Quadrant { get; }
public static Point AnchorPointFromControl(Control anchorControl);
protected override void Dispose(bool disposing);
protected override void OnLoad(EventArgs e);
protected virtual Rectangle OnNCCalcSize(Rectangle windowRect);
protected virtual void OnNCPaint(Graphics g);
protected override void OnResize(EventArgs e);
protected void RecalcLayout();
protected void RepositionWindow(Point oldAnchorPoint, Point newAnchorPoint);
public void ShowBalloon(Control anchorControl);
protected override void WndProc(ref Message m);
public enum BallonQuadrant
{
TopLeft = 0,
TopRight = 1,
BottomLeft = 2,
BottomRight = 3,
}
}
}
,并使用此表如下
Balloon.NET.BalloonWindow ms = new Balloon.NET.BalloonWindow();
private void numberEdit1_TextChanged(object sender, EventArgs e)
{
if (!ms.Visible)
{
ms.ShowBalloon(numberEdit1);
numberEdit1.Focus();
}
}
为什么你不使用控件而不是表单来处理intellisense? – Saleh 2011-06-13 10:16:56
因为客户想要智能感知形式可以从主窗体溢出。 – TcKs 2011-06-13 10:19:40
显然你的'智能感知控制'不是一个控件。很不可思议的是它究竟是一种什么样的动物。如果它是一个Form,那么将其TopLevel属性设置为false以将其转换为控件。 – 2011-06-13 12:31:15