Solved

Use of SelectClipRgn

Posted on 2004-10-04
2
352 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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