回复 1楼jixianqi的帖子
jixianqi 你好
请参考以下代码:
- OpenFileDialog dlgOpen = new OpenFileDialog();
- if (dlgOpen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- FarPoint.Win.Spread.DrawingSpace.RectangleShape shape1 = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
- shape1.BackgroundImage = new Picture(Image.FromFile(dlgOpen.FileName));
- shape1.BackgroundImage.Style = RenderStyle.Stretch;
- shape1.Width = 500;
- shape1.Height = 500;
- shape1.CanSize = FarPoint.Win.Spread.DrawingSpace.Sizing.HeightAndWidth;
-
- fpSpread1.ActiveSheet.AddShape(shape1);
- }
复制代码 |