一段代码 c# 转vb.net
privatevoidfpSpread1_DragFillBlock(objectsender,FarPoint.Win.Spread.DragFillBlockEven...
private void fpSpread1_DragFillBlock(object sender, FarPoint.Win.Spread.DragFillBlockEventArgs e)
{
e.DataOnly = false;
}
private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.AllowDragFill = true;
fpSpread1.AllowUserFormulas = true;
fpSpread1.Sheets[0].Cells[2, 2].Formula = "C3+D3";
fpSpread1.DragFillBlock += new FarPoint.Win.Spread.DragFillBlockEventHandler(fpSpread1_DragFillBlock);
}
关键是最后一句 展开
{
e.DataOnly = false;
}
private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.AllowDragFill = true;
fpSpread1.AllowUserFormulas = true;
fpSpread1.Sheets[0].Cells[2, 2].Formula = "C3+D3";
fpSpread1.DragFillBlock += new FarPoint.Win.Spread.DragFillBlockEventHandler(fpSpread1_DragFillBlock);
}
关键是最后一句 展开
展开全部
其他真心没什么好说的。。就是变成这样。。
Private Sub Form1_Load(seder as Object,e as EventArgs)
fpSpread1.AllowDragFill = True
...
End Sub
最后一句我单独写给你吧
AddHandler fpSpread1.DragFillBlock, AddressOf fpSpread1_DragFillBlock
Private Sub Form1_Load(seder as Object,e as EventArgs)
fpSpread1.AllowDragFill = True
...
End Sub
最后一句我单独写给你吧
AddHandler fpSpread1.DragFillBlock, AddressOf fpSpread1_DragFillBlock
追问
完全正确
以下写法也是对的,求解释?
AddHandler FpSpread1.DragFillBlock, New DragFillBlockEventHandler(AddressOf Me.fpSpread1_DragFillBlock)
追答
一样的。上面的写法是简写。
下面的是写全了。把事件的类型也写出来了。
其实不写也能自动的。。有简单的当然写简单的咯
展开全部
Private Sub fpSpread1_DragFillBlock(sender As Object, e As FarPoint.Win.Spread.DragFillBlockEventArgs)
e.DataOnly = False
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs)
fpSpread1.AllowDragFill = True
fpSpread1.AllowUserFormulas = True
fpSpread1.Sheets(0).Cells(2, 2).Formula = "C3+D3"
fpSpread1.DragFillBlock += New FarPoint.Win.Spread.DragFillBlockEventHandler(AddressOf fpSpread1_DragFillBlock)
End Sub
e.DataOnly = False
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs)
fpSpread1.AllowDragFill = True
fpSpread1.AllowUserFormulas = True
fpSpread1.Sheets(0).Cells(2, 2).Formula = "C3+D3"
fpSpread1.DragFillBlock += New FarPoint.Win.Spread.DragFillBlockEventHandler(AddressOf fpSpread1_DragFillBlock)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询