以下是全部源码
![](/icons/11961dou.gif)
![](/icons/11961de.gif)
![](/icons/11961de.gif)
![](/icons/11961yi.gif)
![](/icons/11961dou2.gif)
$PBExportHeader$w_button.srw
forward
global type w_button from window
end type
type cb_11 from commandbutton within w_button
end type
type cb_10 from commandbutton within w_button
end type
type em_3 from editmask within w_button
end type
type em_2 from editmask within w_button
end type
type em_1 from editmask within w_button
end type
type cb_9 from commandbutton within w_button
end type
type cb_8 from commandbutton within w_button
end type
type cb_7 from commandbutton within w_button
end type
type cb_6 from commandbutton within w_button
end type
type cb_5 from commandbutton within w_button
end type
type cb_4 from commandbutton within w_button
end type
type cb_3 from commandbutton within w_button
end type
type cb_2 from commandbutton within w_button
end type
type cb_1 from commandbutton within w_button
end type
type st_1 from
![](/icons/11961static.gif)
end type
type ws_position from structure within w_button
end type
end forward
type ws_position from structure
long xpos
long ypos
end type
global type w_button from window
![](/icons/11961int.gif)
![](/icons/11961int.gif)
boolean titlebar = true
![](/icons/11961string.gif)
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
long backcolor = 17725690
![](/icons/11961string.gif)
boolean center = true
cb_11 cb_11
cb_10 cb_10
em_3 em_3
em_2 em_2
em_1 em_1
cb_9 cb_9
cb_8 cb_8
cb_7 cb_7
cb_6 cb_6
cb_5 cb_5
cb_4 cb_4
cb_3 cb_3
cb_2 cb_2
cb_1 cb_1
st_1 st_1
end type
global w_button w_button
type prototypes
FUNCTION ulong CreateRoundRectRgn(Long x1, Long y1, Long x2, Long y2, Long x3, Long y3) library "gdi32"
FUNCTION ulong CreatePolygonRgn (ref ws_position lppt
![](/icons/11961zhk2.gif)
![](/icons/11961int.gif)
![](/icons/11961int.gif)
![](/icons/11961int.gif)
FUNCTION ulong CreateEllipticRgn( Long x1, Long y1, Long x2, Long y2) library "gdi32"
FUNCTION ulong SetWindowRgn(ulong hWnd,ulong hRgn,boolean bRedraw) LIBRARY "user32"
FUNCTION ulong CombineRgn(Long hDestRgn, Long hSrcRgn1, Long hSrcRgn2, Long nCombineMode ) LIBRARY "gdi32"
Function Long SetParent( Long hWndChild, Long hWndNewParent) library "user32"
Subroutine keybd_event(long bVk, long bScan, long dwFlags, long dwExtraInfo) LIBRARY "user32.dll"
end prototypes
forward prototypes
public function
![](/icons/11961int.gif)
![](/icons/11961set.gif)
public function
![](/icons/11961int.gif)
![](/icons/11961set.gif)
![](/icons/11961kh.gif)
end prototypes
public function
![](/icons/11961int.gif)
![](/icons/11961set.gif)
// //
// 测试用数据(窗口多边形) //
// //
//////////////////////////////////////////////////
long ll_x1, ll_x2, ll_x3
long ll_y1, ll_y2, ll_y3
long ll_handle
ll_x1 = 1
ll_y1 = 1
ll_x2 = UnitsToPixels(acb_button.width, xunitstopixels!)
ll_y2 = UnitsToPixels(acb_button.height, yunitstopixels!)
ll_x3 = 64
ll_y3 = 64
ll_handle = CreateRoundRectRgn(ll_x1, ll_y1, ll_x2, ll_y2, ll_x3, ll_y3)
SetwindowRgn(handle(acb_button), ll_handle, true)
![](/icons/11961return.gif)
end function
public function
![](/icons/11961int.gif)
![](/icons/11961set.gif)
![](/icons/11961kh.gif)
long ll_data
ll_red = long(em_1.text)
ll_green = long(em_2.text)
ll_blue = long(em_3.text)
ll_data = rgb(ll_red, ll_green, ll_blue)
this.backcolor = ll_data
em_1.backcolor = ll_data
em_2.backcolor = ll_data
em_3.backcolor = ll_data
st_1.backcolor = ll_data
![](/icons/11961return.gif)
end function
on w_button.create
this.cb_11=create cb_11
this.cb_10=create cb_10
this.em_3=create em_3
this.em_2=create em_2
this.em_1=create em_1
this.cb_9=create cb_9
this.cb_8=create cb_8
this.cb_7=create cb_7
this.cb_6=create cb_6
this.cb_5=create cb_5
this.cb_4=create cb_4
this.cb_3=create cb_3
this.cb_2=create cb_2
this.cb_1=create cb_1
this.st_1=create st_1
this.Control
![](/icons/11961zhk2.gif)
this.cb_10,&
this.em_3,&
this.em_2,&
this.em_1,&
this.cb_9,&
this.cb_8,&
this.cb_7,&
this.cb_6,&
this.cb_5,&
this.cb_4,&
this.cb_3,&
this.cb_2,&
this.cb_1,&
this.st_1}
end _disibledevent= 1000 then
this.resize(1586, 2164)
![](/icons/11961else.gif)
this.resize(986, 264)
end
![](/icons/11961if.gif)
end event
最新评论