473,394 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Scrolling a Form with ScrollBars causes background image to mess up

I'm trying to use a Form's BackgroundImage to display the base image that I'm placing controls on top of. To make the form scroll to the bounds of the image, I set the AutoScrollMinSize. This works great, except that when I scroll, the image gets all chopped up and doesn't automatically refresh when scrolling is done.

Is there a way to prevent this problem so that it scrolls smoothly?
Jun 5 '09 #1
2 3268
tlhintoq
3,525 Expert 2GB
PictureBox1.Refresh();
Jun 5 '09 #2
@tlhintoq
Actually, I was displaying my image on the Form itself, and Refresh will only reset the image back to 0, 0, no matter how far over I've scrolled. In other words, I guess I can't use Form.BackgroundImage if I want to be able to use the scroll bars to show parts of the image that are off the screen.

So, now I'm using a PictureBox, which I had done before. The problem with that is that any controls that I place on top of the PictureBox that I want to be transparent won't be. This is because the transparent part of the control will see through the PictureBox and show what is on the Form itself. So, if you have a Form with a white background color with a PictureBox on top of it with Red Image and you place your transparent control on top of the PictureBox, the transaparent part of the control will show as white. I want it to show the image in the picture box, not the background of the Form.

Does that make sense?
Jun 5 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Martin | last post by:
Thanks to all those who assisted me with my last question re: What is the best way to produce WYSIWYG pages for viewing and printing. I think that I have mastered the form with scrolling picture...
1
by: M.Kamermans | last post by:
I have a rudimentary gui with a class that extends JPanel, which sets its content to a jpg image using: if (im != null) { g.drawImage(im,0,0,null); } in the paint() method. However, when I...
24
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I...
4
by: mr_burns | last post by:
Hi, Is it possible to disble horizontal scrolling using CSS? I want to try and use two backgrounds, one tiling vertically and part of the body background, which will not force scrolling, but one...
3
by: Nancy | last post by:
Hi, I am working on a project where I have to make a form list static, i.e. put in links so that users can choose a local file. As it stands, it's looking for a php file. Here's an example of the...
12
by: Major Man | last post by:
Hi, I have this .jpg picture that's 700 x 200. What I wanna do is display it on a 300 x 200 window, and have it scroll left and right, back and forth. Can anyone help this newbie? TIA
0
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a...
2
by: Ernst Elzas | last post by:
Hello, If these questions have been asked numerous times before, please excuse me, I have not managed to find the information I needed. I'm making a webpage (for now it will only be in two...
2
by: Phil Stanton | last post by:
I have a form with an Image Allocation Plan Option Compare Database Option Explicit Dim AllocationPlanWidth As Long Dim AllocationPlanHeight As Long Private Sub AllocationPlan_Click()
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.