Hi everyone, i'm new in c#.
Is it possible to express the UI form as a 2D matrix? how can i do it? i have some object which must make moves from commands that user gives. For ex.: commands "d5; r4; u1;" mean: 5 steps down, 4 steps right and one step up. The initial location of the object is left-up corner. I'm very glad to any idea, thnx:))

Recommended Answers

All 2 Replies

Depends on what you want.
You could build it from scratch, so you have all the control.
You could also try to use a TableLayout or even a DataGridView control.

Another option would be to use a grid of controls, such as pictureboxes. Use a simple algorythm that calculates the correct size for each based on the number per row/column and the form size then use a loop to draw them to the form. I did something similar a few years back for a snakes and ladders game. Ensure you give each a name so you can access it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.