天津河东做网站贵吗关于校园网站的策划书

web/2025/10/7 10:36:30/文章来源:
天津河东做网站贵吗,关于校园网站的策划书,网站建设公司效益怎么样,正规网站建设方案详细目录 一、创建Web页面浏览器 1.示例源码 2.生成效果 二、局域网聊天程序 1.类 2.服务器端 3.客户端 一、创建Web页面浏览器 TextBox 控件用来输入要浏览的网页地址#xff0c;Button控件用来执行浏览网页操作#xff0c; WebBrowser控件用来显示要浏览的网页。这个控…目录 一、创建Web页面浏览器 1.示例源码 2.生成效果 二、局域网聊天程序 1.类 2.服务器端 3.客户端 一、创建Web页面浏览器 TextBox 控件用来输入要浏览的网页地址Button控件用来执行浏览网页操作 WebBrowser控件用来显示要浏览的网页。这个控件目前只能在.NET Framework 4.8下使用.NET8.0不支持了。 在使用WebBrowser 类时会占用大量资源当使用完后必须调用 Dispose() 方法以确保及时释放所有资源。 1.示例源码 // WebBrowser // 这个控件目前只能在.NET Framework 4.8下使用.NET8.0不支持了 // 在“网址”文本框中输入要浏览的网页地址 // 按Enter键或单击“转到”按钮即可浏览指定的网页。 using System; using System.Windows.Forms;namespace _WebBrowser {public partial class Form1 : Form{public Form1(){InitializeComponent();}private void WebBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e){}/// summary/// 创建一个Uri类型的变量用来存储要浏览的网页地址/// 在WebBrowser控件中显示指定的网页/// /summaryprivate void Button1_Click(object sender, EventArgs e){Uri address new Uri(textBox1.Text);webBrowser1.Url address;}private void Form1_Load(object sender, EventArgs e){label1.Text 网址;button1.Text 确定;Text WebBrowser;}private void TextBox1_KeyPress(object sender, KeyPressEventArgs e){if (e.KeyChar 13){if (textBox1.Text ! ){Button1_Click(sender, e); //判断是否按下Enter键}}}} }// Form1.Designer.cs namespace _WebBrowser {partial class Form1{/// summary/// 必需的设计器变量。/// /summaryprivate System.ComponentModel.IContainer components null;/// summary/// 清理所有正在使用的资源。/// /summary/// param namedisposing如果应释放托管资源为 true否则为 false。/paramprotected override void Dispose(bool disposing){if (disposing (components ! null)){components.Dispose();}base.Dispose(disposing);}#region Windows 窗体设计器生成的代码/// summary/// 设计器支持所需的方法 - 不要修改/// 使用代码编辑器修改此方法的内容。/// /summaryprivate void InitializeComponent(){this.label1 new System.Windows.Forms.Label();this.textBox1 new System.Windows.Forms.TextBox();this.button1 new System.Windows.Forms.Button();this.panel1 new System.Windows.Forms.Panel();this.webBrowser1 new System.Windows.Forms.WebBrowser();this.panel1.SuspendLayout();this.SuspendLayout();// // label1// this.label1.AutoSize true;this.label1.Location new System.Drawing.Point(10, 13);this.label1.Name label1;this.label1.Size new System.Drawing.Size(41, 12);this.label1.TabIndex 0;this.label1.Text label1;// // textBox1// this.textBox1.Location new System.Drawing.Point(63, 8);this.textBox1.Name textBox1;this.textBox1.Size new System.Drawing.Size(278, 21);this.textBox1.TabIndex 1;this.textBox1.KeyPress new System.Windows.Forms.KeyPressEventHandler(this.TextBox1_KeyPress);// // button1// this.button1.Location new System.Drawing.Point(347, 8);this.button1.Name button1;this.button1.Size new System.Drawing.Size(75, 23);this.button1.TabIndex 2;this.button1.Text button1;this.button1.UseVisualStyleBackColor true;this.button1.Click new System.EventHandler(this.Button1_Click);// // panel1// this.panel1.Controls.Add(this.webBrowser1);this.panel1.Location new System.Drawing.Point(12, 35);this.panel1.Name panel1;this.panel1.Size new System.Drawing.Size(410, 214);this.panel1.TabIndex 3;// // webBrowser1// this.webBrowser1.Dock System.Windows.Forms.DockStyle.Fill;this.webBrowser1.Location new System.Drawing.Point(0, 0);this.webBrowser1.MinimumSize new System.Drawing.Size(20, 20);this.webBrowser1.Name webBrowser1;this.webBrowser1.Size new System.Drawing.Size(410, 214);this.webBrowser1.TabIndex 4;// // Form1// this.AutoScaleDimensions new System.Drawing.SizeF(6F, 12F);this.AutoScaleMode System.Windows.Forms.AutoScaleMode.Font;this.ClientSize new System.Drawing.Size(434, 261);this.Controls.Add(this.panel1);this.Controls.Add(this.button1);this.Controls.Add(this.textBox1);this.Controls.Add(this.label1);this.Name Form1;this.StartPosition System.Windows.Forms.FormStartPosition.CenterScreen;this.Text Form1;this.Load new System.EventHandler(this.Form1_Load);this.panel1.ResumeLayout(false);this.ResumeLayout(false);this.PerformLayout();}#endregionprivate System.Windows.Forms.Label label1;private System.Windows.Forms.TextBox textBox1;private System.Windows.Forms.Button button1;private System.Windows.Forms.Panel panel1;private System.Windows.Forms.WebBrowser webBrowser1;} } 2.生成效果 二、局域网聊天程序 Windows窗体应用在解决方案下添加一个类和两个Windows窗体应用项目其中类文件用来封装接收信息和发送信息的方法两个Windows窗体应用项目分别用来作为聊天程序的服务器端和客户端。 框架.NET Framework 4.8无论什么框架可能会遇到MessageBox.Show 方法不被支持请按作者提供的方法去解决。 C#中的警告CS0120、CS0176、CS0183、CS0618、CS0649、CS8600、CS8601、CS8602、CS8604、CS8625、CS8618、CS0103及处理-CSDN博客  https://blog.csdn.net/wenchm/article/details/134606735?csdn_share_tail%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22134606735%22%2C%22source%22%3A%22wenchm%22%7Dhttp://C#%E4%B8%AD%E7%9A%84%E8%AD%A6%E5%91%8ACS0120%E3%80%81CS0176%E3%80%81CS0183%E3%80%81CS0618%E3%80%81CS0649%E3%80%81CS8600%E3%80%81CS8601%E3%80%81CS8602%E3%80%81CS8604%E3%80%81CS8625%E3%80%81CS8618%E3%80%81CS0103%E5%8F%8A%E5%A4%84%E7%90%86-CSDN%E5%8D%9A%E5%AE%A2%20%20https://blog.csdn.net/wenchm/article/details/134606735?csdn_share_tail%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22134606735%22%2C%22source%22%3A%22wenchm%22%7D .NET 8.0框架下我也重建了该项目遭遇到的MessageBox.ShowCS0103红色警告。百般折腾没有解决得了同样的问题。网友感兴趣的话可以试试如果解决了把经验分享一下。 1.类 // 聊天室解决方案下建立的公共类库 using System.Net.Sockets; using System.Net; using System.Text; using System; using System.Windows; using System.Windows.Forms;namespace StartListener {public class Class1{public const int port 11000;public void StartListener(){UdpClient udpclient new UdpClient(port);IPEndPoint ipendpoint new IPEndPoint(IPAddress.Any, port);try{while (true){//设置端口号//将网络端点表示为IP地址和端口号byte[] bytes udpclient.Receive(ref ipendpoint);string strlP 信息来自 ipendpoint.Address.ToString();string strlnfo Encoding.GetEncoding(gb2312).GetString(bytes, 0, bytes.Length);MessageBox.Show(strlnfo, strlP);}}catch (Exception e){MessageBox.Show(e.ToString());}finally{udpclient.Close();}}public static string Send(string strServer, string strContent){Socket socket new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);IPAddress ipaddress IPAddress.Parse(strServer); //将输入的字符串转换为IP地址 byte[] btContent Encoding.GetEncoding(gb2312).GetBytes(strContent); //将发送的内容存储到byte数组中IPEndPoint ipendpoint new IPEndPoint(ipaddress, 11000);socket.SendTo(btContent, ipendpoint);socket.Close();return 发送成功;}} }2.服务器端 // 服务器端要增加对公共类的引用 using StartListener; using System; using System.Windows.Forms;namespace ChatServer {public partial class Form1 : Form{readonly Class1 class1 new Class1();public Form1(){InitializeComponent();}/// summary/// 隐藏当前窗体//调用公共类中的方法接收信息/// /summaryprivate void Form1_Load(object sender, EventArgs e){Hide();class1.StartListener();}} }3.客户端 // 客户端端要增加对公共类的引用 using StartListener; using System.Diagnostics; using System; using System.Windows.Forms;namespace ChatClient {public partial class Form1 : Form{ Process myProcess;public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){myProcess Process.Start(Server.exe); //开启服务}private void Button1_Click(object sender, EventArgs e){string send Class1.Send(textBox1.Text, textBox2.Text);MessageBox.Show(send); //发送信息textBox2.Text string.Empty;textBox2.Focus();}private void TextBox1_KeyPress(object sender, KeyPressEventArgs e){if (e.KeyChar 13)textBox2.Focus();}private void TextBox2_KeyPress(object sender, KeyPressEventArgs e){if (e.KeyChar 13)button1.Focus();}private void Form1_FormClosing(object sender, FormClosingEventArgs e){myProcess.Kill();}} }// Form1.Designer.cs namespace ChatClient {partial class Form1{/// summary/// 必需的设计器变量。/// /summaryprivate System.ComponentModel.IContainer components null;/// summary/// 清理所有正在使用的资源。/// /summary/// param namedisposing如果应释放托管资源为 true否则为 false。/paramprotected override void Dispose(bool disposing){if (disposing (components ! null)){components.Dispose();}base.Dispose(disposing);}#region Windows 窗体设计器生成的代码/// summary/// 设计器支持所需的方法 - 不要修改/// 使用代码编辑器修改此方法的内容。/// /summaryprivate void InitializeComponent(){this.button1 new System.Windows.Forms.Button();this.label1 new System.Windows.Forms.Label();this.label2 new System.Windows.Forms.Label();this.textBox1 new System.Windows.Forms.TextBox();this.textBox2 new System.Windows.Forms.TextBox();this.SuspendLayout();// // button1// this.button1.Location new System.Drawing.Point(297, 12);this.button1.Name button1;this.button1.Size new System.Drawing.Size(75, 23);this.button1.TabIndex 0;this.button1.Text button1;this.button1.UseVisualStyleBackColor true;this.button1.Click new System.EventHandler(this.Button1_Click);// // label1// this.label1.AutoSize true;this.label1.Location new System.Drawing.Point(12, 23);this.label1.Name label1;this.label1.Size new System.Drawing.Size(41, 12);this.label1.TabIndex 1;this.label1.Text label1;// // label2// this.label2.AutoSize true;this.label2.Location new System.Drawing.Point(12, 55);this.label2.Name label2;this.label2.Size new System.Drawing.Size(41, 12);this.label2.TabIndex 2;this.label2.Text label2;// // textBox1// this.textBox1.Location new System.Drawing.Point(88, 14);this.textBox1.Name textBox1;this.textBox1.Size new System.Drawing.Size(203, 21);this.textBox1.TabIndex 3;this.textBox1.KeyPress new System.Windows.Forms.KeyPressEventHandler(this.TextBox1_KeyPress);// // textBox2// this.textBox2.Location new System.Drawing.Point(88, 46);this.textBox2.Multiline true;this.textBox2.Name textBox2;this.textBox2.Size new System.Drawing.Size(284, 203);this.textBox2.TabIndex 4;this.textBox2.KeyPress new System.Windows.Forms.KeyPressEventHandler(this.TextBox2_KeyPress);// // Form1// this.AutoScaleDimensions new System.Drawing.SizeF(6F, 12F);this.AutoScaleMode System.Windows.Forms.AutoScaleMode.Font;this.ClientSize new System.Drawing.Size(384, 261);this.Controls.Add(this.textBox2);this.Controls.Add(this.textBox1);this.Controls.Add(this.label2);this.Controls.Add(this.label1);this.Controls.Add(this.button1);this.Name Form1;this.StartPosition System.Windows.Forms.FormStartPosition.CenterScreen;this.Text Form1;this.FormClosing new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);this.Load new System.EventHandler(this.Form1_Load);this.ResumeLayout(false);this.PerformLayout();}#endregionprivate System.Windows.Forms.Button button1;private System.Windows.Forms.Label label1;private System.Windows.Forms.Label label2;private System.Windows.Forms.TextBox textBox1;private System.Windows.Forms.TextBox textBox2;} }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/88426.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

