Winform从入门到精通(12)——LinkLabel(史上最全)

一、属性

1、LinkArea

获取或设置文本中视为链接的范围,比如0,10,代表的是从0索引开始,长度为10个字符的链接,下图蓝色带有下划线的为链接部分。在这里插入图片描述

2、LinkBehavior

指的是,对于要链接的文本,设置几种不同的显示状态,第一种是:经常显示下划线,第二种是鼠标悬停在控件上时显示下划线,第三种是从不显示下划线;

3、ActiveLinkColor

用户单击超链接时,超链接的颜色

4、DisabledLinkColor

表示禁用超链接时所用的颜色
linkLabel1.Links[0].Enabled = false;//linklabel默认是有一个链接
在这里插入图片描述
也可以添加更多的链接,如下
linkLabel1.Links.Add(15, 5);

【愚公系列】2023年10月 Winform控件专题 LinkLabel控件详解 Winform控件是Windows Forms中的用户界面元素,它们可以用于创建Windows应用程序的各种视觉和交互组件,例如按钮、标签、文本框、下拉列表框、复选框、单选框、进度条等。开发人员可以使用Winform控件来构建用户界面并响应用户的操作行为,从而创建功能强大的桌面应用程序。LinkLabel 控件的 LinkArea 属性用于指定需要关联到超链接的文本区域。默认情况下,LinkLabel 控件会将文本中所有符合 URL、电子邮件地址或本地文件路径格式的字符串都转换为超链接。 阅读详情

相关推荐

【16】C# 窗体应用WinForm ——【标签Label、超链接标签LinkLabel】属性、方法、实例应用

本文介绍了WinForm中标签控件(Lable/LinkLabel)的基本属性和应用实例。主要内容包括:1)标签控件的核心属性(Text/Font/Visible等);2)实现两个超链接标签内容互换的实例,通过MouseClick事件交换Text属性值;3)实现点击标签跳转网页的实例,使用Process.Start调用系统浏览器。文章通过具体代码示例演示了标签控件的事件处理机制,包括属性设置、点击事件绑定和错误处理方法,展示了WinForm开发中标签控件的基础应用场景。

程序员,他们想的是什么?他们想的永远都是技术,他们崇尚的也永远都是技术。 827

WinForm中的LinkLabel控件使用和示例

在Form1_Load事件中,我们设置了LinkLabel控件的文本,并创建了一个链接对象,将链接地址设置为"https://www.example.com"。通过使用LinkLabel控件,我们可以在WinForm应用程序中创建类似于网页中的超链接,以便用户可以点击并访问相关的资源或执行特定的操作。本文将详细介绍LinkLabel控件的使用和示例,并提供相应的源代码。在linkLabel1_LinkClicked事件中,当用户单击链接时,我们获取了链接的地址,并使用默认浏览器打开了该链接。

CyberNova的博客 551

C#Winform超链接标签(linkLabel)控件

