Click here to Skip to main content
14,868,945 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Excel test specific cells in a column Pin
Richard MacCutchan23-Mar-21 2:09
mveRichard MacCutchan23-Mar-21 2:09 
QuestionMike`s Gradiator Pin
Alejandro01122-Mar-21 2:22
MemberAlejandro01122-Mar-21 2:22 
AnswerRe: Mike`s Gradiator Pin
Richard Deeming22-Mar-21 2:41
mveRichard Deeming22-Mar-21 2:41 
GeneralRe: Mike`s Gradiator Pin
Alejandro01122-Mar-21 2:48
MemberAlejandro01122-Mar-21 2:48 
AnswerRe: Mike`s Gradiator Pin
Gerry Schmitz22-Mar-21 7:49
mveGerry Schmitz22-Mar-21 7:49 
GeneralRe: Mike`s Gradiator Pin
Alejandro01122-Mar-21 10:16
MemberAlejandro01122-Mar-21 10:16 
GeneralRe: Mike`s Gradiator Pin
Alejandro01123-Mar-21 14:53
MemberAlejandro01123-Mar-21 14:53 
QuestionHow to write to Form1.texBox1 from another class. Pin
Member 1406872419-Mar-21 11:17
MemberMember 1406872419-Mar-21 11:17 
I have a simple Windows Form with textbox. When form is loading, I start another class with counter. How to write to Form1.textBox1 from another class?

namespace Test_CSharp
{
    public partial class Form1 : Form
    {
        public static Form1 form1;

        public Form1()
        {
            InitializeComponent();
            form1 = this;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Run_Nonameclass();
        }

        private void Run_Nonameclass()
        {
            Nonameclass newNonameclass = new Nonameclass();
        }

    }
}

namespace Test_CSharp
{
    class Nonameclass
    {

        private System.Timers.Timer mycounter;
        public int cnt;
        Form1 frm = new Form1();
        public Nonameclass()
            {

            cnt = 0;

            mycounter = new System.Timers.Timer();
            mycounter.Interval = 1000;
            mycounter.Start();
            mycounter.Elapsed += mycounter_Tick;

        }

        private void mycounter_Tick(object source, System.Timers.ElapsedEventArgs e)
        {
            try
            {
                cnt = cnt + 1;
                frm.textBox1.Text = cnt.ToString();
            }
            catch (Exception ex)
            {
            }

        }
    }
}

AnswerRe: How to write to Form1.texBox1 from another class. Pin
OriginalGriff19-Mar-21 12:24
mveOriginalGriff19-Mar-21 12:24 
QuestionCombobox Text Pin
Ismael Oliveira 202119-Mar-21 8:01
MemberIsmael Oliveira 202119-Mar-21 8:01 
AnswerRe: Combobox Text Pin
OriginalGriff19-Mar-21 9:44
mveOriginalGriff19-Mar-21 9:44 
GeneralRe: Combobox Text Pin
Ismael Oliveira 202119-Mar-21 10:14
MemberIsmael Oliveira 202119-Mar-21 10:14 
AnswerRe: Combobox Text Pin
BillWoodruff20-Mar-21 6:15
mveBillWoodruff20-Mar-21 6:15 
QuestionUnhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu18-Mar-21 23:05
Memberhuycaothu18-Mar-21 23:05 
AnswerRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
OriginalGriff18-Mar-21 23:19
mveOriginalGriff18-Mar-21 23:19 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu19-Mar-21 2:43
Memberhuycaothu19-Mar-21 2:43 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
OriginalGriff19-Mar-21 2:56
mveOriginalGriff19-Mar-21 2:56 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu20-Mar-21 0:03
Memberhuycaothu20-Mar-21 0:03 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
Dave Kreskowiak19-Mar-21 4:28
mveDave Kreskowiak19-Mar-21 4:28 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
Richard MacCutchan19-Mar-21 4:38
mveRichard MacCutchan19-Mar-21 4:38 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu19-Mar-21 23:53
Memberhuycaothu19-Mar-21 23:53 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
Richard MacCutchan20-Mar-21 0:10
mveRichard MacCutchan20-Mar-21 0:10 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu20-Mar-21 0:52
Memberhuycaothu20-Mar-21 0:52 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
huycaothu20-Mar-21 1:00
Memberhuycaothu20-Mar-21 1:00 
GeneralRe: Unhandle System.AccessViolationException from FFMediaToolkit Pin
Richard MacCutchan20-Mar-21 3:04
mveRichard MacCutchan20-Mar-21 3: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.