Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
QuestionInput data into Access table Pin
latuan13227-Oct-07 17:03
latuan13227-Oct-07 17:03 
AnswerRe: Input data into Access table Pin
Paul Conrad28-Oct-07 6:36
professionalPaul Conrad28-Oct-07 6:36 
GeneralRe: Input data into Access table Pin
latuan13228-Oct-07 17:54
latuan13228-Oct-07 17:54 
GeneralRe: Input data into Access table Pin
Paul Conrad28-Oct-07 18:18
professionalPaul Conrad28-Oct-07 18:18 
QuestionDataBindings.Add() Problem. Pin
hdv21227-Oct-07 11:41
hdv21227-Oct-07 11:41 
AnswerRe: DataBindings.Add() Problem. Pin
TJoe27-Oct-07 13:26
TJoe27-Oct-07 13:26 
Questiondefine crop from picturebox? Pin
crash89327-Oct-07 11:19
crash89327-Oct-07 11:19 
AnswerRe: define crop from picturebox? Pin
Anthony Mushrow27-Oct-07 12:58
professionalAnthony Mushrow27-Oct-07 12:58 
add in some mouse events for the picture box.

When the user clicks with the mouse, register its location (so, a start point)
When the user releases, register the loaction and you have an end point.

Now, create a new bitmap the same width and hieght as your selected area.
Create a new graphics object from your new bitmap (Graphics.FromImage)

Then draw the selected area of the picture box's image, to your new bitmap

Rectangle srcRect = new Rectangle(start.x, start.y, end.x-start.x, end.y-start.y)
myGraphics.DrawImage(myPictureBox.Image, 0,0, srcRect, GraphicsUnit.Pixel)

Then, set your pictures image to the bitmap you created earlier. Don't forget to dispose of your graphics objects and whatnot.
You also may need to add some checking between the start and end points, so you don't have any negative values around.

As for drawing the rectangle you want to crop as your dragging the mouse, register for the OnPaint event, and draw a rectangle between the start point, and the current location of the mouse.

I hope i havn't been to confusing there, i just kinda typed as i thought.

My current favourite word is: Waffle

Cheese is still good though.

QuestionDynamic Button Loop Pin
Michael Fritzius27-Oct-07 9:10
professionalMichael Fritzius27-Oct-07 9:10 
AnswerRe: Dynamic Button Loop Pin
Giorgi Dalakishvili27-Oct-07 9:38
mentorGiorgi Dalakishvili27-Oct-07 9:38 
GeneralRe: Dynamic Button Loop Pin
Paul Conrad27-Oct-07 11:12
professionalPaul Conrad27-Oct-07 11:12 
GeneralRe: Dynamic Button Loop Pin
Giorgi Dalakishvili27-Oct-07 11:20
mentorGiorgi Dalakishvili27-Oct-07 11:20 
GeneralRe: Dynamic Button Loop Pin
Paul Conrad27-Oct-07 11:25
professionalPaul Conrad27-Oct-07 11:25 
GeneralRe: Dynamic Button Loop Pin
Anthony Mushrow27-Oct-07 12:42
professionalAnthony Mushrow27-Oct-07 12:42 
GeneralRe: Dynamic Button Loop Pin
Paul Conrad27-Oct-07 12:47
professionalPaul Conrad27-Oct-07 12:47 
GeneralRe: Dynamic Button Loop Pin
Anthony Mushrow27-Oct-07 13:00
professionalAnthony Mushrow27-Oct-07 13:00 
AnswerRe: Dynamic Button Loop Pin
Hesham Amin27-Oct-07 10:23
Hesham Amin27-Oct-07 10:23 
AnswerRe: Dynamic Button Loop Pin
Michael Fritzius30-Oct-07 7:38
professionalMichael Fritzius30-Oct-07 7:38 
QuestionRe:Authenticating users using a customised internet dialers. Pin
RameshwerE27-Oct-07 8:29
RameshwerE27-Oct-07 8:29 
AnswerRe: Re:Authenticating users using a customised internet dialers. Pin
Paul Conrad28-Oct-07 6:37
professionalPaul Conrad28-Oct-07 6:37 
GeneralRe: Re:Authenticating users using a customised internet dialers. Pin
RameshwerE28-Oct-07 20:40
RameshwerE28-Oct-07 20:40 
QuestionHow to Connect to a Remote Database from a WebService? Pin
humblepgmr27-Oct-07 7:39
humblepgmr27-Oct-07 7:39 
AnswerRe: How to Connect to a Remote Database from a WebService? Pin
RameshwerE27-Oct-07 8:13
RameshwerE27-Oct-07 8:13 
AnswerRe: How to Connect to a Remote Database from a WebService? Pin
Paul Conrad27-Oct-07 8:28
professionalPaul Conrad27-Oct-07 8:28 
QuestionTO disable ALT+F4 Pin
tahir_makhdoom27-Oct-07 6:36
tahir_makhdoom27-Oct-07 6:36 

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.