请向我解释此QBASIC代码,并告诉我如何在VB.NET中实现 [英] Please explain this QBASIC code to me and tell me how to implement in VB.NET

查看:115
本文介绍了请向我解释此QBASIC代码,并告诉我如何在VB.NET中实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个钢制的现金抽屉连接到我的COM端口.我需要在VB.NET中创建一个小程序以打开抽屉.抽屉的手册中有一些代码,我看不懂它的任何一行.该代码如下,它说该代码在QBASIC中:

打开"COM1:300,N,8,1"
对于AS#1的随机性
打印#1,"0000000000"

我需要通过VB.NET实现开放功能.请帮忙

出于好奇:什么是QBasic?从来没有听说过.

Hi, I have a steel frond cash drawer connected to my com port. I need to create a small program in VB.NET to open the drawer. The drawer''s manual has some code and I don''t understand a single line of it. The code is as follows, it says that the code is in QBASIC:

OPEN "COM1:300,N,8,1"
FOR RANDOM AS #1
PRINT #1, "0000000000"

I need to implement the open functionality via VB.NET. Please help

Out of curiosity: What is QBasic? Never heard of it.

推荐答案

首先在此处查看参考资料和示例http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx [
Start by looking at reference and examples here http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^].

You need to open a com port with 300baud, no parity, 8 data bits and 1 stop bit.

After that you can create a stream to write and read from the serial port.


这篇关于请向我解释此QBASIC代码,并告诉我如何在VB.NET中实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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