Board index » cppbuilder » Re: Clipboard copy

Re: Clipboard copy


2006-09-08 11:56:58 AM
cppbuilder62
Will you please take a look at www.mytsoft.com.
that's what I wish to accomplish but simpler just ALPHA keys.
 
 

Re:Re: Clipboard copy

"Alain" < XXXX@XXXXX.COM >wrote:
Quote

Will you please take a look at www.mytsoft.com.
As I have stated more than once, I have looked at it.
Quote
that's what I wish to accomplish but simpler just ALPHA keys.
It doesn't matter that you want to limit the keys. You still
have to deal with Windows and how it segregates processes.
It seems to me like you're looking for a "Do this and it will
work" answer but your ignoring the complexities of the OS.
If any one can think of a better solution than my last post,
I'd like to hear it.
~ JD
 

Re:Re: Clipboard copy

Hello All,
How do I use TTrackbar component to set percentage/degree of OPACITY of a
FORM ?
to be able to see thru or the application running behind.
Thanks
Alain
 

{smallsort}

Re:Re: Clipboard copy

I am using C++ Builder 4 Enterprise
and also wish to port to Kylix 3 "C++ Builder 6"
"Michel Leunen" < XXXX@XXXXX.COM >wrote in message
Quote
Alain wrote:

>How do I use TTrackbar component to set percentage/degree of OPACITY of
>a FORM ?
>to be able to see thru or the application running behind.

If you have BDS2006 or Turbo C++, just set the AlphaBlend property of your
form to true and use your trackbar to change the AlphaBlendValue of the
form. That's all.

If you're using an old BCB version, You need to give your form the
WS_EX_LAYERED style by yourself:

#define WS_EX_LAYERED 0x00080000
#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002

SetWindowLong(Handle,
GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) | WS_EX_LAYERED);

And then specify an alphablending value:

typedef DWORD (WINAPI *SLWAFUNC)(HWND, DWORD, BYTE, DWORD);
HMODULE hDLL=LoadLibrary("user32");
SLWAPtr=(SLWAFUNC)GetProcAddress(hDLL,"SetLayeredWindowAttributes");

SLWAPtr (Handle,
RGB(255,255,255),
factor,
LWA_COLORKEY|LWA_ALPHA);

with factor being the degree of transparency you want

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:Re: Clipboard copy

Alain wrote:
Quote
How do I use TTrackbar component to set percentage/degree of OPACITY of a
FORM ?
to be able to see thru or the application running behind.
If you have BDS2006 or Turbo C++, just set the AlphaBlend property of
your form to true and use your trackbar to change the AlphaBlendValue of
the form. That's all.
If you're using an old BCB version, You need to give your form the
WS_EX_LAYERED style by yourself:
#define WS_EX_LAYERED 0x00080000
#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002
SetWindowLong(Handle,
GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) | WS_EX_LAYERED);
And then specify an alphablending value:
typedef DWORD (WINAPI *SLWAFUNC)(HWND, DWORD, BYTE, DWORD);
HMODULE hDLL=LoadLibrary("user32");
SLWAPtr=(SLWAFUNC)GetProcAddress(hDLL,"SetLayeredWindowAttributes");
SLWAPtr (Handle,
RGB(255,255,255),
factor,
LWA_COLORKEY|LWA_ALPHA);
with factor being the degree of transparency you want
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:Re: Clipboard copy

Alain wrote:
Quote
I am using C++ Builder 4 Enterprise
use the second method as BCB4 doesn't know nothing about
SetLayeredWindowAttributes().
Quote
and also wish to port to Kylix 3
Sorry, I don't have Kylix and I don't know how to port this to Kylix.
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:Re: Clipboard copy

Just found out that the On Screen Keyboard "OSK" is and built in featuire of
WinXP !!!
Just press WinLogo key +U