![]() |
|
[.NET] VB Gui, changing the gui design without changing the window? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] VB Gui, changing the gui design without changing the window? (/showthread.php?tid=4724501) |
VB Gui, changing the gui design without changing the window? - Chesso - Mar 10, 2015 Is this possible? For example say I had a gui on a page I want to be able to change the image (for example change from tutorial to play) This is just an example and doesn't relate but I don't want to have to have the use change the window they're using to use the program I'm writing, What can I do?[/align] * - Hiiro - Mar 10, 2015 Do you mean altering the GUI programmatically instead of the drag and drop designer? I am lost. * - Minimal. - Mar 10, 2015 (Mar 10, 2015 11:01 AM)Chesso Wrote: For example say I had a gui on a page I want to be able to change the image (for example change from tutorial to play) Uhm, something like this? The code below will change the image in a picture-box to the file you pointed the path at. Code YourPictureBox.Image = Image.FromFile("C:\play.png")* - Chesso - Mar 10, 2015 (Mar 10, 2015 11:49 AM)Felix. Wrote: Uhm, something like this? I'm not sure how to explain this, I've not got any code to show to aid in explanation. But for example I create a gui called #main and I want to change to another gui so I could change the position of a button without having to open a new window. * - Minimal. - Mar 10, 2015 (Mar 10, 2015 01:06 PM)Chesso Wrote: I'm not sure how to explain this, I've not got any code to show to aid in explanation. In terms of GUI, do you mean a form? * - Odus - Mar 10, 2015 (Mar 10, 2015 01:06 PM)Chesso Wrote: But for example I create a gui called #main and I want to change to another gui so I could change the position of a button without having to open a new window. Be as thorough as possible in future. That way, you'll get your answer far quicker. To move a control programmatically: Code Button1.Location = New Point(10, 10) 'Move 10px each way from the top left XY axis* - ·Evolved· - Mar 11, 2015 You could do that, or you could do tabs. I don't know which would be better suited to your purpose. * - ElementalTree - Mar 11, 2015 I'd recommend using a tabcontrol, you could also use panels to bring fourth the one you want to use and then hide the other one/s? |