Help, Implementation of a selection tool

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2005
Posts: 4
Reputation: fkhaeer is an unknown quantity at this point 
Solved Threads: 0
fkhaeer fkhaeer is offline Offline
Newbie Poster

Help, Implementation of a selection tool

 
1
  #1
May 16th, 2005
Hi,

I would like to implement a selection tool that is used for images. It selects a part of an image to enable the user for any further usage.

So, what is the simplest way to do such a thing?!

Any help will be welcome
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Help, Implementation of a selection tool

 
0
  #2
May 16th, 2005
What?
You want to be able to select part of an image so the user can have further usage? Please rephrase
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 4
Reputation: fkhaeer is an unknown quantity at this point 
Solved Threads: 0
fkhaeer fkhaeer is offline Offline
Newbie Poster

Re: Help, Implementation of a selection tool

 
0
  #3
May 16th, 2005
My application deals with images. I want the user to select a part of an image, a text in the image for example. That selection part will be saved, copied, moved or any thing :evil:

I hope you could understand now

I am waiting.......
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 4
Reputation: fkhaeer is an unknown quantity at this point 
Solved Threads: 0
fkhaeer fkhaeer is offline Offline
Newbie Poster

Re: Help, Implementation of a selection tool

 
0
  #4
May 17th, 2005
By the way, I found in somewhare, what i want is called: rubberband.

Regards..
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 4
Reputation: fkhaeer is an unknown quantity at this point 
Solved Threads: 0
fkhaeer fkhaeer is offline Offline
Newbie Poster

Re: Help, Implementation of a selection tool

 
0
  #5
May 30th, 2005
Hi..

any HELPING IDEA!!!
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 46
Reputation: BlackSun is an unknown quantity at this point 
Solved Threads: 4
BlackSun BlackSun is offline Offline
Light Poster

Re: Help, Implementation of a selection tool

 
0
  #6
Apr 12th, 2009
hi
u can use GDI+ in c# and implement selection tool with my own i
i used MouseDownevent , MouseMoveevent , MouseUpevent and PaintEvent

declare refernce of Point as start point for ex:
Point startPoint = Point.empty;
Write in Mouse Down event:
startPoint = new (e.X,e.Y);
Write in Mouse Move event
Graphics g = this.CreateGraphics()l
g.DrawRectangle(Pens.Red,startPoint.X,startPoint.Y,
e.X-startPoint.X,e.Y-startPoint.Y);

that`s it
sorry i did not send the code because am work here and unfortunlly i don`t have c# editor . and sorry i forget daniweb convention for writting code ;
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 436
Reputation: JerryShaw is on a distinguished road 
Solved Threads: 72
JerryShaw JerryShaw is offline Offline
Posting Pro in Training

Re: Help, Implementation of a selection tool

 
0
  #7
Apr 13th, 2009
As BlackSun explained, you will need to manage it yourself using the image Graphics. It is a bit more complicated than the example above, but should move you into the right direction. The image onPaint event will have to remember that you have an active selection (the rectangle, and its deminsions) so that if you refresh the form, the selection will be persistent. You may want to use a popup menu, or something to grab that selection of the image and copy it to another bitmap object for processing (send to file, drag drop, whatever).
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC