[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Use of SelectClipRgn

Posted on 2004-10-04
2
Medium Priority
?
358 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
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 800 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

829 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