linkLabel控件是一个超链接控件,用来展示超链接以及控制对单击超链接后进行一些操作: 常用属性: LinkColor:链接颜色属性,控制标签的链接部分的颜色。 LinkVisited:控制该超链接标签是否被点击过(注意:并不是程序运行期间不写任何代码点击该标签后LinkVisited属性就会自动变成true,LinkVisited的由False变成True需要我们对点击事件编写代码对Link...

qq_30725967的博客 3469

SLF4J StaticLoggerBinder报错全解析:从依赖冲突到类加载的根治方案

在Java应用开发中,日志系统是监控、调试和问题排查的核心基础设施。SLF4J作为日志门面(Facade),通过统一的API接口实现了业务代码与具体日志实现(如Logback、Log4j2)的解耦,其工作原理依赖于运行时在类路径上查找并绑定具体的日志实现。当出现“Failed to load class org.slf4j.impl.StaticLoggerBinder”错误时,意味着SLF4J无法完成这一关键绑定,导致日志功能静默失效,这在依赖管理复杂的微服务架构和持续集成环境中尤为常见。该问题的技术价值

weixin_30892889的博客 466

Linux下用SquareLine Studio开发LVGL界面:从安装到实战的完整避坑指南

本文提供了一份在Linux系统下使用SquareLine Studio开发LVGL图形界面的完整实战指南。内容涵盖从SDL库安装、SquareLine Studio环境配置、界面可视化设计,到工程导出、源码编译及常见错误排查的全流程。重点解析了如何将设计界面无缝集成到Linux开发流程中,并针对嵌入式设备移植提供了关键步骤,旨在帮助开发者高效避坑,快速上手LVGL界面开发。

egg99的博客 910

最近爆火的 Ontology 本体是什么?一文看懂基础概念 + 落地实操

1993 Tom Gruber原版定义:本体是对领域概念化模型的显式形式化规范。1998 Studer完善通用定义:本体是共享、明确、形式化的领域概念模型规范。大白话翻译:本体就是机器能看懂的行业词典+业务规则手册。数据库只管存数据,本体只管定规则,知识图谱是规则+数据结合体。区别于普通开源本体工具,这款国产商用本体平台核心优势:业务沙盘推演、可控业务数据写回、全链路字段级数据血缘审计,适配企业生产级业务落地。

驽马不舍 373

Ubuntu20.04下 嵌入式 Qt 开发环境的搭建(适用于Tiny6410)

Ubuntu 下 Tiny6410 嵌入式 Qt 开发环境的搭建 目录导航Ubuntu 下 Tiny6410 嵌入式 Qt 开发环境的搭建前言1.安装前的准备工作2.安装交叉编译器 前言 这篇文章,主要是基于 Ubuntu19.10版本而写,写此文的初衷,是为了自己使用,因为最近正在以Tiny6410板子做实训,所以也是初学者一枚,只能保证我遇上的问题统统能够解决掉,至于一些没遇上的,欢迎各位看客给我留言,大家一起讨论,一起解决。 注:本文会持续更新 1.安装前的准备工作 环境要求 Linux系统:U

繁臻的小窝 4897

携程景点评论数据爬取实战:破解AJAX动态加载与分页参数逆向分析

本文详细介绍了携程景点评论数据爬取的实战经验,重点破解了AJAX动态加载与分页参数逆向分析的技术难题。通过分析`getCommentCollapseList`接口,解析动态参数如`poiId`和`pageIndex`,并实现分页逻辑,帮助开发者高效获取评论数据。文章还提供了完整的Python爬虫代码和反爬策略,适用于数据分析与内容挖掘。

weixin_29098367的博客 676

【Qt开发】管理OpenGL上下文QOpenGLContext类及应用实践示例代码

QOpenGLContext 提供了一个简单、高效的接口来管理 OpenGL 上下文。本文详细介绍了 QOpenGLContext 的基本功能、常用方法、信号槽机制、高级应用技巧及常见问题的解决方法。通过这些介绍,读者可以更好地掌握和利用 QOpenGLContext 进行 OpenGL 渲染和管理实验。对于有特殊需求的开发者,也可以通过探索更多高级设置和优化策略,以满足具体的应用场景。

科技改变人类,技术成就未来 1877

2.0 电子凸轮 西门子1500电子凸轮使用研究1

本文研究了S7-1500T电子凸轮同步控制技术,通过仿真实验得出以下结论:1)通过比例系数可调整凸轮曲线形状;2)解除同步需调用从轴其他运动指令;3)详细阐述了凸轮同步的5个实施步骤。重点分析了三种同步类型(主值距离同步、动态参数同步和直接同步)的特点及应用场景,并探讨了缩放系数、偏移量等参数对凸轮曲线的影响。同时介绍了凸轮应用模式及常见异常处理方法,为工程应用提供了重要参考。

qq_34047402的博客 814

Go语言爬虫:chromedp 的详细使用

chromedp 是 Go 语言中无头浏览器自动化的终极利器。它能驱动真实的 Chrome 浏览器,处理 JavaScript 渲染、复杂交互和反爬虫机制

数据知道的博客 4499

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: Winform从入门到精通(11)——numericUpDown(史上最全)
下一篇: Winform从入门到精通(13)——DateTimePicker(史上最全)
上位机马工
博客等级 码龄11年 6477粉丝 712原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

上位机马工

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址