Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
GeneralRe: how I input Hebrew from winForm to mySql Pin
Luc Pattyn16-Jul-19 3:31
sitebuilderLuc Pattyn16-Jul-19 3:31 
GeneralRe: how I input Hebrew from winForm to mySql Pin
Member 1387299916-Jul-19 7:08
Member 1387299916-Jul-19 7:08 
Questionregular expression to extract data from a html table with TD marked with id using C# Pin
Indexon India15-Jul-19 6:06
Indexon India15-Jul-19 6:06 
AnswerRe: regular expression to extract data from a html table with TD marked with id using C# Pin
OriginalGriff15-Jul-19 6:14
mveOriginalGriff15-Jul-19 6:14 
JokeRe: regular expression to extract data from a html table with TD marked with id using C# Pin
Richard Deeming15-Jul-19 7:52
mveRichard Deeming15-Jul-19 7:52 
GeneralRe: regular expression to extract data from a html table with TD marked with id using C# Pin
OriginalGriff15-Jul-19 8:04
mveOriginalGriff15-Jul-19 8:04 
AnswerRe: regular expression to extract data from a html table with TD marked with id using C# Pin
#realJSOP15-Jul-19 23:39
mve#realJSOP15-Jul-19 23:39 
QuestionC# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx714-Jul-19 23:24
wrightyrx714-Jul-19 23:24 
Im trying to figure out Delegates as I have read this is the best way to pass Values from one form to another.

I have tried to do this but am getting an error.

So to test I am trying to do the following.

Form1 has a button which opens Form2 which contains a DatePicker. The user selects a date and clicks OK. I then want the date passed back to a textbox on Form1.

This is my code.

FORM1 - CODE (The getEffDate in this code is where im getting the error.)

private void TestingButton_Click(object sender, EventArgs e)
{
    Form_EffectiveDate effDate = new Form_EffectiveDate();           
        if (effDate.ShowDialog() == DialogResult.OK)
        {
        EffDateTextBox.Text = Form_EffectiveDate.getEffDate;
        }
}


FORM 2 - Code
namespace Manager_Changes
{
    public partial class Form_EffectiveDate : Form
    {
        public delegate void GetEffDate(object sender);
        public GetEffDate getEffDate;

        public Form_EffectiveDate()
        {
            InitializeComponent();
        }

        private void DateOKButton_Click(object sender, EventArgs e)
        {
            getEffDate(effDateTimePicker.Value.ToString());
            DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
    }
}   

Chris Wright

AnswerRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff14-Jul-19 23:35
mveOriginalGriff14-Jul-19 23:35 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx714-Jul-19 23:50
wrightyrx714-Jul-19 23:50 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 0:17
mveOriginalGriff15-Jul-19 0:17 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 0:33
wrightyrx715-Jul-19 0:33 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 0:47
mveOriginalGriff15-Jul-19 0:47 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 3:08
wrightyrx715-Jul-19 3:08 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 3:46
mveOriginalGriff15-Jul-19 3:46 
AnswerRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o14-Jul-19 23:52
professionalphil.o14-Jul-19 23:52 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 0:34
wrightyrx715-Jul-19 0:34 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o15-Jul-19 0:43
professionalphil.o15-Jul-19 0:43 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 1:00
wrightyrx715-Jul-19 1:00 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 1:30
mveOriginalGriff15-Jul-19 1:30 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 1:35
wrightyrx715-Jul-19 1:35 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 1:47
mveOriginalGriff15-Jul-19 1:47 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o15-Jul-19 1:46
professionalphil.o15-Jul-19 1:46 
AnswerRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
Sagar-Jaybhay16-Jul-19 4:19
Sagar-Jaybhay16-Jul-19 4:19 
QuestionPowerpoint addin - where to start? Pin
pr1mem0ver12-Jul-19 5:04
pr1mem0ver12-Jul-19 5:04 

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.