南宁市建设处网站分类模板wordpress

Zipkin是一款开源的分布式链路追踪系统,主要功能包括: 1. 采集跟踪数据 - Zipkin client库负责收集并上报各服务的请求信息。 2. 存储跟踪数据 - 存储层默认采用Zipkin自带的基于内存的快速存储,也支持整合MySQL、Cassandra等外部存储。 3. 查询接口 - 提供RESTful API进行跟…

山东建设厅执业资格注册中心网站手机小程序开发教程

这里假设我们的公司名叫果冻(Jelly),我们准备开发一款对标苹果 14 的手机,取名叫 大米14(Rice14)。 接下来我们在源码中添加我们自己的产品(Product) 在 device 目录下添加如下的目…

linux网站服务器搭建电子商务网站建设怎么做

今天这篇文章我们主要讲一下Android系统中的截屏事件处理流程。用过android系统手机的同学应该都知道,一般的android手机按下音量减少键和电源按键就会触发截屏事件(国内定制机做个修改的这里就不做考虑了)。那么这里的截屏事件是如何触发的呢…

做教程网站资源放哪里有展示型网站建设方案书

目录 1.简介 2.Optional类常用方法 3.示例代码 4.示例代码仓库地址 1.简介 Java 8引入了一个重要的新特性,即Optional类。Optional类是为了解决空指针异常而设计的。 在Java中,当我们尝试访问一个空对象的属性或调用其方法时,很容易抛出…

