ah I'm sorry I don't know that . Thankyou Dglienna
here's source code and related thing
as see in this picture
![]()
as in the main form (mascot.frm)
VB Code:
Private Sub Form_Load() Dim Height As Integer Dim Width As Integer Dim Wf As Integer Dim Hf As Integer Dim PicColor As Long Dim y As Integer Dim X As Integer Dim StartX As Integer Picture1.Picture = LoadPicture(App.Path & "\skin02\config.gif") Width = Picture1.Width Height = Picture1.Height Pic = Picture1.hDC Wf = Picture1.ScaleWidth Hf = Picture1.ScaleHeight InFirst = True: InSkin = True: PicColor = RGB(255, 0, 0) For y = 0 To Hf - 1 For X = 0 To Wf If GetPixel(Pic, X, y) <> PicColor Then If InSkin Then StartX = X InSkin = False Else If X = Wf Then Area = CreateRectRgn(StartX, y, X - 1, y + 1) DoInPicColor End If End If Else If Not InSkin Then Area = CreateRectRgn(StartX, y, X - 1, y + 1) DoInPicColor InSkin = True End If End If Next InSkin = True Next SetWindowRgn Me.hwnd, FullArea, True End Sub Private Sub DoInPicColor() If InFirst Then FullArea = Area InFirst = False Else CombineRgn FullArea, FullArea, Area, 2 DeleteObject Area End If End Sub
This code make form transparant by combining each pixel that isn't have color r(255,0,0) (which is red)
I use this code to transparent the main form as you see below
![]()
and I try using it with another form (Config.frm)
this form will pop-up when you click on that little girl (sorry my drawing skill suck) using Config.Show
but there's one problem with that
when click
![]()
for about 0.5 second
![]()
the frame will take a little time before it's goes transparant
Is there any method to solve this?
>_<




Reply With Quote