Transparent Form


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Transparent Form

  1. #1
    Join Date
    Oct 2005
    Posts
    133

    Transparent Form

    Hi All

    i am wanting my login form to take shape of the rounded rectangle picture

    but all my code seems to make everything attached to the form except text boxes and command buttons transparent even picture boxes, how would i go about doing this

    my code is as follows

    SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
    SetWindowPos Me.hwnd, HWND_TOPMOST, 1&, 1&, 1&, 1&, SWP_SHOWME

    and i have the following in a module

    Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

    Public Const GWL_EXSTYLE = (-20)
    Public Const WS_EX_TRANSPARENT = &H20&
    Public Const SWP_FRAMECHANGED = &H20
    Public Const SWP_NOMOVE = &H2
    Public Const SWP_NOSIZE = &H1
    Public Const SWP_SHOWME = SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE
    Public Const HWND_NOTOPMOST = -2

    Dim path As String

    any help is always appreciated

    thanks in advance
    Rob

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    see if this help:

    http://vb-helper.com/howto_elliptical_form.html

    using different Region you can use the shape you want
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Similar Threads

  1. How do i create transparent form like this?
    By sarun101 in forum VB Classic
    Replies: 2
    Last Post: 04-20-2006, 02:55 PM
  2. Replies: 3
    Last Post: 08-09-2005, 01:59 PM
  3. Replies: 0
    Last Post: 04-11-2002, 07:48 PM
  4. How to make a form transparent?
    By ivo in forum VB Classic
    Replies: 2
    Last Post: 09-26-2000, 01:54 PM
  5. How to make a form transparent?
    By ivo in forum VB Classic
    Replies: 0
    Last Post: 09-26-2000, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center