Results 1 to 5 of 5

Thread: [RESOLVED] overlay forms

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    488

    Resolved [RESOLVED] overlay forms

    Hello
    I have done no work with multiple forms. What I want to do is overlay form1 over form2 set the opacity to 0% of form1 and see through to form2 while working on form1. Do you know of a good example to study? I have not found what I am looking for or did not recognize it if did.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: overlay forms

    So what's the problem? Maybe you should just do what you said and post when you encounter an actual issue.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: overlay forms

    I'm more curious as to what the point is. I can think of a few, but every time I think of one, I also think of a different way to do the same thing. What would the gain be? It seems like a totally invisible form would simply be a way to intercept user actions, which could be done without using a second form. Is it worth the effort?
    My usual boring signature: Nothing

  4. #4
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: overlay forms

    For a code example using multiple forms, you might want to glance at this entry in the CodeBank: http://www.vbforums.com/showthread.p...orm-s-controls. It's probably not exactly what you are looking for but there may be some useful ideas. Note that in my code Form1 is the base form and Form2 is the overlay.

    As Shaggy said, a form with 0% opacity isn't much use. It's effectively hidden, including any controls. In fact it won't even raise mouse events. But you could raise the opacity to say 0.01%, in which case the mouse events will work while the form remains invisible.

    My example in the CodeBank uses the Region property to make parts of the overlay invisible. It is largely but not wholly similar to using TransparencyKey for this purpose.

    BB

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    488

    Re: [RESOLVED] overlay forms

    Thank you all for your input.I now have enough to start experimenting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width