devxlogo

Putting Buttons on PictureBox

Putting Buttons on PictureBox

Question:
My question is that I’m trying to put a command buttons in a picture box on MDI form (it’s a text editor). But it always keeps on givin’ me this error “Controls without the aligned property cannot be be placed directly on MDI form”. Could you please help me with this one. I have been askin’ this question from a lot of my friends and professors but haven’t yet really got the answer.

Answer:
It sounds like you’re double-clicking to create the command button. This won’t work. As long as you have focus on your picture control you can single click the command button in your toolbox and then draw it on the picture box by clicking and holding the left mouse button and then just dragging it out to the required size.VB4.0 adds a ToolBar and StatusBar control to your “arsenal” which makes the creation of these things a lot simpler (I’m assuming here that this is what you’re doing with the command buttons and the picture box).

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist