Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
Generalevaluating simple strings as boolean Pin
MonkeyBob21-Jul-04 20:09
MonkeyBob21-Jul-04 20:09 
GeneralRe: evaluating simple strings as boolean Pin
Angel Reyes21-Jul-04 20:20
Angel Reyes21-Jul-04 20:20 
GeneralRe: evaluating simple strings as boolean Pin
MonkeyBob21-Jul-04 20:57
MonkeyBob21-Jul-04 20:57 
GeneralRe: evaluating simple strings as boolean Pin
mav.northwind21-Jul-04 22:38
mav.northwind21-Jul-04 22:38 
GeneralRe: evaluating simple strings as boolean Pin
Heath Stewart22-Jul-04 4:20
protectorHeath Stewart22-Jul-04 4:20 
GeneralRe: evaluating simple strings as boolean Pin
Nick Parker22-Jul-04 4:13
protectorNick Parker22-Jul-04 4:13 
GeneralCut Image Pin
jzb21-Jul-04 18:50
jzb21-Jul-04 18:50 
GeneralRe: Cut Image Pin
Heath Stewart22-Jul-04 4:10
protectorHeath Stewart22-Jul-04 4:10 
There's many examples of image manipulation in .NET. I suggest you try searching for examples, like Microsoft FotoVision[^].

If you want to clip the area, create a Graphics object for the control using Control.CreateGrahpics. Or, better yet, handle the Paint event and get it from PaintEventArgs.Graphics. Then call SetClip to set the clipping region (the portions that would be drawn). Then call Graphics.DrawImage to draw the image. The clipping region will not be drawn.

If you want to copy a portion of the image into the clipboard and then delete it from the original image, that gets a bit more complicated. Not only must you implement what is above, you must also invert the clipping region (there are methods to do this) and draw that portion of the image into another image using the Graphics object for an Image, using Graphics.FromImage. This draw that clipped portion of the image into another image. You can then take tha Image and use, IIRC, Clipboard.SetDataObject(myClippedImage), which may work. If not, adding image types to the clipboard (or for drag and drop operations, which basically amounts to the same thing) is very complicated and should be discussed in a different thread.

 

Microsoft MVP, Visual C#
My Articles
GeneralUser Controls's question Pin
jzb21-Jul-04 18:48
jzb21-Jul-04 18:48 
GeneralRe: User Controls's question Pin
Heath Stewart22-Jul-04 4:03
protectorHeath Stewart22-Jul-04 4:03 
Generalusing different interfaces still works! Pin
ting66821-Jul-04 18:36
ting66821-Jul-04 18:36 
GeneralRe: using different interfaces still works! Pin
Colin Angus Mackay21-Jul-04 23:52
Colin Angus Mackay21-Jul-04 23:52 
GeneralOne major tcp/ip headache Pin
TalkingBabb0t21-Jul-04 17:10
TalkingBabb0t21-Jul-04 17:10 
GeneralRe: One major tcp/ip headache Pin
Heath Stewart22-Jul-04 3:56
protectorHeath Stewart22-Jul-04 3:56 
GeneralRe: One major tcp/ip headache Pin
TalkingBabb0t22-Jul-04 16:19
TalkingBabb0t22-Jul-04 16:19 
GeneralAbout C# Rs232 communication Pin
resocman21-Jul-04 17:09
resocman21-Jul-04 17:09 
GeneralRe: About C# Rs232 communication Pin
Heath Stewart22-Jul-04 3:46
protectorHeath Stewart22-Jul-04 3:46 
GeneralRe: About C# Rs232 communication Pin
resocman22-Jul-04 19:59
resocman22-Jul-04 19:59 
GeneralEvents and Model Logic Pin
Leslie Sanford21-Jul-04 16:44
Leslie Sanford21-Jul-04 16:44 
GeneralRe: Events and Model Logic Pin
Heath Stewart22-Jul-04 3:43
protectorHeath Stewart22-Jul-04 3:43 
Generalpassing a form control to a class Pin
budha_man_9921-Jul-04 11:51
budha_man_9921-Jul-04 11:51 
GeneralRe: passing a form control to a class Pin
Colin Angus Mackay21-Jul-04 14:06
Colin Angus Mackay21-Jul-04 14:06 
GeneralRe: passing a form control to a class Pin
budha_man_9922-Jul-04 4:50
budha_man_9922-Jul-04 4:50 
GeneralRe: passing a form control to a class Pin
Colin Angus Mackay22-Jul-04 5:21
Colin Angus Mackay22-Jul-04 5:21 
GeneralRe: passing a form control to a class Pin
budha_man_9922-Jul-04 5:28
budha_man_9922-Jul-04 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.