购物网站欢迎页面怎么设计外贸进口流程

文章目录 过期监听准备工作稍微复习下Jedis与JedisPool 模拟延时队列优缺点**优点**:**缺点**: ZSet 实现延时队列引入依赖模拟延时队列优缺点**优点**(跟过期监听一样):**缺点**: Reference Redis实现延时…

建设集团网站上海今天最新发布会

本节主要就是讲述的机器学习的数学基础,提到数学基础,可能一眼就会是满眼的枯燥、没意思,但是成就英雄的路上注定了孤独,要想要真正的在学术上有所突破就必须挨得住寂寞,受得住孤独,才能真正的走进熟悉直到…

站长工具seo综合查询adc舟山市普陀区建设局网站

全球图形学领域教育的领先者、自研引擎的倡导者、底层技术研究领域的技术公开者,东汉书院在致力于使得更多人群具备内核级竞争力的道路上,将带给小伙伴们更多的公开技术教学和视频,感谢一路以来有你的支持。我们正在用实际行动来帮助小伙伴们…

做视频图片博客网站怎样把自己的网站推广出去

一、题目要求: 某学校要设计一个数据库,学校的业务规则概括如下: 学校内班级若干,每个班级内又有学生若干。 学校开设课程若干,只有某些特定的班级能上指定的课程。 学生选修某些课程,但是在自身班级下的课程是必修。 学校定期组织考试,成绩…

