HELP! Move an image depending on how big a number is

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts Page 1 of 1
Contributors
User avatar
noobcake
Member
Member
Posts: 34
Joined: Sun Mar 27, 2011 12:16 am

Hello, I am making something shit, but its for the sake of learning, its not of any use :)
But, It is something that works out how much 1 Gold coin is worth in copper coins, in a game.
I want it to look like this: Image
That looks good, but if you enter a number too big then it looks like this :

Image
I was wondering how to make it so the picture of the Copper moves to the right if the number is too close to it / overlapping. Because the copper picture is behind the number on the second one, how do i make the second look like the first one but with the bigger number
Appreciate any help thanks :)
~Noobcake
If i Help you +Rep cooll;

Im new to visual basic so I probly wont :P
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Hello noobcake,

did you tried to set the picturebox ---> look into options right panel and search for
Anchor
and set it to : Top , Right

hope it works.
goodluck

Dummy1912
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Changing the anchor won't help much unless the form is resized once the number length changes.
You can set the image's left location to be at the right of the label.
Code: Select all
        lblNumber.Text = "190,000"
        picCopper.Left = lblNumber.Right
User avatar
noobcake
Member
Member
Posts: 34
Joined: Sun Mar 27, 2011 12:16 am

mandai wrote:
Changing the anchor won't help much unless the form is resized once the number length changes.
You can set the image's left location to be at the right of the label.
Code: Select all
        lblNumber.Text = "190,000"
        picCopper.Left = lblNumber.Right
THANKS! that worked great, I would +rep you but I can't +rep you 2 times in a row :P ahwelll
lol
If i Help you +Rep cooll;

Im new to visual basic so I probly wont :P
User avatar
noobcake
Member
Member
Posts: 34
Joined: Sun Mar 27, 2011 12:16 am

~~~~~~~~~~~~~~~~~~~~~LOCKED~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thanks again guys :) Got what i needed
If i Help you +Rep cooll;

Im new to visual basic so I probly wont :P
5 posts Page 1 of 1
Return to “Coding Help & Support”