打开.bin文件,然后将其值放在文本框中

编程入门 行业动态 更新时间:2024-10-26 08:27:45
本文介绍了打开.bin文件,然后将其值放在文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好。我从vb6迁移到vb。可以请某人解释如何执行此操作:打开.bin文件 - 然后将其值放在textbox或richtextbox或listbox上,重点是我需要能够通过UART发送该值 任何帮助表示感谢,谢谢 我的尝试:

Hello all good people. Im migrating from vb6 to vb. Can please someone explain how to do this action: Open .bin file - then put a value of it on textbox or richtextbox or listbox, the point is that i will need to be able to send that value through UART Any help appreciate it, Thanks What I have tried:

Private Sub open_Click() SaveFileDialog1.Filter = "bin files{*.bin)|*.bin" If SaveFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK _ Then My.Computer.FileSystem.WriteAllText _ (SaveFileDialog1.FileName, TextBox7.Text, True) End If End Sub

推荐答案

使用 BinaryReader类(System.IO) [ ^ ]来读取文件乐。然后,您需要执行任何必要的处理,以便将二进制数据转换为可读文本,然后将其放入文本框中。 Use a BinaryReader Class (System.IO)[^] to read the file. You will then need to do whatever processing is necessary to make the binary data into readable text which you then put in the textbox.

更多推荐

打开.bin文件,然后将其值放在文本框中

本文发布于:2023-11-09 16:01:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572806.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:放在   将其   框中   文本   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!