i want to make my project's look like windows 7 have..means glass interface, and buttons, all controls graphics like windows 7.
i have searched alot, but i could not find...can u help me regrading this?

See if this help :

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

Private Const GWL_EXSTYLE As Long = -20
Private Const WS_EX_LAYERED As Long = &H80000
Private Const LWA_ALPHA As Long = &H2

Public Function Transparant(hwnd As Long, percent As Integer, pil As Boolean)
    Dim before As Long
    before = GetWindowLong(hwnd, GWL_EXSTYLE)
    If pil = True Then
        before = before Or WS_EX_LAYERED
        SetWindowLong hwnd, GWL_EXSTYLE, before
        SetLayeredWindowAttributes hwnd, 0, 255 * (percent / 100), LWA_ALPHA
    Else
        before = before And Not WS_EX_LAYERED
        SetWindowLong hwnd, GWL_EXSTYLE, before
    End If
End Function

Private Sub Form_Load()
Transparant Me.hwnd, Val(70), True  ' 70%
End Sub

yes,,you can make your all control seems like windows version..means in xp it looks in xp style or in win 7 its likes win 7..
just add manifest file on your project..

i dont know how to use manifest file...i have code of manifest and i have made manifest file, but i dont know the way how to use that...can u plz tell me..
i have manifest file in c with this path and name" C:/vb6/vb6.exe.manifest"
will you please tell me the way how to use that with vb and controls.

Comments
whom are you trying to fool ?

and the code u have wrote above is not working on Midi Child Form....

Comments
the will work if you try to understand it, not simply copy paste.

i dont know how to use manifest file...i have code of manifest and i have made manifest file, but i dont know the way how to use that...can u plz tell me..
i have manifest file in c with this path and name" C:/vb6/vb6.exe.manifest"
will you please tell me the way how to use that with vb and controls.

Put manifest file on your project folder.
ex : your exe project name is EmployeeData.exe then rename manifest file into EmployeeData.exe.manifest then running EmployeeData.exe. you will see the changed.

and the code u have wrote above is not working on Midi Child Form....

use your midi formname instance of me..

Private Sub Form_Load()
  Transparant YourFormName.hwnd, Val(70), True ' 70%
End Sub

SOrry Jx_both are not working.
i m creating an exe of my vb project and also creating manifest file in same folder, but changes are not shown...


and also not working on mdi..

Private Sub Form_Load()
  Transparant form2.hwnd, Val(60), True
End Sub

Edited 5 Years Ago by Jaseem Ahmed: n/a

transperncy form in mdi form is working to me..
put the same code in mdi form..

and for the manifest file..
if the manifest file is not working then your exe file cannot shown up..
if exe file appear then manifest file is working.

This question has already been answered. Start a new discussion instead.