English
Forum

Window teiltransparent

 

Thomas
Freier
can The task not solve, only 50% the Fensters transparent to have, or whom Button nichttransparent. has of/ one a hint, except over two Window to go ?
CompileMarkSeparation
 $H Windows.ph
 $H messages.ph
 $H commctrl.ph
Autor: Sven Schmidts, concept/design
def %LWA_ALPHA $2
def %GWL_EXSTYLE -20
def %WS_EX_LAYERED $80000
def %WS_EX_TRANSPARENT $20
def SetWindowLong(3) !"USER32","SetWindowLongA"
def GetWindowLong(2) !"USER32","GetWindowLongA"
def SetLayeredWindowAttributes(4) !"USER32","SetLayeredWindowAttributes"

Proc SetTransparent

    Declare Old&
    Parameters Hwnd%, Perc%
    Old& = GetWindowLong(Hwnd%,%GWL_EXSTYLE)
    SetWindowLong(Hwnd%, %GWL_EXSTYLE, (Old& | %WS_EX_LAYERED));
    SetLayeredWindowAttributes(Hwnd%, 0, (255 * Perc%) / 100, %LWA_ALPHA);

EndProc

DEF ExtractIcon(3) ! "SHELL32","ExtractIconA"
Def Setwindowposition(7) !"USER32","SetWindowPos"
Def ReleaseCapture(0) !"USER32","ReleaseCapture"

