谢谢 leio((郁闷中...)) 的答复,问题是这样的,所添加的控件都是来自祖先,封装好的对象,这个时候,把il_oldx定义在祖先中,在lbuttondown判断时,取到的结果都是0,传递不出来。
虽然没解决根本问题,但给了我另外一个思路,万分感谢。
-------------------------------------------------------------
to 小鬼,呵呵,没做什么开发平台,不过是客户要求高了点,想实现的功能大点,原pb组的同事碰到了这样的问题,所以才弄弄看。
-------------------------------------------------------------
to 所有,来着有分,呵呵。
$PBExportHeader$w_main.srw
forward
global type w_main from window
end type
type cb_1 from commandbutton within w_main
end type
type cb_2 from commandbutton within w_main
end type
type cb_3 from commandbutton within w_main
end type
type st_1 from statictext within w_main
end type
type p_1 from picture within w_main
end type
type cb_4 from commandbutton within w_main
end type
end forward
global type w_main from window
integer width = 2030
integer height = 1440
boolean titlebar = true
string title = "Untitled"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
event ue_paint pbm_paint
cb_1 cb_1
cb_2 cb_2
cb_3 cb_3
st_1 st_1
p_1 p_1
cb_4 cb_4
end type
global w_main w_main
type prototypes
end prototypes
type variables
long il_oldx,il_oldy
end variables
on w_main.create
this.cb_1=create cb_1
this.cb_2=create cb_2
this.cb_3=create cb_3
this.st_1=create st_1
this.p_1=create p_1
this.cb_4=create cb_4
this.Control[]={this.cb_1,&
this.cb_2,&
this.cb_3,&
this.st_1,&
this.p_1,&
this.cb_4}
end on
on w_main.destroy
destroy(this.cb_1)
destroy(this.cb_2)
destroy(this.cb_3)
destroy(this.st_1)
destroy(this.p_1)
destroy(this.cb_4)
end on
type p_1 from picture within w_main
event lbuttondown pbm_lbuttondown
integer x = 46
integer y = 1096
integer width = 229
integer height = 200
string picturename = "ApplicationIcon!"
boolean focusrectangle = false
end type