Transparent windows 
Author Message
 Transparent windows

How can I make a transparent window? I want to do a program like those from
messagemates.com or the Norton Crashguard window (the shield).

I know that there is a way to make a transparent window. I have tried with
BitBlt to the desktop window, but it is too slow. I can see how it clears
the image and draws the new one, even with a size of 100x100 pixels!

Also, how could I do the C "<<" and ">>" operations in VB? When i try do do
something like A = A * 256, i usually get an overflow error, and if I ignore
it, the variable is set to zero. When i compile it with the integer overflow
check disabled it works, but i'd like it to work in the IDE too. I have VB5



Wed, 18 Jun 1902 08:00:00 GMT  
 Transparent windows
Dear Wadim!

Concerning transparency BitBlt is correct approach
Try to check code - single BitBlt for the whole screen should take
tens ms depending on graphic card, graphic mode, graphic driver,
CPU speed. There are a lot of examples in www

Concerning shifts - there is nothing in VB. i WOULD
propose to move shifts in C DLL.-
You can use multiply and divide (there is integer division in VB)
and to avoid overflow you should first check the range of results
function shift8left(a as integer)
dim temp as integer
temp = a and 255
if temp >127 then
    temp = temp and 127
    shift8left = (temp*256) or &h8000
else
    shift8left = temp*256
endif
end function
Best regards

Quote:

> How can I make a transparent window? I want to do a program like those from
> messagemates.com or the Norton Crashguard window (the shield).

> I know that there is a way to make a transparent window. I have tried with
> BitBlt to the desktop window, but it is too slow. I can see how it clears
> the image and draws the new one, even with a size of 100x100 pixels!

> Also, how could I do the C "<<" and ">>" operations in VB? When i try do do
> something like A = A * 256, i usually get an overflow error, and if I ignore
> it, the variable is set to zero. When i compile it with the integer overflow
> check disabled it works, but i'd like it to work in the IDE too. I have VB5

--
<HTML>



Wed, 18 Jun 1902 08:00:00 GMT  
 Transparent windows

Quote:

>How can I make a transparent window? I want to do a program like those from
>messagemates.com or the Norton Crashguard window (the shield).

Check my demo at:
http://www.fullspectrum.com/deeth/unfinished/alienhead.zip

Quote:
>Also, how could I do the C "<<" and ">>" operations in VB? When i try do do
>something like A = A * 256, i usually get an overflow error, and if I
ignore
>it, the variable is set to zero. When i compile it with the integer
overflow
>check disabled it works, but i'd like it to work in the IDE too. I have VB5

I use the following functions for bitshifts:
Function SHL(Bits As Long, Shift As Long) As Long
    If Shift = 31 Then
        SHL = Bits * &H80000000
    Else
        SHL = Bits * 2 ^ Shift
    End If
End Function

Function SHR(Bits As Long, Shift As Long) As Long
    If Shift = 31 Then
        SHR = Bits \ &H80000000
    Else
        SHR = Bits \ 2 ^ Shift
    End If
End Function

If you're dealing with bytes or integers, you then have to cut off the high
bytes.  For example:
Dim X As Byte
X = 101
X = SHL(X, 4) And &HFF&

Dim Y As Integer
Y = 10101
Y = SHL(Y, 8) And &HFFFF&

I actually have several variants of these functions which are faster for
some things and some that do more error checking, etc.  In some cases, you
can get a speed improvement by precalculating the shifts and storing them in
an array...

MM



Wed, 18 Jun 1902 08:00:00 GMT  
 Transparent windows
If you are after a nice looking Transparent window like Windows 2000
offers you may want to try Dewx. http://www.solutions.nu/dewx

Just drop the control on your page and it becomes 'translucent' or
transparent. It's a lot easier than doing APIs. Of course this only
works with Windows 2000, and just looks normal everywhere else.

You can also do odd shaped forms with it.



Quote:
> How can I make a transparent window? I want to do a program like
those from
> messagemates.com or the Norton Crashguard window (the shield).

> I know that there is a way to make a transparent window. I have tried
with
> BitBlt to the desktop window, but it is too slow. I can see how it
clears
> the image and draws the new one, even with a size of 100x100 pixels!

> Also, how could I do the C "<<" and ">>" operations in VB? When i try
do do
> something like A = A * 256, i usually get an overflow error, and if I
ignore
> it, the variable is set to zero. When i compile it with the integer
overflow
> check disabled it works, but i'd like it to work in the IDE too. I
have VB5

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Transparent Windows in Windows 2000

2. Transparent windows in windows 95/98 how to ?

3. Transparent windows in windows 95/98 how to ?

4. Transparent Windows/Forms

5. Floating Transparent Window

6. Transparent Window

7. Transparent Window

8. Transparent Windows

9. Transparent Windows/Forms in VB3

10. Transparent Window

11. Writing a VBX: Transparent window possible?

12. transparent windows

 

 
Powered by phpBB® Forum Software