Click here to Skip to main content
15,880,905 members
Home / Discussions / C#
   

C#

 
QuestionAdding a Record via LINQ Pin
belzer11-May-08 11:39
belzer11-May-08 11:39 
QuestionTooltip for TrackBar(Slider Bar)? Pin
jamilkhan00711-May-08 9:52
jamilkhan00711-May-08 9:52 
AnswerRe: Tooltip for TrackBar(Slider Bar)? Pin
CodingYoshi11-May-08 10:03
CodingYoshi11-May-08 10:03 
GeneralRe: Tooltip for TrackBar(Slider Bar)? Pin
jamilkhan00711-May-08 10:25
jamilkhan00711-May-08 10:25 
GeneralRe: Tooltip for TrackBar(Slider Bar)? Pin
CodingYoshi11-May-08 12:39
CodingYoshi11-May-08 12:39 
QuestionKeyboard Shortcut for Windows Service Pin
M.SADEGHI11-May-08 8:05
M.SADEGHI11-May-08 8:05 
AnswerRe: Keyboard Shortcut for Windows Service Pin
Giorgi Dalakishvili11-May-08 8:28
mentorGiorgi Dalakishvili11-May-08 8:28 
QuestionPicturebox confusion Pin
Eric25611-May-08 6:14
Eric25611-May-08 6:14 
Hopefully someone here can help.

I've got a picturebox control with scrollbars. I've also set it up so that I can click on the picture box that has an image and draw a box border by dragging the mouse to whatever dimensions I want the box to be. It's basically a utility program for setting up hotspots on an image that will be saved into an array. This part works perfectly.

The problem is that if I scroll the image up or down so that the offset might be then try to draw my box, the image starts to do some flickering with it bouncing back and forth with how the image should be displayed (let's say an offset of X = 100, Y = 100 - which is what it is supposed to be since I have moved the image over with the scrollbars) and bouncing back to the default position (X = 0, Y= 0)

I've got this bit of code in my hScrollbar1_Scroll, vScrollbar1_Scroll, PictureBox_Paint, and Form1_Paint events:

Graphics g = pictureBox1.CreateGraphics();

g.DrawImage(pictureBox1.Image,
new Rectangle(0, 0, pictureBox1.Right - vScrollBar1.Width,
pictureBox1.Bottom - hScrollBar1.Height),
new Rectangle(hScrollBar1.Value, hScrollBar1.Value,
pictureBox1.Right - vScrollBar1.Width,
pictureBox1.Bottom - hScrollBar1.Height),
GraphicsUnit.Pixel);

Somewhere there is an event that is showing this image in the default position of 0,0 and it's not taking the values from the Scrollbars into consideration.

I am using picturebox1.Invalidate(); whenever I am drawing on that surface which I am *assuming* triggers the paint event(s).
AnswerRe: Picturebox confusion Pin
CodingYoshi11-May-08 7:11
CodingYoshi11-May-08 7:11 
GeneralRe: Picturebox confusion Pin
Eric25612-May-08 3:08
Eric25612-May-08 3:08 
AnswerRe: Picturebox confusion Pin
Christian Graus11-May-08 12:29
protectorChristian Graus11-May-08 12:29 
QuestionCopying Formatted Text from DataGrid Pin
User 1278211-May-08 5:47
User 1278211-May-08 5:47 
QuestionUsing Shell32.DLL Interface in C# Pin
c0rvus11-May-08 5:14
c0rvus11-May-08 5:14 
AnswerRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-May-08 5:52
mentorGiorgi Dalakishvili11-May-08 5:52 
GeneralRe: Using Shell32.DLL Interface in C# Pin
c0rvus11-May-08 9:12
c0rvus11-May-08 9:12 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-May-08 9:16
mentorGiorgi Dalakishvili11-May-08 9:16 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Luc Pattyn11-Aug-11 10:35
sitebuilderLuc Pattyn11-Aug-11 10:35 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-Aug-11 10:41
mentorGiorgi Dalakishvili11-Aug-11 10:41 
QuestionMulti-thread form managing [modified] Pin
natsuyaki11-May-08 4:20
natsuyaki11-May-08 4:20 
AnswerRe: Multi-thread form managing Pin
Ennis Ray Lynch, Jr.11-May-08 12:54
Ennis Ray Lynch, Jr.11-May-08 12:54 
GeneralRe: Multi-thread form managing Pin
natsuyaki11-May-08 14:29
natsuyaki11-May-08 14:29 
GeneralRe: Multi-thread form managing Pin
natsuyaki11-May-08 18:50
natsuyaki11-May-08 18:50 
QuestionOpening .xls file in Excel from C# Pin
eyalbi00711-May-08 3:35
eyalbi00711-May-08 3:35 
AnswerRe: Opening .xls file in Excel from C# Pin
Gareth H11-May-08 4:41
Gareth H11-May-08 4:41 
AnswerRe: Opening .xls file in Excel from C# Pin
Ed.Poore11-May-08 9:46
Ed.Poore11-May-08 9:46 

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.