Results 1 to 2 of 2

Thread: laggy loading problem Question

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    1

    laggy loading problem Question

    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:
    1. Private Sub Form_Load()
    2. Dim Height As Integer
    3. Dim Width As Integer
    4. Dim Wf As Integer
    5. Dim Hf As Integer
    6. Dim PicColor As Long
    7. Dim y As Integer
    8. Dim X As Integer
    9. Dim StartX As Integer
    10. Picture1.Picture = LoadPicture(App.Path & "\skin02\config.gif")
    11.  
    12. Width = Picture1.Width
    13. Height = Picture1.Height
    14. Pic = Picture1.hDC
    15. Wf = Picture1.ScaleWidth
    16. Hf = Picture1.ScaleHeight
    17. InFirst = True: InSkin = True: PicColor = RGB(255, 0, 0)
    18. For y = 0 To Hf - 1
    19.     For X = 0 To Wf
    20.             If GetPixel(Pic, X, y) <> PicColor Then
    21.                 If InSkin Then
    22.                     StartX = X
    23.                     InSkin = False
    24.                 Else
    25.                     If X = Wf Then
    26.                     Area = CreateRectRgn(StartX, y, X - 1, y + 1)
    27.                     DoInPicColor
    28.                 End If
    29.                 End If
    30.             Else
    31.                 If Not InSkin Then
    32.                     Area = CreateRectRgn(StartX, y, X - 1, y + 1)
    33.                     DoInPicColor
    34.                     InSkin = True
    35.                 End If
    36.             End If
    37.     Next
    38.     InSkin = True
    39. Next
    40. SetWindowRgn Me.hwnd, FullArea, True
    41.            
    42.  
    43. End Sub
    44.  
    45.  
    46. Private Sub DoInPicColor()
    47. If InFirst Then
    48.     FullArea = Area
    49.     InFirst = False
    50. Else
    51.     CombineRgn FullArea, FullArea, Area, 2
    52.     DeleteObject Area
    53. End If
    54. 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?
    >_<
    Last edited by sai_student; Jul 8th, 2005 at 04:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width