Forum | | | | Julian Schmidt | Hi,
through this Thread would like I the WinXP-bow from Screencapture[...] to fix.
it deals itself thereby circa a display-Error which under WinXP appears. under Window 7 & Co sees one a Black eingefärbten background and a white Steuerkreuz which whom Cursor chasing. under WinXP is nothing To see.
Def SetLayeredWindowAttributes(4) !"USER32","SetLayeredWindowAttributes"
def SetWindowRgn(3) !"USER32","SetWindowRgn"
def RectRgn(4) !"GDI32","CreateRectRgn"
Declare fenster&[], x&, posx&, posy&
Window Style 240+1024
Window %MaxX,%MaxY,0,0
Whileloop 2
fenster&[&loop]=Create("Window",%hwnd,"",%MaxX,%MaxY,0,0)'fenster&[1] - black Blende
SetTransparent(fenster&[&loop],IF(&loop=1,55,20))'fenster&[2] - Durchsichtiger Klickschutz
SetWindowPos fenster&[&loop]=0,0 - %MaxX, %MaxY;-1
EndWhile
ShowCursor 0
WhileNot iskey(27)
Waitinput 10
posx&=CursorPos("X1")
posy&=CursorPos("Y1")
StartPaint fenster&[1]
CLS 0
EndPaint
CutRgnDLG(fenster&[1],RectRgn(0,posy&,posx&,posy&+1),RectRgn(posx&+1,posy&,%MaxX,posy&+1),RectRgn(posx&,0,posx&+1,posy&),RectRgn(posx&,posy&+1,posx&+1,%MaxY))
CutRgnDLG(fenster&[2],RectRgn(0, 0, posx&, posy&),RectRgn(posx&+1, 0, %MaxX, posy&),RectRgn(0, posy&+1, posx&, %MaxY),RectRgn(posx&+1, posy&+1, %MaxX, %MaxY))
Endwhile
end
Proc SetTransparent
Parameters Hwnd%, Perc%
External("USER32","SetWindowLongA",Hwnd%, -20, External("USER32","GetWindowLongA",Hwnd%,-20) | $80000)
SetLayeredWindowAttributes(Hwnd%, 0, (255 * Perc%) / 100, $2)
ENDPROC
Proc CutRgnDLG
Parameters hdl&
Declare region&,wRgn&
wRgn&=RectRgn(0,0,width(hdl&)+100,height(hdl&)+100)
whileloop 2,%PCount
region&=@&(&loop)
External("GDI32","CombineRgn",wRgn&,region&,wrgn&,3)
DeleteObject region&
EndWhile
SetWindowRgn(hdl&, wRgn&, 1)
Return wRgn&
ENDPROC
Proc WindowRect
Parameters hdl&,mode$
mode$=Lower$(mode$)
Declare x%, b#
Dim b#,16
External("USER32", "GetWindowRect",hdl&,b#)
Case @&(3)<>0 : External("USER32","ScreenToClient",@&(3),b#) : External("USER32","ScreenToClient",@&(3),b#+8)
Case mode$="breite" : x%=Long(b #,8)-Long(b #,0)
Case mode$="höhe" : x%=Long(b #,12)-Long(b #,4)
Case mode$="x1" : x%=Long(b #,0)
Case mode$="y1" : x%=Long(b #,4)
Case mode$="x2" : x%=Long(b #,8)
Case mode$="y2" : x%=Long(b #,12)
Dispose b#
Return x%
ENDPROC
Proc CursorPos
Parameters mode$
mode$=Lower$(mode$)
Declare x%, mpos#
Dim mpos#,8
External("user32","GetCursorPos",mpos#)
Case @&(2)<>0 : External("USER32","ScreenToClient",@&(2),mpos#)
Case mode$="x1" : x%=long(mpos#,0)
Case mode$="y1" : x%=long(mpos#,4)
Case mode$="x2" : x%=IF(@&(2)<>0,WindowRect(@&(2),"Breite"),%maxx)-long(mpos#,0)
Case mode$="y2" : x%=IF(@&(2)<>02,WindowRect(@&(2),"Höhe"),%maxy)-long(mpos#,4)
Dispose mpos#
Return x%
ENDPROC
LG
Julian |
| | | | |
| | | With me is the Topic ("nur") on the Remember-List. |
| | | | |
| | Julian Schmidt | I hope here does itself soon something. otherwise I will The question, into next Meet, in Pauls PC Forum reinstellen.... |
| | | | |
| | Andreas Miethe
| Well then,
the has well what with AERO To do, is not active see You too under Win7 NICHTS ! |
| | | XProfan X2Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 01/21/13 ▲ |
| |
| | Julian Schmidt | hmmm....you have right! and Why could the lying. |
| | | | |
| | Andreas Miethe
| Error found !
here lying the dog bury
Mach with the Dialogen then works it.
|
| | | XProfan X2Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 01/22/13 ▲ |
| |
| | Julian Schmidt | so I get from irgendeinen reason but not The Titelleiste and fat welt ausgeblendet. Have Windowstyle 240+1024 tuned. I suppose the trouble depends with SetWindowRgn together....
|
| | | | |
| | Andreas Miethe
| | | | XProfan X2Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 01/23/13 ▲ |
| |
| | Julian Schmidt | Have I already before. behave itself similar. |
| | | | |
| | Julian Schmidt | | | | | |
| | | on it liegts not,
The question is go ahead generally set or. the code moreover shows Although a trouble but describe no konkretes trouble or. is vlt. even To bulkily as the erkenntlich is the it for a bestimmtes trouble goes.
in example white I to Andreas Miethes allude not at all More on welchem stood the Text is.
Mach still time a Dreizeiler the the trouble aufzeigt and benenne the konkrete trouble over again. |
| | | | |
| | Julian Schmidt | not absolutely one 3. Zeiler ought to but ok his. i want the no Titelleiste and welt eingeblendet go. Windowstyle shining somehow not To functions.
Def SetLayeredWindowAttributes(4) !"USER32","SetLayeredWindowAttributes"
def SetWindowRgn(3) !"USER32","SetWindowRgn"
def RectRgn(4) !"GDI32","CreateRectRgn"
cls
Var dlg&=Create("Window",%hwnd,"",0,0,%MaxX,%MaxY)
SetTransparent(dlg&,50)
Showwindow(dlg&,1)
CutRgnDLG(dlg&,RectRgn(0,0,0,0))
WhileNot iskey(27)
Endwhile
end
Proc SetTransparent
Parameters Hwnd%, Perc%
External("USER32","SetWindowLongA",Hwnd%, -20, External("USER32","GetWindowLongA",Hwnd%,-20) | $80000)
SetLayeredWindowAttributes(Hwnd%, 0, (255 * Perc%) / 100, $2)
ENDPROC
Proc CutRgnDLG
Parameters hdl&
Declare region&,wRgn&
wRgn&=RectRgn(0,0,width(hdl&)+100,height(hdl&)+100)
whileloop 2,%PCount
region&=@&(&loop)
External("GDI32","CombineRgn",wRgn&,region&,wrgn&,3)
DeleteObject region&
EndWhile
SetWindowRgn(hdl&, wRgn&, 1)
Return wRgn&
ENDPROC
|
| | | | |
|
AnswerTopic-Options | 23.536 Views |
Themeninformationenthis Topic has 3 subscriber: |