Solved

Use of SelectClipRgn

Posted on 2004-10-04
2
344 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 200 total points
Comment Utility
I think you want to call SetWindowRgn(PictureboxC.hWnd, hRgn, 1)
0
 

Author Comment

by:riceman0
Comment Utility

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


0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now