Hello All,
I am trying to create an app. that will allow the end-user to create and manipulate controls at run time. I am going to attempt to describe my objective below.
I want to create like an asset management program that attaches to a database. Maybe on the left side of my form I want to have some buttons(let's say..a button with a picture of a computer on it) and on the right side of the form I want to have a picture box that might contain a floorplan image.
I would like to be able to click the button on the left and have it
1. create a new button w/a picture of a computer on it, that can be moved around
2. be able to drag and drop the new button to a position on the floor plan image
3. I want the NEW buttons to open a form, when clicked, that list information that has been saved to a database, about the button(computer/asset) .
So far I have looked up information on creating new controls at runtime using arrays, and draging and dropping controls. The drag and drop code that I have found almost works like I want it to, and i am also able to create new controls with the code that i have, but my main questions are what do i need to do to save the new controls that have been created at run time, so that they appear in the app., at the location they were droped? And how do i go about creating onclick code that only applies to the newly created buttons, not the original button?
If I haven't given enough information or what I am trying to do is not clear, i appoligize and will be happy to provide you with more info. If anyone can answer any of my questions, I would appreciate it. If you have any tips or advice about anything that I am trying to accomplish, that would be helpful and appreciated also. Thanks for your time.
Nick
I am trying to create an app. that will allow the end-user to create and manipulate controls at run time. I am going to attempt to describe my objective below.
I want to create like an asset management program that attaches to a database. Maybe on the left side of my form I want to have some buttons(let's say..a button with a picture of a computer on it) and on the right side of the form I want to have a picture box that might contain a floorplan image.
I would like to be able to click the button on the left and have it
1. create a new button w/a picture of a computer on it, that can be moved around
2. be able to drag and drop the new button to a position on the floor plan image
3. I want the NEW buttons to open a form, when clicked, that list information that has been saved to a database, about the button(computer/asset) .
So far I have looked up information on creating new controls at runtime using arrays, and draging and dropping controls. The drag and drop code that I have found almost works like I want it to, and i am also able to create new controls with the code that i have, but my main questions are what do i need to do to save the new controls that have been created at run time, so that they appear in the app., at the location they were droped? And how do i go about creating onclick code that only applies to the newly created buttons, not the original button?
If I haven't given enough information or what I am trying to do is not clear, i appoligize and will be happy to provide you with more info. If anyone can answer any of my questions, I would appreciate it. If you have any tips or advice about anything that I am trying to accomplish, that would be helpful and appreciated also. Thanks for your time.
Nick