我有一個代碼,唸叨着我從代碼項目(我認爲)下載,我不什麼是原來的下載鏈接嘗試使用此
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