用vs做的网站怎么打开吗网站开发有侵权吗

微信小程序实战系列 《微信小程序实战-01翻页时钟-1》《微信小程序实战-02翻页时钟-2》 文章目录 微信小程序实战系列前言动态翻页效果实现clock.wxmlclock.wxssclock.js运行效果 总结 前言 本文继续完成最后一个部分“动态翻页效果”。 动态翻页效果实现 clock.wxml <…

google网站建设wordpress 4.5.2 下载

社区团购业务正在中国迅速崭露头角&#xff0c;而随着行业的快速发展&#xff0c;也带来了一系列挑战&#xff0c;包括供应链管理、物流配送、产品质量和用户体验等问题。本文将探讨这些问题&#xff0c;并提出一些可能的解决方案。 一、问题和挑战 1.1 供应链管理 对于社区团…

如何让自己的网站被搜索引擎收录打广告去哪个平台免费

虽然口令的安全性很值得担忧&#xff0c;但是口令在OpenSSL中是经常使用的&#xff0c;这是没有办法替代的一种简易的保护数据的方法。OpenSSL中使用口令的地方很多&#xff0c;比如密钥的加密和解密&#xff0c;等等。OpenSSL的指令提供了多种灵活的口令输入方法&#xff0c;但…

小语种服务网站定制微信小程序开发价格

