If you click the button1 label1 = mytext and green text
2013-09-17, 01:05 AM,
#1
can it be done!!? help me pls it is really very very simple.
Reply
2013-09-17, 01:48 AM,
#2
(2013-09-17, 01:05 AM)TheLastCard Wrote: can it be done!!? help me pls it is really very very simple.

im assuming your talking about VB right if so can you please clarify a little better on what you want and I will help you
Reply
2013-09-17, 02:05 AM,
#3
(2013-09-17, 01:48 AM)RivalOfGod Wrote:
(2013-09-17, 01:05 AM)TheLastCard Wrote: can it be done!!? help me pls it is really very very simple.

im assuming your talking about VB right if so can you please clarify a little better on what you want and I will help you

im is works like this:
1. you click on button1
2. after you click on button1 label1 show my text[i will write the text].
* and the text will be green[color green]
Reply
2013-09-17, 02:14 AM,
#4
(2013-09-17, 02:05 AM)TheLastCard Wrote:
(2013-09-17, 01:48 AM)RivalOfGod Wrote:
(2013-09-17, 01:05 AM)TheLastCard Wrote: can it be done!!? help me pls it is really very very simple.

im assuming your talking about VB right if so can you please clarify a little better on what you want and I will help you

im is works like this:
1. you click on button1
2. after you click on button1 label1 show my text[i will write the text].
* and the text will be green[color green]

I think this is what you mean

Code:
If Button1.Enabled = True Then
            Label1.ForeColor = Color.Green
            Label1.Text = "Hello"

        End If

thats all the code for that really
Reply
2013-09-17, 04:40 AM,
(This post was last modified: 2013-09-17, 04:41 AM by rinor4ever.)
#5
You don't need to put on form load or to put if statement
Just on button click add the code that RivalOfGod mentioned:
Code:
Label1.Text = "Put you text here"
Label1.ForeColor = Color.Green
Reply
2013-09-17, 04:50 AM,
(This post was last modified: 2013-09-17, 04:54 AM by LinX.)
#6
If you want the label to become green when it changes text to the text you want then I would do this:

Code:
If
Label1.Text = "Your text that the button changes to and want to become green here"
Label1.Forecolor = Color.Lime -- Lime looks better than green, if you want the "Hi-Tech Activated" color.

Else
Label1.Text = "Put some text here that you want the label to be if the user for an example inputs wrong password etc"
Label1.Forecolor = Color.Red -- Changes the color to red if wrong password is input.

If you want to have a text to appear when you click a button then I would do this:
Code:
Label1.Enabled = True
Label1.Forecolor = Color.Lime
Label1.Text = "Your Text Here - LinX"
If you do the above make sure you put your label to not enabled, so when the button is clicked it becomes visible with the properties you want.

Regards
LinX

PM ME TO JOIN OUR TRADING GROUP FOR FREE!
[Image: CyjquRg.png]
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [GET] How To Generate Web Design Assets In Photoshop With Just One Click cindy2145 0 422 2017-04-30, 03:06 AM
Last Post: cindy2145
  60 Premium 3D Text Effect Styles M!st3r XX 18 2,304 2015-11-13, 08:56 PM
Last Post: dontbejello87
  How can i add status text under progress-bar in visual basic 2010 Helix 12 2,508 2014-04-15, 04:31 PM
Last Post: LeoMessi19
  [question] VB help with text box Nem 2 283 2014-04-11, 10:45 PM
Last Post: Nem
  [SOURCE] on-the-live Lowercase to Uppercase & Vice Versa Text Converter (Multiline) Peakfire 0 381 2014-02-24, 08:50 PM
Last Post: Peakfire




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top