如何在visual basic中打开任何类型文件并将其转换为二进制文件并在屏幕上显示该二进制文件。 [英] How do I open any type file in visual basic and convert it to binary and display that binary on screen.

查看:180
本文介绍了如何在visual basic中打开任何类型文件并将其转换为二进制文件并在屏幕上显示该二进制文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要打开任何类型文件并将其转换为二进制文件,然后将该二进制文件显示为文本框或列表框。我知道导入IO和openDialogBox,我看到有人使用文本框输入文本然后显示其二进制文件。我怎么做到这一点。



我尝试了什么:



我已经使用打开的对话框打开.bin文件类型并将其显示在文本框中但是它已被编码。

I need to open any type file and convert it to binary then display that binary to either a text-box or listbox. I know about the imports IO and the openDialogBox and I've seen seen someone use a text-box to enter text and then display its binary. How would I accomplish this.

What I have tried:

I have used the open dialog box to open a .bin file type already and displayed it in a text box but it was encoded.

推荐答案

你的问题显示了大量的naivety。



所有文件都已经是二进制了。所以你必须解释你的意思。您是否希望以十六进制编辑器格式显示内容,该偏移处的偏移量和字节值以及该字节的文本表示形式?



.BIN文件只是数据,很可能永远不会发送文本,所以显示文本框中的内容只显示随机垃圾。
Your question shows a ton of naivety.

All files are already "binary". So you're going to have to explain what you mean by this. Are you looking to show the content in a hex-editor format, with the offset and byte value at that offset along with a text representation of that byte?

.BIN files are just data, more than likely never text, so showing that content in textbox is going to show nothing but what appears to be random garbage.


这篇关于如何在visual basic中打开任何类型文件并将其转换为二进制文件并在屏幕上显示该二进制文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