久久人妻少妇嫩草av无码专区,亚洲自偷精品视频自拍,东北少妇不戴套对白第一次,亚洲中文字幕无码日韩精品

814382100
學(xué)無(wú)止境
級別: 家園?
精華主題: 0
發(fā)帖數量: 573 個(gè)
工控威望: 740 點(diǎn)
下載積分: 1892 分
在線(xiàn)時(shí)間: 164(小時(shí))
注冊時(shí)間: 2016-10-29
最后登錄: 2025-06-07
查看814382100的 主題 / 回貼
樓主  發(fā)表于: 2020-06-04 19:16
圖片:
我在Csharp 中添加這句語(yǔ)句總是報錯    this.Controls.Add(this.axActUtlType);  
網(wǎng)上時(shí)候     this.Controls.Add(this.axActUtlType); //貌似這個(gè)控件必須要加到Controls中,不然就會(huì )引發(fā)異常。 怎么將控件添加加到Controls中了

public partial class Form1 : Form
    {
        private AxActUtlTypeLib.AxActUtlType axActUtlType = null;
        public Form1()
        {
            InitializeComponent();
            this.axActUtlType = new AxActUtlTypeLib.AxActUtlType();
            // ((System.ComponentModel.ISupportInitialize)(this.axActUtlType)).BeginInit();
           this.Controls.Add(this.axActUtlType);       //貌似這個(gè)控件必須要加到Controls中,不然就會(huì )引發(fā)異常。
        }

        private void butconn_Click(object sender, EventArgs e)
        {
            try
            {
                int iStation = Convert.ToInt32(this.txtStationNo.Text.Trim());
                this.axActUtlType.ActLogicalStationNumber = iStation;
                this.axActUtlType.ActPassword = this.txtPassword.Text.Trim();
                int rtn = this.axActUtlType.Open();
                if (rtn == 0)
                {
                   MessageBox.Show("連接成功!");
                  
                }
                else
                {
                    MessageBox.Show("連接失敗");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("未知錯誤");
            }


也不知道那錯了請師傅們指點(diǎn)
不小心遇見(jiàn)你
自動(dòng)項目、PLC、視覺(jué)、通訊等工控軟件開(kāi)發(fā)QQ3515716
級別: 工控俠客

精華主題: 3 篇
發(fā)帖數量: 2101 個(gè)
工控威望: 3024 點(diǎn)
下載積分: 25364 分
在線(xiàn)時(shí)間: 1501(小時(shí))
注冊時(shí)間: 2014-01-05
最后登錄: 2025-06-07
查看不小心遇見(jiàn)你的 主題 / 回貼
1樓  發(fā)表于: 2020-06-05 08:13
缺少引用的控件
項目、視覺(jué)、通訊QQ3515716