473,732 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrolling a Form with ScrollBars causes background image to mess up

20 New Member
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 AutoScrollMinSi ze. 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 3282
tlhintoq
3,525 Recognized Expert Specialist
PictureBox1.Ref resh();
Jun 5 '09 #2
bradyounie
20 New Member
@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.Background Image 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
3275
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 box method, it looks fine but still lacks that windows application feel. I was advised not to go the MDI form root at the time but no reason was given. Could someone explain why not MDI form for the same purpose, I understand that most MS...
1
6035
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 create a JScrollPane that uses this JPanel extension as its scrollable client, and call a validate, the scrollbars get visuall overwritten with the jpg image. Has anyone encountered this error before and knows how to fix it?
24
4723
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 need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on how to implement scrollbars (as a side note, Gecko browsers with their notoriously bug-ridden...
4
19572
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 that will be part of a table stretching of to the right, which will force unwanted horizontal scrolling. How is this written in the stylesheet? Cheers Burnsy
3
1821
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 body code: <select name="standardcode" size="10" onchange="document.reqForm.submit()" tabindex="4"> <option value="0" SELECTED>-- Select a Standard--</option> <option value= >Alabama</option>
12
2745
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
2244
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 rich textbox to the tab sheet. The rich textbox is placed at 0,0 (upper left corner) within the tab sheet and is initially 1 "line" tall to accomodate the user's first line of text. The rich text box is, in actuality, a user control of mine...
2
3805
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 languages, English and Hebrew), and noticed a few issues with scrollbars: I divided the page in divs, with drop-down menus appearing in the top-div: (quoting the relevant lines from the css file) html,body {background-color: #000008; color:red;...
2
2145
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
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.