Click here to Skip to main content
14,304,058 members
   

C#

 
GeneralRe: how I input Hebrew from winForm to mySql Pin
Luc Pattyn16-Jul-19 3:31
professionalLuc Pattyn16-Jul-19 3:31 
GeneralRe: how I input Hebrew from winForm to mySql Pin
Member 1387299916-Jul-19 7:08
memberMember 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
memberIndexon 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
protectorOriginalGriff15-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
protectorOriginalGriff15-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
memberwrightyrx714-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
protectorOriginalGriff14-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
memberwrightyrx714-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
protectorOriginalGriff15-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
memberwrightyrx715-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
protectorOriginalGriff15-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
memberwrightyrx715-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
protectorOriginalGriff15-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
mvephil.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
memberwrightyrx715-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
mvephil.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
memberwrightyrx715-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
protectorOriginalGriff15-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
memberwrightyrx715-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
protectorOriginalGriff15-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
mvephil.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
memberSagar-Jaybhay16-Jul-19 4:19 
QuestionPowerpoint addin - where to start? Pin
pr1mem0ver12-Jul-19 5:04
memberpr1mem0ver12-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.