国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > 綜合 > 正文

一個dnslookuo例子。。。

2024-07-21 02:16:36
字體:
來源:轉載
供稿:網友
testform.cs
------------------------------------------------------------
using system;
using system.drawing;
using system.collections;
using system.componentmodel;
using system.windows.forms;
using system.net;

namespace testagain
{
    /// <summary>
    /// summary description for testform.
    /// </summary>
    public class testform : system.windows.forms.form
    {
        private system.windows.forms.textbox txt_domain;
        private system.windows.forms.button btn_find;
        private system.windows.forms.label lbl_result;
        /// <summary>
        /// required designer variable.
        /// </summary>
        private system.componentmodel.container components = null;

        public testform(form f_mainform)
        {
            //
            // required for windows form designer support
            //
            initializecomponent();
            this.mdiparent = f_mainform;

            //
            // todo: add any constructor code after initializecomponent call
            //
        }

            /// <summary>
            /// clean up any resources being used.
            /// </summary>
            protected override void dispose( bool disposing )
            {
                if( disposing )
                {
                    if(components != null)
                    {
                        components.dispose();
                    }
                }
                base.dispose( disposing );
            }

        #region windows form designer generated code
            /// <summary>
            /// required method for designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void initializecomponent()
            {
                this.txt_domain = new system.windows.forms.textbox();
                this.lbl_result = new system.windows.forms.label();
                this.btn_find = new system.windows.forms.button();
                this.suspendlayout();
                //
                // txt_domain
                //
                this.txt_domain.location = new system.drawing.point(104, 56);
                this.txt_domain.name = "txt_domain";
                this.txt_domain.size = new system.drawing.size(240, 21);
                this.txt_domain.tabindex = 1;
                this.txt_domain.text = "www.yahoo.com";
                //
                // lbl_result
                //
                this.lbl_result.location = new system.drawing.point(112, 112);
                this.lbl_result.name = "lbl_result";
                this.lbl_result.size = new system.drawing.size(336, 40);
                this.lbl_result.tabindex = 0;
                //
                // btn_find
                //
                this.btn_find.location = new system.drawing.point(360, 56);
                this.btn_find.name = "btn_find";
                this.btn_find.size = new system.drawing.size(72, 24);
                this.btn_find.tabindex = 2;
                this.btn_find.text = "dnslookup";
                this.btn_find.click += new system.eventhandler(this.btn_find_click);
                //
                // testform
                //
                this.autoscalebasesize = new system.drawing.size(6, 14);
                this.clientsize = new system.drawing.size(536, 329);
                this.controls.addrange(new system.windows.forms.control[] {
                                                                              this.btn_find,
                                                                              this.txt_domain,
                                                                              this.lbl_result});
                this.maximizebox = false;
                this.minimizebox = false;
                this.name = "testform";
                this.showintaskbar = false;
                this.startposition = system.windows.forms.formstartposition.centerscreen;
                this.text = "testform";
                this.windowstate = system.windows.forms.formwindowstate.maximized;
                this.resumelayout(false);

            }
        #endregion

            private void btn_find_click(object sender, system.eventargs e)
            {
                lbl_result.text = "正在解析中,請稍候...";
                iphostentry ip = dns.gethostbyname(this.txt_domain.text);
                ipaddress[] ipaddr = ip.addresslist;

                for (int i=0;i<ipaddr.length;i++)
                {
                    lbl_result.text += "/r/n" + ipaddr[i].tostring();
                }
            }
        }
}
 

收集最實用的網頁特效代碼!

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 长泰县| 尼玛县| 桂平市| 上林县| 乐业县| 桦甸市| 新巴尔虎右旗| 全椒县| 莱州市| 伽师县| 昆明市| 连云港市| 莎车县| 哈尔滨市| 湛江市| 伽师县| 江油市| 西平县| 兴安盟| 四平市| 蓝田县| 卢湾区| 永善县| 长春市| 罗甸县| 临武县| 大安市| 南昌县| 托里县| 锦州市| 东阳市| 资中县| 施甸县| 安陆市| 商南县| 古丈县| 长子县| 惠水县| 彰化市| 吉安市| 岳普湖县|