Click here to Skip to main content
15,902,757 members
Home / Discussions / C#
   

C#

 
QuestionDownloadable C# Tutorials??? Pin
TGeist5-Oct-09 17:35
TGeist5-Oct-09 17:35 
AnswerRe: Downloadable C# Tutorials??? Pin
Luc Pattyn5-Oct-09 17:41
sitebuilderLuc Pattyn5-Oct-09 17:41 
AnswerRe: Downloadable C# Tutorials??? Pin
kideve5-Oct-09 17:57
kideve5-Oct-09 17:57 
QuestionConvert Access App To C# Pin
Kevin Marois5-Oct-09 16:15
professionalKevin Marois5-Oct-09 16:15 
AnswerRe: Convert Access App To C# Pin
N a v a n e e t h5-Oct-09 17:14
N a v a n e e t h5-Oct-09 17:14 
GeneralRe: Convert Access App To C# Pin
Kevin Marois5-Oct-09 17:30
professionalKevin Marois5-Oct-09 17:30 
AnswerRe: Convert Access App To C# Pin
kideve5-Oct-09 17:55
kideve5-Oct-09 17:55 
AnswerRe: Convert Access App To C# Pin
riced6-Oct-09 3:38
riced6-Oct-09 3:38 
GeneralRe: Convert Access App To C# Pin
Kevin Marois6-Oct-09 5:39
professionalKevin Marois6-Oct-09 5:39 
GeneralRe: Convert Access App To C# Pin
Eddy Vluggen6-Oct-09 8:38
professionalEddy Vluggen6-Oct-09 8:38 
QuestionUpdate Typed DataSet Pin
tamir9015-Oct-09 11:42
tamir9015-Oct-09 11:42 
AnswerRe: Update Typed DataSet Pin
Henry Minute5-Oct-09 11:48
Henry Minute5-Oct-09 11:48 
QuestionFunny location!! Pin
Muammar©5-Oct-09 9:17
Muammar©5-Oct-09 9:17 
AnswerRe: Funny location!! Pin
Not Active5-Oct-09 9:41
mentorNot Active5-Oct-09 9:41 
GeneralRe: Funny location!! Pin
Muammar©5-Oct-09 10:29
Muammar©5-Oct-09 10:29 
AnswerRe: Funny location!! [modified] Pin
DaveyM695-Oct-09 10:19
professionalDaveyM695-Oct-09 10:19 
GeneralRe: Funny location!! Pin
Muammar©5-Oct-09 10:38
Muammar©5-Oct-09 10:38 
GeneralRe: Funny location!! Pin
DaveyM695-Oct-09 10:40
professionalDaveyM695-Oct-09 10:40 
GeneralRe: Funny location!! Pin
Muammar©5-Oct-09 11:12
Muammar©5-Oct-09 11:12 
Wait Blush | :O
Actually, when applying your code to the form it works like a charm, but when doing the same to a pictureBox control, the same problem persists..

private void pbPreview_MouseMove(object sender, MouseEventArgs e)
{

    if (e.Button == MouseButtons.Left)
    {
        int HW = 20;
        Bitmap b = (Bitmap)pbPreview.Image.Clone();
        Graphics g = Graphics.FromImage(b);
        g.FillEllipse(Brushes.Violet,
        new Rectangle(
            e.X - (HW / 2),
            e.Y - (HW / 2),
        HW,HW));
        pbPreview.Image = (Image)b;
    }
}


I tried using the HotSpot as you said but it's somehow a static point! I also tried this in the pain event handler of the pictureBox
private void pbPreview_Paint(object sender, PaintEventArgs e)
{
    int HW = 20;
    Graphics g = e.Graphics;
    g.FillEllipse(Brushes.Yellow,
    new Rectangle(
        this.Cursor.HotSpot.X,
        this.Cursor.HotSpot.Y,
    HW, HW));
}


Please Dave, let me know if you still have a trick up your sleeve Smile | :)


GeneralRe: Funny location!! Pin
Christian Graus5-Oct-09 12:50
protectorChristian Graus5-Oct-09 12:50 
GeneralRe: Funny location!! Pin
Muammar©5-Oct-09 23:19
Muammar©5-Oct-09 23:19 
GeneralRe: Funny location!! Pin
DaveyM695-Oct-09 12:55
professionalDaveyM695-Oct-09 12:55 
GeneralRe: Funny location!! Pin
Muammar©5-Oct-09 23:15
Muammar©5-Oct-09 23:15 
GeneralRe: Funny location!! Pin
DaveyM695-Oct-09 13:06
professionalDaveyM695-Oct-09 13:06 
GeneralRe: Funny location!! Pin
DaveyM695-Oct-09 13:55
professionalDaveyM695-Oct-09 13:55 

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.