Jump to content

gotoxy(5,10)

- - - - -

  • Please log in to reply
5 replies to this topic

#1
irancplusplus

irancplusplus

    Learning Programmer

  • Members
  • PipPipPip
  • 65 posts
Hi
in a Console C# program, is there any method which can send the cursor to a point in console window? for example

System.foo.gotoxy(10,20);

System.Console.Write("hello);

will write hello in row 10, column 20?
I wrote this ebook! Will you translate it into English for free!?:confused: PM me!

#2
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
Will this help you? mousemove - Simulating mouse movement (C#) - Stack Overflow

~ Committed.
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#3
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
I think he meant the console user interface cursor, not the graphical user interface mouse cursor.

#4
irancplusplus

irancplusplus

    Learning Programmer

  • Members
  • PipPipPip
  • 65 posts
hi
thanks
using IDE Code Completion
I found this:
Console.SetCursorPosition(5,10);

It works.
I wrote this ebook! Will you translate it into English for free!?:confused: PM me!

#5
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
@CommittedCoder: But it is a good resource, I think; I didn't even know that C# programs can import Win32 API functions.

Now I wonder about memory management for some of them - for example, the WriteFile () function requires a pointer to a buffer, along with the size of the buffer; not sure about how C# handles strings and buffers.

#6
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts

Quote

I think he meant the console user interface cursor, not the graphical user interface mouse cursor.
Good catch.

Quote

Now I wonder about memory management for some of them - for example, the WriteFile () function requires a pointer to a buffer, along with the size of the buffer; not sure about how C# handles strings and buffers.


For the Win32 APIs? Not sure, I don't work with API very much, sorry. :/
~ Committed.
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users