PROC CreateIconButton

    Parameters hndl&,icoInd&,Res$,x%,y%,x1%,y1%
    Declare ico#,icohndl&,Bhndl&
    Dim ico#,(Len(Res$)+1)
    String ico#,0 = Res$
    icohndl& = ExtractIcon(%Hinstance,ico#,icoInd&)
    Bhndl&=Control("BUTTON","",$50000340,x%,y%,x1%,y1%,hndl&,0,%hinstance,$020)
    Sendmessage(Bhndl&,$00F7,1,icohndl&)
    Dispose ico#
    Return Bhndl&

ENDPROC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetTrueColor 1
Windowstyle 93
Windowtitle ""
Window 0,0 - %maxx,40
var Hwnd&=%Hwnd
cls @RGB(31,31,31)
@Setwindowposition(Hwnd&,-1,0,0,%maxx,40,$42)
SetTransparent %Hwnd, 30
CreateICONBUTTON %hwnd,27,"SHELL32.DLL",0,0,0,0
var ICON20&=@&(0)
@Create("Tooltip",%hwnd,ICON20&,"Beendet das Programm")
SetWindowPos icon20&=(%maxx-50),0-32,32;0
SetFocus(%hwnd)

while 1

    GetMessage

    If GetFocus(icon20&)

        BREAK

    ElseIf (%message=$201) & GetFocus(Hwnd&)

        UseCursor 5
        SendMessage(%hwnd,$112,$F012,0)
        ReleaseCapture()
        UseCursor 0
        SetFocus(%hwnd)

    EndIf

We
END
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/16/08  
 




Dieter
Zornow
attempt still time a dialog without title bar under whom Button To settle
CompileMarkSeparation
var dlg& = Create("Dialog",%hwnd,"",10,10,200,300)
setstyle dlg&,Getstyle(dlg&) - 12582912e>

Habs not ausprobiert, only so a idea
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
11/16/08  
 




Thomas
Freier
Dieter, the have I almost everything tested. DIALOG, STATIC, CHILDWINDOW, etc. . becomes everything transparent. with of/ one Hardcopie is incidentally nothing tranparent.
The Key lying well with :
CompileMarkSeparation
now should I only yet know, whether for a few ELEMENTE 100% transparent tuned go can.
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/16/08  
 



How I the see there 2 ways: [...] 

lane 1 is crKey and lane 2 _BLENDFUNCTION [...] 

naturally, there must one itself einarbeiten - but one Result this for XProfan becomes sure many interested... (me too)

on the best would The Regions-Variante, if possible.
 
11/16/08  
 




Thomas
Freier
the faith I. would be me too interested, still unfortunately can I me lest into next 15 weeks detain. after a AugenOP can my Holde large Schriften (Image) reading what about me hope, I me now the Zeitungsvorlesen save can, if I The as e-paper refer. unfortunately are The Button the PDF-Viewer To small and meets tappt im dunkeln with the peg at salver-PC not. means one Hilfmittel (Control the PDF and Textauswahl to that Vorlesen let) over one small XProfan-Tool release, the at the same time as ruler serve should. ideal was is, if the ruler transparent is. then suffering but the Erkennbarkeit the Button. will be try it with colours To kompensieren.

105 kB
Hochgeladen:11/17/08
Downloadcounter173
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/17/08  
 



I could me present, that Andreas Miethe [...]  moreover something from the Ärmel shake, if it time over the Thread here stumbling.
 
11/17/08  
 




Andreas
Miethe


iF
I could me present, that Andreas Miethe [...]  moreover something from the Ärmel shake, if it time over the Thread here stumbling.



CompileMarkSeparation
 $H Windows.ph
 $H messages.ph
 $H commctrl.ph
def %LWA_ALPHA $2
def %GWL_EXSTYLE -20
def %WS_EX_LAYERED $80000
def %WS_EX_TRANSPARENT $20
def SetWindowLong(3) !"USER32","SetWindowLongA"
def GetWindowLong(2) !"USER32","GetWindowLongA"
def SetLayeredWindowAttributes(4) !"USER32","SetLayeredWindowAttributes"

Proc SetTransparent

    Declare Old&
    Parameters Hwnd%, Perc%
    Old& = GetWindowLong(Hwnd%,%GWL_EXSTYLE)
    SetWindowLong(Hwnd%, %GWL_EXSTYLE, (Old& | %WS_EX_LAYERED));
    SetLayeredWindowAttributes(Hwnd%, RGB(31,31,31), (255 * Perc%) / 100,$2)

EndProc

DEF ExtractIcon(3) ! "SHELL32","ExtractIconA"
Def Setwindowposition(7) !"USER32","SetWindowPos"
Def ReleaseCapture(0) !"USER32","ReleaseCapture"

PROC CreateIconButton

    Parameters hndl&,icoInd&,Res$,x%,y%,x1%,y1%
    Declare ico#,icohndl&,Bhndl&
    Dim ico#,(Len(Res$)+1)
    String ico#,0 = Res$
    icohndl& = ExtractIcon(%Hinstance,ico#,icoInd&)
    Bhndl&=Control("BUTTON","",$50000340,x%,y%,x1%,y1%,hndl&,0,%hinstance,$020)
    Sendmessage(Bhndl&,$00F7,1,icohndl&)
    Dispose ico#
    Return Bhndl&

ENDPROC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetTrueColor 1
Windowstyle 93
Windowtitle ""
Window 0,0 - %maxx,40
var Hwnd&=%Hwnd
cls @RGB(31,31,31)
@Setwindowposition(Hwnd&,-1,0,0,%maxx,40,42)
SetTransparent %Hwnd, 30
Var p& = Control("#32770","",$90000000,%winright-54,%wintop+4,32,32,%hwnd,0,%hInstance,0)
Var Icon20& = CreateICONBUTTON(p&,27,"SHELL32.DLL",0,0,0,0)
@Create("Tooltip",%hwnd,ICON20&,"Beendet das Programm")
SetWindowPos icon20&=0,0-32,32;0
SetFocus(%hwnd)
Usermessages ~WM_MOVE
Var ende& = 0

whilenot ende&

    waitinput
    GetMessage

    If GetFocus(icon20&)

        ende& = 1

    ElseIf (%message=$201) & GetFocus(Hwnd&)

        UseCursor 5
        ~SetParent(p&,%hwnd)
        ~Movewindow(p&,width(%hwnd)-52,1,32,32)
        SendMessage(%hwnd,$112,$F012,0)
        ReleaseCapture()
        ~SetParent(p&,0)
        ~Movewindow(p&,%winright-54,%wintop+4,32,32)
        UseCursor 0
        SetFocus(%hwnd)

    EndIf

END
 
Gruss
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 :  [...] 
11/17/08  
 



hey, I ought to this set in my Signatur take in!
 
11/17/08  
 




Thomas
Freier
Andreas, this is it! VIELEN DANK!
was Although a Weilchen frantic, that everything lane was, if %hWnd whom Focus having. first under XProfan11 stayed everything to the move receive.
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/18/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.334 Views

Untitledvor 0 min.
Peter Max Müller10/22/17
Tommy08/14/16
RICOSCH12/20/14
Paul Glatz09/27/14
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie