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