473,397 Members | 1,974 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,397 software developers and data experts.

Move an image without flickering ?

Hi Experts:

My program (Windows Form with C# and .net 2.0) shows a bitmap (a bitmap file
selected by the user) and allows the user to drag it to different positions
within the client area. I use Graphics.Clear() and Graphics.DrawImage(...)
to repeatly clear the client area and re-draw the bitmap. The result is not
good because the visual flickering.

Is there a better way to move an bitmap smoothly?

Thanks In Advance!
Polaris
Nov 28 '07 #1
1 3464
"Polaris" <et*******@hotmail.comwrote in message
news:eW**************@TK2MSFTNGP05.phx.gbl...
Hi Experts:

My program (Windows Form with C# and .net 2.0) shows a bitmap (a bitmap
file selected by the user) and allows the user to drag it to different
positions within the client area. I use Graphics.Clear() and
Graphics.DrawImage(...) to repeatly clear the client area and re-draw the
bitmap. The result is not good because the visual flickering.

Is there a better way to move an bitmap smoothly?
Do the Graphics.DrawImage first as you are doing, then do a graphics.SetClip
to exclude the area you have just drawn and then do Graphics.Clear.

Some people here will probably suggest you turn on double buffering but this
is memory intensive and certainly overkill for what you are doing.

Michael
Nov 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dan | last post by:
I must develop a (C-sharp) winforms application which should display some relatively large (e.g. 2~5 MB JPEG each) photographic images together with a rich set of related information: the...
2
by: Juergen Theis | last post by:
Hello everybody, I use an imagebutton with an aspx-page as image source. This page is used to receive the imaging data as a stream. The page holding the button has set smartnavigation to true....
4
by: huntingseasonson | last post by:
Hi, I have set up the following page http://gertrudischale.com/cgi/ viewart.pl?lang=en&i=22 to scroll in the same direction one moves the mouse. This works fine -except in IE- where the image tends...
3
by: ranjith kumar devuniri | last post by:
Hi everyone! coming to point directly I am developing an application in VB using visual studio 6.0. In my application, I have a form with 9 image controls and one picture box control. Those images...
3
by: Sanjya | last post by:
i have made windows apllication in .net C# but there are some probelm of flickering image when i open this application please give me the solution
6
by: 123shailesh | last post by:
Hello everyone, I need some help. I have been working on it for some time but havent been able to think of any solution. Even had thought of making do without it, even though it was a major part...
0
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a...
4
by: gerardianlewis | last post by:
Any help appreciated. (VB.NET under XP and Vista, SP1 installed) My code, inherited from a VB6 version of an app that ran under W98, loads an image from a file into a PictureBox. The user may...
5
by: oscWork | last post by:
Does anyone know of any way to switch focus between a main form and a child form without the usual flickering you get while changing focus between windows? This works fine if the main form is an...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...
0
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...
0
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...

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.