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

Moving images on another big image

Hi;
I want to move an image on another big image and i wrothe this code



public Form1()
{
InitializeComponent();
pictureBox1.Image = Image.FromFile("C:\\Users\\deneme.png");
pictureBox1.Location = new Point(0, 0);
` }

protected override void OnMouseClick(MouseEventArgs e)
{
abc = true;
String den1 = "C:\\Users\\ocean\\Desktop\\pul1.png";
ImageList a = initImage(den1, 50, 50);



Graphics theGraphics = Graphics.FromHwnd(this.Handle);


for (int i = 0; i < 200; i += 5)
{
pictureBox2.Location = new Point(i, 100);
theGraphics.
System.Threading.Thread.Sleep(50);
}
}

and the problem is in Java there are repaint and flushGraphics method that erase the previous view however in C# I cant handle to repaint whole system and until loop finishes i cant erase the previous paintings of pictureBox2.
Aug 27 '11 #1
1 2009
Sorry for forgetting to cut inconvenient lines here is the method that I try to move


protected override void OnMouseClick(MouseEventArgs e)
{
Graphics theGraphics = Graphics.FromHwnd(this.Handle);
for (int i = 0; i < 200; i += 5)
{
pictureBox2.Location = new Point(i, 100);
theGraphics.
System.Threading.Thread.Sleep(50);
}
}
Aug 27 '11 #2

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

Similar topics

1
by: Thomasa Gregg | last post by:
I need to be able to determine if an image has focus after a onmouseout function has been ran from another image. any ideas? Thanks
1
by: Crirus | last post by:
Hi! I have a seamless image drawn onto a PictureBox. I wrote a mouseMove handle that allow me to drag the image around in that pictureBox. I whould like to do this When the border of the image...
9
by: Varangian | last post by:
Hello is there a way to check if an image is over another Image ? thanks
0
by: Jeff Waskiewicz | last post by:
Here is what I am trying to accomplish. I have an MDI application on the left side of the client area I have a borderless form that holds a treeveiw for navigation. When an item is selected from...
6
by: Julius Fuchs | last post by:
Hi, what's the best way to move an image let's say from the top left to the bottom right in e.g. half a second without flickering? I considered a timer which modifies the position of an image...
0
prabunewindia
by: prabunewindia | last post by:
hi friends, i am trying to add one image with another image. converted bith image into byte array and combined both as one and open that one. but only one image i am getting. this is the code i...
1
by: Goutour | last post by:
Hello, I am a 2-day old Javascript developer :-) and I have a problem. I am trying to do examples I find on net about using onmouse events. I found a javascript that generates flying objects, and I...
4
anfetienne
by: anfetienne | last post by:
Hi, basically what i have got is a upload form that im linking to a flash gallery. The gallery uses two versions of an image....1 is for the thumbnail and the other the actual image. When i upload...
0
by: Sirus86 | last post by:
problem with text and image.Text is overlaying or moving to below image. i design is very complex and i need to include a scroll within the design. this is what i have so far div id="content" ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.