Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey peeps,

 

need some help if possible! I have developed an application for work that displays our warehouse graphically using the fillRectangle method of the graphics class.

 

Now what we have at the moment, is when the user resizes the form, it does redraw the data in the way we intend it to, but also keeps the original drawing in place, so infact we now have two different sized array of drawings,

 

View attachment for a visual representation. ( Totally skinned down gif, no color no fancy graphics, just b&w pure filth )

 

For coding, I have added the text to text files rather then adding the whole project.

 

Gav

 

Cheers all

 

Gav

form1.txt

generic.cs.txt

Posted

that didn't work my friend, as you can see from my pic, it's drawing over it's self each time, rather then clearing then creating a new set of boxes.

 

Does any one know how I can clear the panel canvas, then draw on it again.

 

Cheers

 

Gav

Posted

okies,

 

The crack is, I have a database that contains position information for our warehouse. We already have a piece of software in place but it's unreliable and coded in vb6. Now I've started coding in c#.net and with the data in the database I have drawn rectangles to show that data, this works great. But we have added a function that when resized it zoom's in and out etc. But when it invalidates it redraws the new boxes as intended but keeps the original boxes in place, so now I have two sets of boxes overlapping each other.

 

I've tried almost everything, but for some weird reason it doesn't work.

 

Can you help?

 

Gav

Posted

got it sorted, I had an MessageBox.Show in there that displayed how many items were in the array and that was invalidating the panel after the user clicked ok.

 

Removed this and it works great.

 

Gav

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...