Results 1 to 6 of 6

Thread: โค้ด Vb ครับทำให้โปรแกรมโปร่งแสงครับ

  1. #1


    ไม่บอกนะครับว่าเอาไปเขียนส่วนไหน คนใช้ Vb เป็นมองทีเดียว ก็อปไปวางได้เลย
    MakeTransparent Me.hWnd, 50

    Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

    Private Const GWL_EXSTYLE = (-20)
    Private Const LWA_ALPHA = &H2
    Private Const WS_EX_LAYERED = &H80000

    Public Function MakeTransparent(ByVal hWnd As Long, Perc As Integer) As Long
    Dim msg As Long
    On Error Resume Next
    If Perc < 0 Or Perc > 255 Then
    MakeTransparent = 1
    Else
    msg = GetWindowLong(hWnd, GWL_EXSTYLE)
    msg = msg Or WS_EX_LAYERED
    SetWindowLong hWnd, GWL_EXSTYLE, msg
    SetLayeredWindowAttributes hWnd, 0, Perc, LWA_ALPHA
    MakeTransparent = 0
    End If
    If Err Then
    MakeTransparent = 2
    End If
    End Function

  2. #2
    Junior Member
    Join Date
    May 2009
    Posts
    11


    ไม่เลวครับ โค๊ดนี้...เอาไปปรับใช้อีกหน่อย ได้ระดับเลย

  3. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    1



    <_< ตอนแรกก็กะจะเอาไปใช้ดู แต่พอดีความรู้ยังไม่ถึงเลยไม่รู้จะเอาไปใส่ตรงไหน

  4. #4
    rungun123
    Guest


    เอาไปใส่ตรงไหนอ่าครับ
    end function
    เหมือนในสคริป gtaเลยครับ

  5. #5


    ขอเพิ่มให้นะครับ เอาประโยคนี้
    MakeTransparent Me.hWnd, 50
    ไปใส่ตอนที่เราเรียกอีเว้นขึ้นมาอาจจะเป็น ตอน Form ที่อีเว้น FormLoad หรือที่ Command ก็ได้
    หรือจะทำเป็น slide จากไปร่งใสไปทึบ หรือ จะทึบไปโปร่งใสก็ได้ครับ
    จะให้ใสเท่าไรก็เปลี่ยนตัวเลขด้านหลังเอาครับ

    นี่ครับลองเอาไปเล่นดูครับ

    **Hidden Content: To see this hidden content your post count must be 3 or greater.**
    [color=#9999FF] By Bird Programmer
    Electronics_Software_Engineer[/color]

  6. #6
    Junior Member CkW's Avatar
    Join Date
    Aug 2009
    Location
    หน้าคอม
    Posts
    22


    นี่ครับ Code อย่างละเอียด พร้อม Code + EXE

    ทำให้สีแต่ละสีหายไปได้

    VB Code Make Transparent [สร้างความโปร่งใสให้กับ Form]

    http://citec.us/forum/VB-Code-Make-Transpa...orm-t31124.html

    VB Code Make Transparent [สร้างความโปร่งใสให้กับ Form] #2

    http://citec.us/forum/VB-Code-Make-Transpa...m-2-t31138.html
    Credit : CkW

Similar Threads

  1. Replies: 0
    Last Post: 29-09-2009, 05:26 PM
  2. โค้ด Vb ครับ Macro
    By stepno01 in forum Visual Basic
    Replies: 0
    Last Post: 01-05-2009, 06:50 PM
  3. Replies: 0
    Last Post: 06-10-2008, 06:27 AM
  4. โค้ด การทำ user online
    By zamoko in forum PHP,ASP,Javascript, Html
    Replies: 0
    Last Post: 13-09-2008, 05:49 PM
  5. โค้ด Opacity (ทำให้จางๆ)
    By freeze in forum PHP,ASP,Javascript, Html
    Replies: 0
    Last Post: 26-04-2007, 05:58 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

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