Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How do i create transparent form like this?

http://img308.imageshack.us/img308/8084/screenshot0ud.gif

I am Biginner

I try to use this API(In my module)

Public Declare Function SetWindowLong Lib "USER32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Declare Function SetLayeredWindowAttributes Lib "USER32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

With this code(In form)

Private Sub Form_Load()
SetWindowLong Me.hWnd, (-20), &H80000
SetLayeredWindowAttributes Me.hWnd, 0, 200, &H1
End Sub

It will transparent all black color in this form.
But I want to make somethings like this
without form's border
with other color.

I'm thai, I can't use English language fluently.
[856 byte] By [sarun101] at [2007-11-11 7:39:13]
# 1 Re: How do i create transparent form like this?
It's VERY difficult to do with Visual Basic 6.

You're better off using .NET, and using the GDI+ controls.
RHelliwell at 2007-11-11 17:26:44 >
# 2 Re: How do i create transparent form like this?
This will get you what you want.

vbAccelerator article (http://www.vbaccelerator.com/home/vb/code/Libraries/Graphics_and_GDI/Changing_Window_Shapes/Window_Shapes_Using_Layering/article.asp)

oh, and it is not difficult at all. Just check out the Simple Layered Window Sample (http://www.vbaccelerator.com/home/vb/code/Libraries/Graphics_and_GDI/Changing_Window_Shapes/Window_Shapes_Using_Layering/Simple_Layered_Window_Sample.asp)
bkbroiler at 2007-11-11 17:27:44 >