Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Read Events equivalent in C#
Message
From
12/06/2021 01:01:24
 
 
To
12/06/2021 00:55:35
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01681125
Message ID:
01681157
Views:
37
>>Hi Bill,
>>
>>All the above code was copied from Program.cs". There was a "new Form1" to initialize the form, and, button1_Click(...) was in it. Is this what you said?
>>Was I miss something? Could you show me how to do it by writing some code for me?
>>
>>TIA,
>>Ben
>>
>>
>>>I note that you have the main method in the form.
>>>When I create a winform app, the main method is automatically created in program.cs, which instantiates and executes the form.

Ben
When I create a new winform app, I get two files:
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace TestForm
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}
Form1.cs
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 TestForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
    }
}
I also get some support files for the form.
I don't get anything like what you have.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Reply
Map
View

Click here to load this message in the networking platform