Transparent forms


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Transparent forms

  1. #1
    Alf Eliassen Bergum Guest

    Transparent forms


    Do you have any ideas regarding how to write some code to create transparent
    forms in VB (e.g. symbol overlays in maritime navigation chart systems)?

    With regards

    Alf E. Bergum,
    Managing director,
    Millennium MultiWare,
    Strandgaten 30 - Damgaarden,
    N-4370 Egersund,
    Norway.

    Phone: (+47) 51 46 98 22 (direct)
    Fax (ISDN): (+47) 51 46 98 25
    Fax (analog): (+47) 51 49 57 10
    Mobile: (+47) 976 55 085
    WWW: http://www.multiware.no
    Share on Google+

  2. #2
    Tim Patrick Guest

    Re: Transparent forms


    If by "transparent forms" you mean non-rectangular forms, you can use the
    SetWindowRgn API call (see the function in the platform SDK at http://msdn.microsoft.com/library/ps...tdraw_2him.htm).
    You can set up a region and then use it to restrict the window. (Read about
    regions at http://msdn.microsoft.com/library/ps...ions_7ab7.htm.)
    There are also several third party products that simplify the process of
    building non-rectangular regions.

    I also found a product on the web that says it can create translucent forms.
    The product is called AgTransform, from Agendum Software (http://www.agendumsoftware.com/).
    There may be other products as well that offer similar functionality.

    -----
    Tim Patrick
    tim@vbstyleguide
    Share on Google+

  3. #3
    Frixos Kimonis Guest

    Re: Transparent forms

    Hello Alf,

    Karl E. Peterson has a great example on his site at :

    http://www.mvps.org/vb/

    Look for 'Translucent.zip''

    Frixos

    "Alf Eliassen Bergum" <alf@multiware.no> wrote in message
    news:39b61969$1@news.devx.com...
    >
    > Do you have any ideas regarding how to write some code to create

    transparent
    > forms in VB (e.g. symbol overlays in maritime navigation chart systems)?
    >
    > With regards
    >
    > Alf E. Bergum,
    > Managing director,
    > Millennium MultiWare,
    > Strandgaten 30 - Damgaarden,
    > N-4370 Egersund,
    > Norway.
    >
    > Phone: (+47) 51 46 98 22 (direct)
    > Fax (ISDN): (+47) 51 46 98 25
    > Fax (analog): (+47) 51 49 57 10
    > Mobile: (+47) 976 55 085
    > WWW: http://www.multiware.no



    Share on Google+

  4. #4
    rwallace Guest

    Re: Transparent forms


    If you are talking about what I think you are, what you're looking for is
    akin to what graphic designers call a 'layer'. Simply put, this is nothing
    more than an overlay of an existing form or picture that adds text or icons,
    or whatever to be superimposed on something else.

    The best way I know of doing this, is to create a very simple ActiveX control
    that will use the following properties (other than the standard native events,
    properties, and methods:

    Picture (map to control)
    MaskPicture (map to control)
    MaskColor (map to control)

    When designing the control, pick a color for the mask that will be very unlikely
    to ever be present in any overlay you might use.
    Also add a small snippet of code to make the mask picture the same as the
    picture (insert the following code in the Picture set property):

    Set UserControl.MaskPicture = UserControl.Picture

    (I honestly forget if you need to use 'set' or 'let'... but I think it's
    'set')

    Also make sure you add the standard color and picture property pages to the
    control before you compile it.

    When you use the control, simply open the properties window and load a picture
    that has exactly what you want to overlay, making sure that the entire background
    is the color you want to use as your mask... this will make it appear if
    there is a transparant overlay.

    Since a control can be set to be a container too, with some nifty coding,
    you could also make your control contain text labels (dynmaically created),
    that you can change on-the-fly during run-time... this would not require
    the picture masking (unless you wanted icons too.

    Feel free to email me if you have any questions, and I will be happy to send
    you the code that is required for both options, as well as answering any
    questions you might have (to the best of my ability of course
    Share on Google+

Similar Threads

  1. Replies: 2
    Last Post: 02-21-2002, 06:28 AM
  2. VB Transparent Forms
    By Stacey Hamilton in forum VB Classic
    Replies: 4
    Last Post: 11-09-2000, 01:38 AM
  3. VB Transparent Forms
    By Stacey Hamilton in forum VB Classic
    Replies: 0
    Last Post: 11-08-2000, 03:30 PM
  4. Problem in Access 97 Using Forms and Sub Forms
    By Barend Esterhuizen in forum VB Classic
    Replies: 1
    Last Post: 06-16-2000, 05:39 AM
  5. Submit multiple forms together from a page
    By Ashu Mahajan in forum Web
    Replies: 0
    Last Post: 03-30-2000, 02:53 PM

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