我想让用户将鼠标悬停在三角形上,如下所示,文本框会弹出一些与该三角形相关的信息。 如何:将鼠标悬停在形状上显示文本框
三角形绘制具有以下功能...
Public Sub drawTriangle(theRow As Integer, theColumn As Integer, Optional myColor As System.Drawing.Color = Nothing)
myColor = System.Drawing.Color.Black
Dim theShape As Microsoft.Office.Interop.Excel.Shape = xlWorkSheet.Shapes.AddShape(MsoAutoShapeType.msoShapeIsoscelesTriangle, (xlWorkSheet.Cells(theRow, theColumn)).Left + 18, (xlWorkSheet.Cells(theRow, theColumn)).Top, 15, 14)
theShape.Fill.ForeColor.RGB = ToBgr(myColor)
theShape.Line.ForeColor.RGB = ToBgr(myColor)
End Sub
我一直没能找到有关我会怎么做任何的例子还是不错的文档,所以我想我会在这里问。任何和所有的帮助非常感谢!
此信息是否只读?如果是这样,你可以把它作为附加到三角形的评论对象吗? – vbnet3d
@ vbnet3d它只会被读取......您所描述的内容听起来像是它会是完美的,只要它显示出来的时候它会在盘旋时消失而不会被盘旋时消失 – Bob
根据[MSDN](https:// msdn .microsoft.com/en-us/library/office/microsoft.office.interop.excel.range.addcomment.aspx),你可以添加评论到一个范围 - 不确定一个形状。 – vbnet3d