r/visualbasic • VB Guru • May 26 '15

Homework /u/poody24 Asks a homework question...

I need to create a button that does this specifically, but I don't know the code to use. Add a button that will take the text that the user will enter into the txtName text box and place it into the label. The button will also make the text box and picture box disappear. Any Ideas??

5 Upvotes

3 comments sorted by

3

u/Bonejob VB Guru May 26 '15

/u/poody24 who has no post history and whose account was just created, would like us to answer the above question. I am assuming this is a throw away account to actually test my statement I made in the homework sticky. Since I don't see why I shouldn't answer this question...

The Problem: The Button will need to change the value of the property on a label so that it reads the same as a textbox named txtname and then make the textbox and for some unknown reason a picture box disappear.

To modify the value of a property you refer to it via its TEXT property. So on your button click event you will need to enter some code that modifies the TEXT of your label to that of the txtbox control. once this is done you will need to set the visible property of the txtbox and the picture box to false.

Just wondering which school this is that is assigning this to you. The mods and I have an interest in figuring out what level the different schools are achieving in their curriculums.

I hope this helps.

Bone

p.s. we are not stupid here, far from it, the mods have been around the block a few times. My guess is you want to get a reaction out of the community, possibly troll us into wasting our time. In reality you are just proving our point, that these types of questions posed like this, should just be ignored.

If you are serious about this post some code, rephrase the question and give us the actual code you have tried and maybe we will be more open to helping.

3

u/JakDrako May 26 '15

Summer vacations are coming. We should get a break from homework 'til September.

2

u/Bonejob VB Guru May 27 '15

Now that deserves an upvote! :)