ini ada contoh buat window transparant, cool.
[local external function]
FUNCTION long GetWindowLong (ulong hWnd, int nIndex) &
LIBRARY "USER32.DLL" ALIAS FOR "GetWindowLongA"
FUNCTION long SetWindowLong (ulong hWnd, int nIndex,
long dwNewLong) &
LIBRARY "USER32.DLL" ALIAS FOR "SetWindowLongA"
//W2K or better
FUNCTION long SetLayeredWindowAttributes &
(long hWnd, Long crKey , char /*Byte*/ bAlpha , Long
dwFlags) &
LIBRARY "USER32.DLL"
[powerscript]
CONSTANT long LWA_COLORKEY = 1, LWA_ALPHA = 2
CONSTANT long GWL_EXSTYLE = - 20
CONSTANT long WS_EX_LAYERED = 524288 //2^19
long ll_Ret, ll_handle
// or-bitwise function
OleObject wsh
wsh = CREATE OleObject
wsh.ConnectToNewObject(
"MSScriptControl.ScriptControl" )
wsh.language = "vbscript"
ll_handle = Handle (this) // handle of the window
ll_Ret = GetWindowLong(ll_handle, GWL_EXSTYLE)
ll_Ret = wsh.Eval(string(ll_ret) + " or " +
string(WS_EX_LAYERED))
SetWindowLong (ll_handle, GWL_EXSTYLE, ll_Ret)
// Set the opacity of the layered window to 128
(transparent)
SetLayeredWindowAttributes (ll_handle, 0,
char(128),LWA_ALPHA)
// Set the opacity of the layered window to 255
(opaque)
// SetLayeredWindowAttributes (ll_handle, 0,
char(255),LWA_ALPHA)
source : http://www.rgagnon.com/pbdetails/pb-0210.html
-bowo-
--- bambang suprianto <[EMAIL PROTECTED]> wrote:
> Teman -teman indopb saya punya topik baru. Saya
> ingin menggunakan External function untuk membuat
> window transparan. Saya mendapatkan source dari VB.
> Namun saya tidak mengerti ketika ada contanta
> seperti :
> Public Const WS_EX_TRANSPARENT = &H20&
> Sedangkan External Functionnya adalah :
> Declare Function SetWindowLong Lib "user32" Alias
> "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex
> As Long, ByVal dwNewLong As Long) As Long
>
> Jika diantara teman-teman ada yang tahu cara untuk
> menkonfersinya saya mohon bantuannya.....
> Salam Bambang Suprianto
>
>
>
> ---------------------------------
> Want to start your own business? Learn how on Yahoo!
> Small Business.
Send instant messages to your online friends http://uk.messenger.yahoo.com
-----------------------------------------------
IndoPB - Indonesia PB User Group
An Indonesian PowerBuilder User Group's Event
2nd PowerBuilder Update
Rumah Sakit Jantung Harapan Kita
26/27 August 2006
To Register :
http://groups.yahoo.com/group/indopb/database?method=addRecord&tbl=4
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indopb/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/indopb/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/