Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unmanaged callback, Dispose issue Pin
DaveyM6914-Aug-10 9:07
professionalDaveyM6914-Aug-10 9:07 
GeneralRe: Unmanaged callback, Dispose issue Pin
Luc Pattyn14-Aug-10 9:19
sitebuilderLuc Pattyn14-Aug-10 9:19 
GeneralRe: Unmanaged callback, Dispose issue Pin
DaveyM6914-Aug-10 9:31
professionalDaveyM6914-Aug-10 9:31 
Questionhow to session value in a page. Pin
Mubeen.asim12-Aug-10 21:38
Mubeen.asim12-Aug-10 21:38 
AnswerRe: how to session value in a page. Pin
Jens Meyer12-Aug-10 22:10
Jens Meyer12-Aug-10 22:10 
GeneralRe: how to session value in a page. Pin
Mubeen.asim12-Aug-10 23:17
Mubeen.asim12-Aug-10 23:17 
QuestionResize problem for drawn rectangle on the picture box? Pin
Nivas8212-Aug-10 20:27
Nivas8212-Aug-10 20:27 
AnswerRe: Resize problem for drawn rectangle on the picture box? Pin
Luc Pattyn13-Aug-10 2:05
sitebuilderLuc Pattyn13-Aug-10 2:05 
to me this is yet another proof PictureBox is not a good Control at all: as soon as you want to do more than just showing an image as is, it starts to work against you.

Here is my approach:
- use whatever Control you choose, and paint everything yourself, on top of it, using a Paint handler; I typically suggest a Panel.
- use Graphics.DrawImage() to paint (part of) the image
- and Graphics.DrawRectangle() to paint the rectangle
- and Graphics.DrawString() to paint the text.

optionally use any of the transform methods to change the origin (TranslateTransform), rotation (RotateTransform), or scaling (ScaleTransform). The big advantage is these work identically on all drawing components (image, rectangle, text), provided the transforms are executed before any of the drawing occurs.

Warning: initially you may make some mistakes in determining the correct transformations and your drawing parts may lie outside the view, therefore it is recommended to start with a view larger than is required.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Resize problem for drawn rectangle on the picture box? Pin
Nivas8217-Aug-10 20:30
Nivas8217-Aug-10 20:30 
GeneralRe: Resize problem for drawn rectangle on the picture box? Pin
Luc Pattyn18-Aug-10 1:41
sitebuilderLuc Pattyn18-Aug-10 1:41 
GeneralRe: Resize problem for drawn rectangle on the picture box? Pin
Nivas8223-Aug-10 2:12
Nivas8223-Aug-10 2:12 
AnswerRe: Resize problem for drawn rectangle on the picture box? Pin
Luc Pattyn23-Aug-10 2:16
sitebuilderLuc Pattyn23-Aug-10 2:16 
GeneralRe: Resize problem for drawn rectangle on the picture box? Pin
Nivas8223-Aug-10 23:09
Nivas8223-Aug-10 23:09 
GeneralRe: Resize problem for drawn rectangle on the picture box? Pin
Nivas8220-Oct-10 21:30
Nivas8220-Oct-10 21:30 
QuestionHow to load a referenced dll from specified location not GAC? Pin
Jack2009512-Aug-10 16:57
Jack2009512-Aug-10 16:57 
AnswerRe: How to load a referenced dll from specified location not GAC? Pin
PIEBALDconsult12-Aug-10 17:46
mvePIEBALDconsult12-Aug-10 17:46 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
Luc Pattyn12-Aug-10 18:07
sitebuilderLuc Pattyn12-Aug-10 18:07 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
PIEBALDconsult12-Aug-10 18:14
mvePIEBALDconsult12-Aug-10 18:14 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
Luc Pattyn12-Aug-10 18:17
sitebuilderLuc Pattyn12-Aug-10 18:17 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
Jack2009512-Aug-10 18:37
Jack2009512-Aug-10 18:37 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
PIEBALDconsult12-Aug-10 19:11
mvePIEBALDconsult12-Aug-10 19:11 
GeneralRe: How to load a referenced dll from specified location not GAC? Pin
Jack2009512-Aug-10 22:57
Jack2009512-Aug-10 22:57 
GeneralRe: How to load a referenced dll from specified location not GAC? [modified] Pin
PIEBALDconsult13-Aug-10 3:10
mvePIEBALDconsult13-Aug-10 3:10 
QuestionArrays and Classes Pin
dluurs12-Aug-10 15:22
dluurs12-Aug-10 15:22 
AnswerRe: Arrays and Classes Pin
Luc Pattyn12-Aug-10 15:33
sitebuilderLuc Pattyn12-Aug-10 15:33 

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.