VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

SetTransparent

Satin Katiyar  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code makes the form Tranparent but keep the OBJECTS visible.
Orignally Written by Kalani COM
Modified by Satin Katiyar

Inputs
Refrence to form & a array containing the objects to be kept Visible

Assumes
User Must Know how to pass objects.The Example of use is as give below: Here We are assuming a command button having name command1 & Text box Having name Text1 Private Sub Form_Load() Dim obj(1) As Object 'Use no. of controls -1 instead of 1 Set obj(0) = Command1 Set obj(1) = Text1 SetTransparent frm, obj End Sub

API Declarations
Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRECT As RECT) As Long
Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, lpRECT As RECT) As Long
Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As POINTAPI) As Long
Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Public Const RGN_AND = 1
Public Const RGN_COPY = 5
Public Const RGN_DIFF = 4
Public Const RGN_OR = 2
Public Const RGN_XOR = 3
Type POINTAPI
x As Long
Y As Long
End Type
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Rate SetTransparent (16(16 Vote))
SetTransparent.bas

SetTransparent Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters