private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.DrawingSpace.MultiSideShape ms = new FarPoint.Win.Spread.DrawingSpace.MultiSideShape();
ms.Sides = 5;
ms.Name = "ms";
ms.SetBounds(10, 10, 60, 60);
ms.BackColor = Color.LightPink;
ms.Location = new Point(10, 20);
ms.Text = "多角形";
ms.CanRenderText = true;
fpSpread1.ActiveSheet.AddShape(ms);
FarPoint.Win.Spread.DrawingSpace.EllipseShape es = new FarPoint.Win.Spread.DrawingSpace.EllipseShape();
es.Name = "es";
es.SetBounds(10, 10, 90, 90);
es.BackColor = Color.LightCyan;
es.Location = new Point(90, 20);
es.Text = "楕円";
es.CanRenderText = true;
fpSpread1.ActiveSheet.AddShape(es);
}
private void button1_Click(object sender, System.EventArgs e)
{
//シェイプオブジェクトを印刷します(省略可)
fpSpread1.ActiveSheet.PrintInfo.PrintShapes = true;
//印刷プレビュー画面を表示します
fpSpread1.ActiveSheet.PrintInfo.Preview = true;
//アクティブシート印刷します
fpSpread1.PrintSheet(fpSpread1.ActiveSheet);
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ms As New FarPoint.Win.Spread.DrawingSpace.MultiSideShape
ms.Sides = 5
ms.Name = "ms"
ms.SetBounds(10, 10, 60, 60)
ms.BackColor = Color.LightPink
ms.Location = New Point(10, 20)
ms.Text = "多角形"
ms.CanRenderText = True
FpSpread1.ActiveSheet.AddShape(ms)
Dim es As New FarPoint.Win.Spread.DrawingSpace.EllipseShape
es.Name = "es"
es.SetBounds(10, 10, 90, 90)
es.BackColor = Color.LightCyan
es.Location = New Point(90, 20)
es.Text = "楕円"
es.CanRenderText = True
FpSpread1.ActiveSheet.AddShape(es)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'シェイプオブジェクトを印刷します(省略可)
FpSpread1.ActiveSheet.PrintInfo.PrintShapes = True
'印刷プレビュー画面を表示します
FpSpread1.ActiveSheet.PrintInfo.Preview = True
'アクティブシート印刷します
FpSpread1.PrintSheet(FpSpread1.ActiveSheet)
End Sub