文/光标定位在控制台 [英] Text/Cursor Positioning in Console

查看:118
本文介绍了文/光标定位在控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任你人建议我怎么能显示时间只是在[X]退出的顶部?我目前使用Console.Write()和ch.gotoxy()这我的光标设置成不同的地方

Any of you guys suggest how could i display the time just on top of the [x] Exit ? I'm currently using Console.Write() and ch.gotoxy() which sets my cursor into different places

(顺便说一句,我的光标是'O 旁边293)

(btw, my cursor is 'Ö' beside 293)

推荐答案

有是一个int下的控制台称为左方向键和CursorTop。左方向键是你的X坐标和CursorTop是你Y.只是用它来设置您的位置

There is an int under Console called CursorLeft and CursorTop. CursorLeft is your X coordinates and CursorTop is your Y. Just use that to set your position

这篇关于文/光标定位在控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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