Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
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 
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 
Not sure how to attach an image to this short of posting it elsewhere and linking to it, but hopefully this will help:

****************************
*         *                *
*    B    *       A        *
*         *                *
***********                *
*               ************
*               *          *
*               *     C    *
*               *          *
****************************


A represents the overall bitmapped image.
B represents the size of the picturebox and what part of the bitmapped image that shows in the default (0,0) position.
C represents what part of the bitmapped image is showing in the picturebox when the image has been scrolled to its farthest right and bottom. NOTE that C can be anywhere depending on how far you have scrolled the horizontal and vertical scrollbars.

The problem is that when, for example, I am in the C section, if I try to draw my box there (MouseDown, MouseMove, and MouseUp Events), the image will flicker back and forth between the B & C positions. At the end of my MouseDown, MouseMove, and MouseUp events, I am invalidating the picturebox to force the picturebox_Paint event, so there is no reason that the picturebox should be going back to the B position.

I did manage to resolve this issue however. Turns out that it was the Invalidate that was messing things up. I *assumed* that PictureBox.Invalidate forces the Picturebox_Paint event. What it apparently was doing was redrawing the image in the picturebox based on default settings, THEN calling PictureBox_Paint, which told it to paint the section based on the positions of the scrollbars. Net result was flickering back and forth between the 2 positions. Maybe my explanation here is incorrect, but getting rid of the Invalidate command and parking that code (drawing the image based on the scrollbars position) in there instead fixed the problem. No flicker and the image stays put.Smile | :)

Woot! Onward and forward...
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 
AnswerRe: Opening .xls file in Excel from C# Pin
Jimmanuel11-May-08 15:05
Jimmanuel11-May-08 15:05 
QuestionSystem Error mgs and flickering issue.... Pin
ASysSolvers11-May-08 3:03
ASysSolvers11-May-08 3:03 

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.