作者主页&#xff1a;作者主页 数据结构专栏&#xff1a;数据结构 创作时间 &#xff1a;2024年5月18日 前言&#xff1a; 今天我们就给大家带来几种排序的讲解&#xff0c;包括冒泡排序&#xff0c;插入排序&#xff0c;希尔排序&#xff0c;选择排序&#xff0c;堆排序&…

使用模板怎么建站在线购物网站开发项目

import randomrandom.shuffle(a) # a是一个列表

京东云网站建设深圳南山网站建设工作室

一、静态协议的优缺点&#xff1a; 缺点&#xff1a; 1、中大型网络配置量过大 2、不能基于拓扑的变化而实时的变化 优点&#xff1a; 1、不会额外暂用物理资源 2、安全问题 3、计算路径问题 简单、小型网络建议使用静态路由&#xff1b;中大型较复杂网络&#xff0c;建议使用…

句容建设网站wordpress文章页面菜单

效果图&#xff1a; 各字段设置&#xff1a; 以下是一个使用 AI&#xff08;DeepSeeker&#xff09; 飞书多维表格分解项目待办模板的示例&#xff0c;你可以根据实际情况进行调整和优化&#xff1a; 列表中需要选择对象&#xff0c;且选择输出结果&#xff08;记得控制字符长度…

企业网站php模板下载网站排名软件优化

计算节点的功能&#xff1a; 提供容器运行的环境 kube-proxy的主要功能&#xff1a; 术业有专攻&#xff0c; kube-proxy的主要功能可以概括为4个字 网络规则 那么kube-proxy自己其实是个daemonset控制器跑的 每个节点上都有个的pod 它负责网络规则 其实呢 它还是个小…

合肥百度 网站建设邯郸人才网

今天又看到这么一个帖子讨论一款国产化软件&#xff0c;属实给我震撼到了。 对于国产化产品&#xff0c;一直主打的都是”自研“&#xff0c;难道是我对”自研“这个词的理解有误&#xff1f; 做一个产品&#xff0c;别人开源了&#xff0c;你拿过来使用&#xff0c;你可以说…

手机商场网站制作必须做网站等级保护

/etc/shadow 文件详解用户帐户本身在 /etc/passwd 中定义。Linux 系统包含一个 /etc/passwd 的同伴文件&#xff0c;叫做 /etc/shadow。该文件不像 /etc/passwd&#xff0c;只有对于 root 用户来说是可读的&#xff0c;并且包含加密的密码信息。我们来看一看 /etc/shadow 的一个…

免费建筑设计素材网站现在哪些做进口商品的电商网站

在网站的管理系统中&#xff0c;有时需要查看某个文件是否被修改过、在什么时间被修改的、最后的修改时间是什么时候&#xff0c;本实例就可以实现这个功能&#xff0c;对表单中提交的文件进行判断&#xff0c;检测出修改时间。关键技术本实例主要应用filectime()和filemtime()…

风险的网站怎么出现网站建设关键词优化价格

要在 Linux 中创建、复制和删除文件和目录&#xff0c;可以使用各种命令。 以下是一些常用的&#xff1a; 1、创建目录&#xff1a; mkdir 目录名创建目录层次结构&#xff1a; mkdir -p 目录路径/子目录创建文件&#xff1a; touch 文件名4.复制文件&#xff1a; cp 源文件…