Solved

Use of SelectClipRgn

Posted on 2004-10-04
2
355 Views
Last Modified: 2012-08-13

Hello.  I'm trying to superimpose one figure on top of the other.  The figure below will scroll underneath the figure on the bottom.  My approach is this:

One picturebox (A) that contains two pictureboxes (B and C).  I draw my background on picturebox B, which I move in accordance to scrollbars (w/o having to re-draw).  That works great.  I want one static, irregularly-shaped picture (in picturebox C) to sit on top of the scrolling picture, though.  This I am trying to do by applying SelectClipRgn to the picturebox C so that you can see picturebox B scrolling behind it.  

The problem is the clipped region behind picture does not expose Picturebox B, but the *windows desktop*.  It allows the user to see all the way through the app.  How can I tell VB to not re-draw picturebox C, but to redraw the scrolled picturebox B, in the clipped non-rectangular region?

Thanks very much.
0
Comment
Question by:riceman0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 200 total points
ID: 12220386
I think you want to call SetWindowRgn(PictureboxC.hWnd, hRgn, 1)
0
 

Author Comment

by:riceman0
ID: 12220764

Wow, that was dumb.  I knew that.  Thanks, my cluelessness is your 200 points.


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question