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

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

问题描述

家伙建议我怎么可以显示时间只是在[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

(btw,我的光标是' '293旁)

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

推荐答案

在控制台下有一个int CursorLeft和CursorTop。 CursorLeft是你的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天全站免登陆