当前位置:网站首页>VB. Net class library (advanced version - 1)
VB. Net class library (advanced version - 1)
2022-06-26 21:56:00 【Xiaoyu 163】
Whether it's vb still VB.net, No real dll
.net Written dll Only in .net Use
So let's create one VB.net Dynamic link library ,net Free choice of version , remember , It must be .net Of
Entry project , quote “system.Drawing”, You don't need to download it yourself

write in
Imports System.Drawing
Public Class Main
Protected Image As Bitmap
Protected g As Graphics
''' <summary>
''' Call the function alone , Only perform the create task ; If you need to get pictures , Will return a picture (bitmap)
''' </summary>
''' <param name="bmpsize"> New picture size (size)</param>
''' <param name="backColor"> New picture background color (color)</param>
''' <returns></returns>
Public Function Creatbmp(bmpsize As Size, backColor As Color)
Image = New Bitmap(bmpsize.Width, bmpsize.Height)
g = Graphics.FromImage(Image)
g.Clear(backColor)
Return Image
End Function
End Class
Did you learn .netGDI I can understand everything , But writing it yourself is more profound
Build a small project in the solution : Used to call a function , The name is called. test( whatever )
Pull one button,picturebox
Add... To the main class :
Be careful , there GDI_Make_NET4_5.Main yes The namespace of the class library .Main class
Public GDI As New GDI_Make_NET4_5.Mainbutton Join in :( Parameters can be changed at will )
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Pic.Image = GDI.Creatbmp(New Drawing.Size(200, 200), Color.FromArgb(255, 0, 0))
End Sub Primary stage :
It just provides a convenient and simple call , It can also be convenient for others to use ……
边栏推荐
- 协同过滤进化版本NeuralCF及tensorflow2实现
- Icml2022 | neurotoxin: a lasting back door to federal learning
- YOLOv6:又快又准的目标检测框架开源啦
- Kdd2022 𞓜 unified session recommendation system based on knowledge enhancement prompt learning
- 【数学建模】基于matlab GUI随机节点的生成树【含Matlab源码 1919期】
- The sharp sword of API management -- eolink
- [bug feedback] the problem of message sending time of webim online chat system
- Unity 设置Material、Shader的方法
- 2022年,中轻度游戏出海路在何方?
- 指南针能开户炒股吗?安全吗?
猜你喜欢

Comprehensive evaluation of online collaboration documents: note, flowus, WOLAI, Feishu, YuQue, Microsoft office, Google Docs, Jinshan docs, Tencent docs, graphite docs, Dropbox paper, nutcloud docs,

Icml2022 | neurotoxin: a lasting back door to federal learning

LabVIEW Arduino tcp/ip remote smart home system (project part-5)

矩阵求导及其链式法则

AI智能抠图工具--头发丝都可见

Introduction of classic wide & deep model and implementation of tensorflow 2 code

Test comparison of linear model LN, single neural network SNN, deep neural network DNN and CNN

Application and Optimization Practice of 100 million level monthly live national karaoke feed service in Tencent cloud mongodb

leetcode:152. 乘积最大子数组【考虑两个维度的dp】

BN(Batch Normalization) 的理论理解以及在tf.keras中的实际应用和总结
随机推荐
DLA model (classification model + improved segmentation model) + deformable convolution
Flower shop window layout [dynamic planning]
How SAP Spartacus default routing configuration works
[solution] sword finger offer 15 Number of 1 in binary (C language)
Pass note 【 dynamic planning 】
诗尼曼家居冲刺A股:年营收近12亿 红星美凯龙与居然之家是股东
Solution of valuenotifier < list < t > > monitoring problem in fluent
Final part of web crawler: send directional messages to 100000 Netease cloud users
Different subsequence problems I
Comprehensive evaluation of online collaboration documents: note, flowus, WOLAI, Feishu, YuQue, Microsoft office, Google Docs, Jinshan docs, Tencent docs, graphite docs, Dropbox paper, nutcloud docs,
打新债注册开户有没有什么风险?安全吗?
网络爬虫2:抓取网易云音乐评论用户ID及主页地址
Is there any risk in opening a securities registration account? Is it safe?
Centos7编译安装Redis
【图像处理基础】基于matlab GUI图像曲线调整系统【含Matlab源码 1923期】
在哪个平台买股票开户最安全?求分享
MATLAB与Mysql数据库连接并数据交换(基于ODBC)
如何在 SAP BTP 平台上启用 HANA Cloud 服务
Matrix derivation and its chain rule
Y48. Chapter III kubernetes from introduction to mastery -- pod status and probe (21)