473,698 Members | 2,579 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 3279
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
3268
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
6031
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
4715
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
19571
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
1814
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
2735
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
2242
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
3803
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
2142
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
8676
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
8608
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,...
0
9164
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
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
4370
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...
1
3051
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

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.