Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

transparant PictureBox and VB FORM

Posted on 2001-08-29
8
Medium Priority
?
280 Views
Last Modified: 2008-02-01
Hello there

I have a picture box on a VB Form and its has the same size as the size of the form that is when form resize picturBox adjust itself to the full size of form. now what i want is that PictureBox become transparant to the background that is what ever is drawn graphically(Line,circle,pset) is visible through the picturebox and what ever is drawn on picture box is also visible. the idea is that i use the Form to draw the final graphics and use picture box for scratch pad for drawing that is i draw what ever i want on the picture box and when it is final i draw it on the form. in this way i do not have to refrsh the form objects every time there is like mouse move. also i clear the picture box so that when CLS is called only picturebox objects are erased not the form objects. what are the settings and is this possible


Shahzad
0
Comment
Question by:shahzad73
[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
8 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6436000
I'm pretty sure you cannot get the picturebox to be transparent...

Max.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6437253
It sounds like everything you need is on the form, so you could always make sure that the two are always in synch, then you don't need to make the picturebox invisible:

on image clear: Picture1.Picture = Form.Picture
on update image: Form.Picture = Picture1.Picture

The picturebox is a container and therefore does not support transparency (because of the way containers work, although you could probably write your own to function as needed.)  If you need transparent, you need the imagebox, which does not support drawing.
0
 
LVL 1

Author Comment

by:shahzad73
ID: 6439422
okey i think u are right picture box can not be transparant. also i think u misunderstand my requirments. i want what ever is drawn on the VB Form is visible through PictureBox. the idea is that i will draw animated objects which require constant redraw be drawn on PictureBox. in this way i will not redraw backgroun again and again.

is there any way i can do the same with imagebox. is there any way to draw lines, circles and psets on imagebox


Shahzad.
0
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!

 
LVL 22

Expert Comment

by:rspahitz
ID: 6442238
The only way I can think of to implement your idea is to create on a picturebox, then at various stages transfer the contents to the imagebox, and as necessary place on or extract from the form background.
0
 
LVL 1

Accepted Solution

by:
dekeldate earned 60 total points
ID: 6443368
0
 
LVL 1

Expert Comment

by:dekeldate
ID: 6470485
Hi shahzad73
I am glad you like the workround I proposed, but am somewhat disapointed with the grade. I feel this is usually an exchange site. If a solution is given as a comment that means I would like some feedback, and would be most glad to clarify. Also if you are going to give such a low grade, maybe clarify with the potential 'winner', they may release your points, rather than receive such a grade.
0
 
LVL 1

Expert Comment

by:dekeldate
ID: 6470561
The link I gave basicly explained the problem and then proposed a work-around. This work-around is definetely not as neat as just making the picturebox transparent, and is also not for every situation. My comment was aimed to help you find a solution, not as a solution in
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6471719
FYI Some experts will not assist those who regularly give "C" grades, meaning that your future questions may get less quality answers.  If you would like to correct this issue, drop a zero-point question in the Customer Service topic area and refer to this question.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
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 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…
Suggested Courses

647 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