Вверх ↑
Ответов: 793
Рейтинг: 168
#1: 2022-02-21 05:52:55 ЛС | профиль | цитата
Переделал пример для выделения области экрана рамкой.
Управление:
ЛКМ – перемещение выделенной области по экрану
Колёсико – изменение размеров выделенной области
Тянуть Левой кнопкой край рамки - изменение формы
ПКМ – сделать снимок
Add(MainForm,11788041,644,175)
{
Width=479
Height=417
Position=1
Point(SizeHeader)
Point(Handle)
Point(doSendToBack)
Point(doBringToFront)
}
Add(Button,7184611,455,224)
{
Width=463
Align=2
Caption="Вырезать"
link(onClick,1712484:doEvent1,[])
}
Add(Image,3179763,644,259)
{
Top=20
Width=463
Height=358
Align=5
Color=16777215
link(Bitmap,5508976:Var1,[(650,250)(636,250)(636,299)(552,299)])
}
Add(Hub,1712484,511,224)
{
link(onEvent1,11788041:doSendToBack,[(536,230)(536,209)])
link(onEvent2,5508976:doWork1,[(536,237)(536,265)])
}
Add(ChildForm,5508976,546,259)
{
link(onEvent1,2186279:doEvent1,[])
}
BEGIN_SDK
Add(EditMulti,987769,21,21)
{
EventCount=1
WorkCount=1
VarCount=1
Width=475
Height=375
link(doWork1,6757584:doEvent1,[(39,27)(39,76)])
link(Var1,6706602:Result,[(27,355)(321,355)])
}
Add(MainForm,5179513,259,147)
{
Align=5
Visible=1
BorderStyle=0
Point(doWidth)
Point(doHeight)
Point(doVisible)
}
Add(ScreenShort,4529928,175,70)
{
link(onCapture,7956552:doEvent1,[])
link(Handle,7983328:Value,[])
}
Add(Hub,6757584,63,70)
{
OutCount=5
link(onEvent1,4529928:doCapture,[])
link(onEvent2,13915281:doData,[(123,83)(123,139)])
link(onEvent3,3287052:doData,[(116,90)(116,167)])
link(onEvent4,1889271:doWork2,[(109,97)(109,195)])
link(onEvent5,6706602:doVisible,[(102,104)(102,293)])
}
Add(Memory,7983328,175,28)
{
Default=Integer(0)
}
Add(Image,9543904,392,133)
{
Top=20
Width=463
Height=358
Align=5
Color=16777215
}
Add(Screen,10393990,133,84)
{
}
Add(DoData,13915281,133,133)
{
link(onEventData,5179513:doWidth,[(235,139)(235,181)])
link(Data,10393990:Width,[])
}
Add(DoData,3287052,175,161)
{
link(onEventData,5179513:doHeight,[(228,167)(228,188)])
link(Data,10393990:Height,[(181,124)(146,124)])
}
Add(Bitmap,3779324,343,70)
{
}
Add(Hub,7956552,280,70)
{
link(onEvent1,3779324:doLoad,[])
link(onEvent2,12410429:doGamma,[(305,83)(305,139)])
}
Add(Gamma,12410429,343,133)
{
link(onResult,9543904:doLoad,[])
link(Bitmap,11041717:Var2,[])
}
Add(HubEx,1889271,224,189)
{
link(onEvent,5179513:doVisible,[])
}
Add(ChildFormEx,6706602,315,287)
{
link(onEvent1,1889271:doWork3,[(361,293)(361,279)(228,279)])
link(onEvent3,987769:onEvent1,[(431,300)(431,27)])
link(Source,11041717:Var1,[(321,110)])
}
BEGIN_SDK
Add(EditMultiEx,3506928,21,21)
{
WorkCount=#9:doVisible|
EventCount=#8:onEvent1|8:onEvent3|0:|
VarCount=#6:Result|
DataCount=#6:Source|
Width=895
Height=368
link(doVisible,4723942:doEvent1,[])
link(Result,13733629:Result,[(27,257)(391,257)])
}
Add(MainForm,15725282,392,70)
{
Left=35
Top=105
Width=589
Height=386
Color=16777215
Font=[MS Sans Serif,8,0,16777215,1]
Visible=1
BorderStyle=7
DragForm=0
TransparentColor=8421504
Point(onMouseWheel)
Point(Left)
Point(Top)
Point(doVisible)
Point(onMouseDown)
Point(doWidth)
Point(doHeight)
Point(Width)
Point(Height)
Point(doPicture)
Point(onResize)
link(onMouseWheel,5664209:doOperation,[(431,97)(431,62)(193,62)(193,111)])
link(onMouseDown,12090705:doEvent,[])
link(onResize,14839810:doWork3,[(446,111)(446,225)(375,225)])
}
Add(Math,7255170,273,105)
{
link(onResult,15725282:doWidth,[])
link(Op1,14893527:Var1,[(279,89)(363,89)(363,138)])
}
Add(Math,5664209,203,105)
{
OpType=3
Op2=30
link(onResult,512495:doEvent1,[])
}
Add(Hub,512495,245,105)
{
link(onEvent1,7255170:doOperation,[])
link(onEvent2,13955688:doOperation,[])
}
Add(Math,13955688,315,112)
{
link(onResult,15725282:doHeight,[])
link(Op1,13551567:Var1,[(321,96)(356,96)(356,145)])
}
Add(GetDataEx,14893527,406,133)
{
link(Data,15725282:Width,[])
}
Add(GetDataEx,13551567,413,140)
{
link(Data,15725282:Height,[])
}
Add(IndexToChanel,12090705,483,98)
{
link(onEvent2,5067805:doPopupHere,[])
}
Add(PopupMenu,5067805,546,105)
{
Menu=#16:Создать скриншот|8:Прервать|
link(onClick,10699968:doEvent,[])
}
Add(IndexToChanel,10699968,602,105)
{
Count=3
link(onEvent1,15785721:doEvent1,[])
link(onEvent2,12509764:doWork3,[(669,118)(669,132)(718,132)])
}
Add(Img_Copy,13733629,385,182)
{
Point(Result)
Point(Width)
Point(Height)
link(onCopy,15725282:doPicture,[(436,188)(436,160)(382,160)(382,125)])
link(Source,3506928:Source,[(391,173)(27,173)])
link(X,15725282:Left,[])
link(Y,15725282:Top,[])
link(Width,14893527:Var2,[])
link(Height,13551567:Var2,[])
}
Add(Timer,10063086,203,182)
{
Interval=50
Enable=1
link(onTimer,14839810:doWork2,[])
}
Add(Hub,4723942,70,21)
{
link(onEvent1,12682471:doWork2,[])
link(onEvent2,10063086:doTimer,[(95,34)(95,188)])
}
Add(HubEx,14839810,371,182)
{
link(onEvent,13733629:doCopy,[])
}
Add(DoData,16684823,735,112)
{
Data=Integer(0)
link(onEventData,12873231:doEvent1,[])
}
Add(Hub,12873231,784,112)
{
OutCount=4
link(onEvent1,12682471:doWork3,[(809,118)(809,27)])
link(onEvent2,3506928:onEvent1,[(816,125)(816,27)])
link(onEvent3,10063086:doStop,[(809,132)(809,230)(193,230)(193,195)])
}
Add(HubEx,12682471,364,21)
{
Angle=1
link(onEvent,15725282:doVisible,[(368,104)])
}
Add(Hub,15785721,679,105)
{
link(onEvent1,3506928:onEvent3,[(704,111)(704,34)])
link(onEvent2,12509764:doWork2,[])
}
Add(HubEx,12509764,714,112)
{
link(onEvent,16684823:doData,[])
}
END_SDK
Add(GetDataEx,11041717,343,105)
{
link(Data,3779324:Bitmap,[])
}
END_SDK
Add(Hub,2186279,602,259)
{
link(onEvent1,3179763:doLoad,[])
link(onEvent2,11788041:doBringToFront,[(627,272)(627,216)])
}

карма: 16

0
Редактировалось 2 раз(а), последний 2022-02-21 06:39:24