1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

VB6 Knowledge Necessary

Discussion in 'Visual Basic ( VB )' started by Aether, Feb 20, 2006.

  1. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    Ok. I Want To Know:
    ╣Different Ways to Use Winsock.
    ╣How To Make An Ip Scanner.
    ╣How To Make A Form Flash And Then End
    ╣How To Make A Forms Visibility At About 50 %
    Yes, I Am A Little New To V.B.6 Programming, But I Am Learning Fast. :D
     
  2. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Probably I have some of them and will definitely put them here.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    http://cuinl.tripod.com/downloads/winsockdownload.zip
    http://cuinl.tripod.com/downloads/NewHagChat.zip
    Can you please clarify this a bit more
    Can you please clarify this a bit more
    It Makes the Form transparent but I guess you can see it make it 50 % visibility
    Code:
    Option Explicit
    
    Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, _
    ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As _
    Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal _
    nCombineMode As Long) As Long
    Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As _
    Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
    
    Public Sub TransparentForm(frm As Form)
        frm.ScaleMode = vbPixels
        Const RGN_DIFF = 4
        Const RGN_OR = 2
    
        Dim outer_rgn As Long
        Dim inner_rgn As Long
        Dim wid As Single
        Dim hgt As Single
        Dim border_width As Single
        Dim title_height As Single
        Dim ctl_left As Single
        Dim ctl_top As Single
        Dim ctl_right As Single
        Dim ctl_bottom As Single
        Dim control_rgn As Long
        Dim combined_rgn As Long
        Dim ctl As Control
    
        If frm.WindowState = vbMinimized Then Exit Sub
    
        ' Create the main form region.
        wid = frm.ScaleX(frm.Width, vbTwips, vbPixels)
        hgt = frm.ScaleY(frm.Height, vbTwips, vbPixels)
        outer_rgn = CreateRectRgn(0, 0, wid, hgt)
    
        border_width = (wid - frm.ScaleWidth) / 2
        title_height = hgt - border_width - frm.ScaleHeight
        inner_rgn = CreateRectRgn(border_width, title_height, wid - border_width, _
            hgt - border_width)
    
        ' Subtract the inner region from the outer.
        combined_rgn = CreateRectRgn(0, 0, 0, 0)
        CombineRgn combined_rgn, outer_rgn, inner_rgn, RGN_DIFF
    
        ' Create the control regions.
        For Each ctl In frm.Controls
            If ctl.Container Is frm Then
                ctl_left = frm.ScaleX(ctl.Left, frm.ScaleMode, vbPixels) _
                    + border_width
                ctl_top = frm.ScaleX(ctl.Top, frm.ScaleMode, vbPixels) + title_height
                ctl_right = frm.ScaleX(ctl.Width, frm.ScaleMode, vbPixels) + ctl_left
                ctl_bottom = frm.ScaleX(ctl.Height, frm.ScaleMode, vbPixels) + ctl_top
                control_rgn = CreateRectRgn(ctl_left, ctl_top, ctl_right, ctl_bottom)
                CombineRgn combined_rgn, combined_rgn, control_rgn, RGN_OR
            End If
        Next ctl
    
        'Restrict the window to the region.
        SetWindowRgn frm.hWnd, combined_rgn, True
    End Sub
    Code Coutesy vbtown
     
  5. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    Ok. Sorry About Lack Of Clarit, My Friend.
    ╣IP-Scanner: A Tool Used To Check For Internet Protocol Addresses, To See If They Are Active, Like A Proxy Checker.
    ╣The Form Flash And End: I Want A Form To Suddenly Flash White And Then Unload, Or End.
     
  6. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    Ok. Sorry About Lack Of Clarit, My Friend. <---And The Typos Come Pouring In, Lol.
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    You can use the gethostbyname API or gethostbyaddr API to achieve the results.
    Code:
    //gethostbyname API declaration
    Declare Function gethostbyname _
        Lib "ws2_32.dll" (ByVal host_name As String) As Long
    
    //HOSTENT Structure elements
    Type HOSTENT
        hName     As Long
        hAliases  As Long
        hAddrType As Integer
        hLength   As Integer
        hAddrList As Long
    End Type
    
    //gethostbyaddr API declaration
    Declare Function gethostbyaddr Lib "ws2_32.dll" (addr As Long, _
                                                     ByVal addr_len As Long, _
                                                     ByVal addr_type As Long) As Long
    
    Isnt that just the change in the background color of the form and then calling the End.

    Thanks
    Shabbir
     
  8. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    Thanks Man
    __
    | |34C 3
    |__|
    |
    ----------------Æthereal Haze---------
     
  9. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    ACK!!! that messed up shap ewas supposed to be a P.. Lol.
     
  10. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    :)
     
  11. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    Shabbir. If ya want to, You may add my yahoo name. I wold actually greatly enjoy it :)
    the name is: aethereal_haze <--messenger
    or : elite.outbreak <--mail
     
  12. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Added.
     
  13. Aether

    Aether New Member

    Joined:
    Feb 20, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    I Am Fifteen. :|
    Location:
    -=()N-=()=-C()=-
    Home Page:
    :)
    Kk.. Now.. To Get Back To Working On My Current Project. Added So far TO Project:
    Secure Password Generator
    Web Browser
    IP Port Scanner.
    Address Book Keeper
    Yahoo/Msn/Emails.Net Logins
    Some Cute Tricks With The Form :)
    Music On Open
    Windows Only Section
    .....................................
    _____________________________________+
    I Need More Ideas Of Things To Add... _____+
    Anyone Got Ideas?______________________+
    _____________________________________+
     
  14. davit_c

    davit_c New Member

    Joined:
    Oct 20, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi... :)

    I've try the code to make the form transparent. But how to make it 50% visibility?

    anyway, thanks for the code :)
     

Share This Page