Click here to Skip to main content
15,907,392 members
Home / Discussions / C#
   

C#

 
AnswerRe: Rendering Kleinian group fractals Pin
Dave Kreskowiak25-Dec-18 4:43
mveDave Kreskowiak25-Dec-18 4:43 
GeneralRe: Rendering Kleinian group fractals Pin
BillWoodruff26-Dec-18 7:43
professionalBillWoodruff26-Dec-18 7:43 
GeneralRe: Rendering Kleinian group fractals Pin
Dave Kreskowiak26-Dec-18 7:58
mveDave Kreskowiak26-Dec-18 7:58 
GeneralRe: Rendering Kleinian group fractals Pin
BillWoodruff27-Dec-18 16:25
professionalBillWoodruff27-Dec-18 16:25 
GeneralRe: Rendering Kleinian group fractals Pin
Member 1157700828-Dec-18 3:07
Member 1157700828-Dec-18 3:07 
GeneralRe: Rendering Kleinian group fractals Pin
Dave Kreskowiak28-Dec-18 3:27
mveDave Kreskowiak28-Dec-18 3:27 
GeneralRe: Rendering Kleinian group fractals Pin
Member 1157700828-Dec-18 3:34
Member 1157700828-Dec-18 3:34 
AnswerRe: Rendering Kleinian group fractals Pin
BillWoodruff25-Dec-18 13:11
professionalBillWoodruff25-Dec-18 13:11 
GeneralRe: Rendering Kleinian group fractals Pin
Member 1157700828-Dec-18 3:31
Member 1157700828-Dec-18 3:31 
GeneralRe: Rendering Kleinian group fractals Pin
BillWoodruff28-Dec-18 10:43
professionalBillWoodruff28-Dec-18 10:43 
QuestionC# - least square method Pin
Member 1409938024-Dec-18 8:46
Member 1409938024-Dec-18 8:46 
AnswerRe: C# - least square method Pin
Pete O'Hanlon24-Dec-18 8:51
mvePete O'Hanlon24-Dec-18 8:51 
GeneralRe: C# - least square method Pin
Member 1409938024-Dec-18 9:27
Member 1409938024-Dec-18 9:27 
GeneralRe: C# - least square method Pin
Dave Kreskowiak24-Dec-18 11:22
mveDave Kreskowiak24-Dec-18 11:22 
AnswerRe: C# - least square method Pin
OriginalGriff24-Dec-18 19:42
mveOriginalGriff24-Dec-18 19:42 
QuestionWhy this change language in multilingual need twice click ? Pin
@Sai_Y23-Dec-18 17:29
@Sai_Y23-Dec-18 17:29 
AnswerRe: Why this change language in multilingual need twice click ? Pin
OriginalGriff23-Dec-18 20:13
mveOriginalGriff23-Dec-18 20:13 
QuestionRe: Why this change language in multilingual need twice click ? Pin
Eddy Vluggen23-Dec-18 21:10
professionalEddy Vluggen23-Dec-18 21:10 
Questionconstraining an ExtenderProvider ... Winform Component Pin
BillWoodruff22-Dec-18 6:48
professionalBillWoodruff22-Dec-18 6:48 
AnswerRe: constraining an ExtenderProvider ... Winform Component Pin
Gerry Schmitz23-Dec-18 8:30
mveGerry Schmitz23-Dec-18 8:30 
GeneralRe: constraining an ExtenderProvider ... Winform Component Pin
BillWoodruff23-Dec-18 12:06
professionalBillWoodruff23-Dec-18 12:06 
QuestionProperties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_21-Dec-18 20:05
_Q12_21-Dec-18 20:05 
"female.Name" does not change in Form1 MouseEnter event.
How can be implemented a simple event like this, into my "Human" class ?
I must take the mouse coordinates XY and "put" them somewhere, when the event is fired.
But how and where?

//class Human:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace WindowsFormsApplication5
{
    class Human
    {
        public string Name = "none";
        public Point location = new Point();

        public void Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.DrawString(Name, new Font("Arial", 9), new SolidBrush(Color.Black), location.X - 5, location.Y - 15);
            e.Graphics.FillRectangle(new SolidBrush(Color.Red), new Rectangle(location.X, location.Y, 20, 20));
        }

        public event EventHandler MouseEnter;

    }
}



//Form1:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication5
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            female.Name = "Alina";
            female.location = new Point(30, 30);
            female.MouseEnter += new EventHandler(female_MouseEnter);
        }

        Human female = new Human();
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            female.Paint(sender, e);
        }

        void female_MouseEnter(object sender, EventArgs e)
        {
            female.Name = "Olina";
        }
    }
}

AnswerRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff21-Dec-18 21:00
mveOriginalGriff21-Dec-18 21:00 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_21-Dec-18 21:29
_Q12_21-Dec-18 21:29 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff21-Dec-18 21:42
mveOriginalGriff21-Dec-18 21:42 

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.