> ------------------- Magnifier.PowerPro --------------------------
> local mag=cl.create("Magnifier",1)
> 
> mag.setproperties("Position: FixedTopLeft ;;+
> Height: 100 FlatFlat TopMost BarSize")
> mag.insert(0).SetWidth(100)
> 
> bar.show("Magnifier")
> 
> for()
> win.recttofile(win.makerect(xmouse-10,ymouse-10,;;+
> xmouse+10,ymouse+10),pprofolder++"magnifier.bmp",100,100)
> 
> mag.SetBackground(pprofolder++"magnifier.bmp")
> mag.refresh
> 
> wait.for(250)
> if(ctrl)
> break
> endfor
> 
> bar.close("Magnifier")
> quit
> --------------------------------------------------------------

I made a color-picker based on it:

----------------- ColorPicker.PowerPro -------------------------
local mag=cl.create("Magnifier",1)

mag.NewProperties("Position: FixedTopLeft ;;+
Height: 50 FlatFlat SameSize BarSize TopMost Border")
mag.insert(0).SetWidth(50)
mag.insert(1).AddLeft("Format BarVerticalLine")
mag.insert(2)
mag.insert(3).AddLeft("Format NewBarRowLine")
mag.insert(4)
mag.insert(5).AddLeft("Format BarVerticalLine")
mag.insert(6)

bar.show("Magnifier")

for(!ctrl)
local xpos=xmouse
local ypos=ymouse

win.recttofile(win.makerect(xpos-10,ypos-10,;;+
xpos+10,ypos+10),pprofolder++"magnifier.bmp",100,100)

mag.SetBackground(pprofolder++"magnifier.bmp")
mag.Refresh

wait.for(200)
endfor

win.debug(win.getpixel(xmouse,ymouse))
mag.RemoveAll
quit
--------------------------------------------------------------------

--- In [email protected], sgp <[EMAIL PROTECTED]> wrote:
> I have a slow system and the bar flickers a lot, though.

Yup, the bar is too much flickering. If you find it really annoying,
you may use the following instead for a moment, until a better
solution is found (:unlikely this week), maybe better use dialog plugin.

---------------------------------------------------------------------
local mag=cl.create("Magnifier",1)

mag.NewProperties("Position: FixedTopLeft ;;+
Height: 98 FlatFlat SameSize BarSize TopMost")
mag.insert(0).SetWidth(98)

bar.show("Magnifier")

hDC_Dsk=dll.call("GetDC|ui",0)
hDC_Bar=dll.call("GetDC|ui",win.handle("Magnifier"))

for(!ctrl)
dll.call("StretchBlt|ui i i i i ui i i i i ui",;;+
hDC_Bar,0,0,100,100,hDC_Dsk,xmouse-10,ymouse-10,;;+
20,20,0xCC0020)
wait.for(100)
endfor

mag.RemoveAll
quit
---------------------------------------------------------------------

Sean






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to