Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What's the difference between VB and VB.NET?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces VB and VB. NET what is the difference, with a certain reference value, interested friends can refer to, I hope you read this article after a lot of gains, the following let Xiaobian with everyone to understand.

VB after a long time of development, and now most people are using VB. NET, received a write analog system interface task, prepare to achieve him first simple, with VB, the traditional read-write is good, casually wrote an example, and then upgraded with vb.net. The original VB situation is as follows, 2 btn, one is to open the file, read the content to a txt1, a btn, do a simple shift encryption, read the encrypted content to txt2, put a commanddialog on the page

VB and VB. NET comparison code is as follows:

PrivateSubcmdopenfile_Click() cdlfile.ShowOpen Ifcdlfile.FileNamevbNullStringThen TxtSource.Text=vbNullString Opencdlfile.FileNameForInputAs#1 DoUntilEOF(1) LineInput#1,strline TxtSourceTxtSource.Text=TxtSource.Text+strline+vbCrLf Loop Close#1 EndIf EndSub PrivateSubcmdsavefile_Click() cdlfile.ShowSave Ifcdlfile.FileNamevbNullStringThen Opencdlfile.FileNameForOutputAs#1 Print#1,TxtTarget.Text Close#1 EndIf EndSub

Encryption is:

PrivateSubcmdcode_Click() strSouce=TxtSource.Text strTarget=vbNullString intLength=Len(Trim(strSouce)) Fori=1TointLength strtemp=Mid(strSouce,i,1) If(strtemp>="A"Andstrtemp="a"Andstrtemp

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report