0

I am creating a virtual on screen keyboard similar to the windows on screen keyboard. I dont know how to make buttons that change its size with window size as it takes in place in windows on screen keyboard (osk.exe).

I also wanted to know if there is a way possible that could enlarge the buttons nearby the mouse cursor and recede & diminish the size of the buttons away from the mouse.

And how to attach dictionary with it as in windows on-screen keyboard, like it shows the possible words we could type.

And how to create those buttons dynamically on the form?

1 Answer 1

0

To make the buttons automatically resize you will need to use some sort of container to hold all the buttons. I would recommend either the TableLayoutPanel or the FlowLayoutPanel.

You would first but the container on your form then dock it wherever you want it (e.g. at the bottom of the form). In the case of using the TableLayoutPanel you would create a separate table cell for each button then dock each button in the cell. That way if you have both the container and the buttons docked correctly they will automatically resize with the window.

Another thing that I would point out is that you can nest containers within each other multiple times to give you more flexibility in your layout.

You can read more about containers here:

http://msdn.microsoft.com/en-us/library/ms171689.aspx

http://msdn.microsoft.com/en-us/library/ms171691.aspx

http://www.vb-helper.com/howto_net_use_tablelayoutpanel.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.