611
社区成员




定义实例变量:
integer li_st,li_end //起始行,结束行
boolean ib_l //记录左键是否按下
在DW上建立3个事件 :
1 pbm_dwnlbuttonclk 在DW上点下左键
li_st = row 记录起始行
ib_l = true
2 pbm_dwnmousemove 在DW上移动鼠标
if ib_l = true then //如果左键点下,记录经过的行
This.SelectRow(row, true)//变色
end if
3 pbm_dwnlbuttonup 放开左键
li_end = row 记录结束行
ib_l = false
messagebox("","选中了" + string(li_st) + "到" + string(li_end))
得到了行范围 for循环取值求和或者用计算列求和 自己完善吧