[Solved] Another vb question
2014-02-13, 07:13 PM,
(This post was last modified: 2014-02-14, 07:18 PM by Jaysamuel.)
#1
Okay so I want to check if the user typed a praise into a textbox.
So if the textbox contains the text "getfiles.co" I want Label1's text to change to CPALead. Here is what I tried:
Code:
If TextBox1.Contains("getfiles.co") Then
Label1.text = "CPALead"
        End If
But here is the error im getting:
Error 1 Value of type 'String' cannot be converted to 'System.Windows.Forms.Control'. [Path to VB form 1] 4 30 [project name]

Any ideas?
Reply
2014-02-13, 07:23 PM,
#2
Shouldn't it be:
Code:
If TextBox1.text = "getfiles.co" Then
Label1.text = "CPALead"
End If

Please try this and tell me what you see :)
Reply
2014-02-14, 05:14 AM,
#3
(2014-02-13, 07:23 PM)TheVBScripter Wrote: Shouldn't it be:
Code:
If TextBox1.text = "getfiles.co" Then
Label1.text = "CPALead"
End If

Please try this and tell me what you see :)

No, I want the user to paste a link in Textbox1. (i.e. http://getfiles.co/dghkl)
So I want VB to see if "getfiles.co" is located in the textbox, does that make sense?
Reply
2014-02-14, 05:24 AM,
(This post was last modified: 2014-02-14, 05:32 AM by Supernova.)
#4
Visual Basic has InStr() function


Latest Thanks - View all

TheVBScripter(2014-02-14 02:16 PM) 
Reply
2014-02-14, 01:40 PM,
#5
Try this:

If TextBox1.Text <> "" Then
Label1.Text = "CPALead"
End If

[GET] CPAGrip for Desktop [Unofficial] (Click me)

[Image: addskype.png?u=cpa.kevin.&c=rand]

Feel free to PM me if you need help with developing your software.
Reply
2014-02-14, 07:18 PM,
#6
(2014-02-14, 05:24 AM)Supernova Wrote: Visual Basic has InStr() function



Thank you ^^
Reply
2014-02-15, 05:03 AM,
#7
(2014-02-14, 07:18 PM)jaysamuel Wrote:
(2014-02-14, 05:24 AM)Supernova Wrote: Visual Basic has InStr() function



Thank you ^^
No problem at all.
Always happy to help, you're free to message me on here if there is anything I can do to help in the future.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Aeonsofts VB.NET Theme Manager v2.1 lanzye 29 9,746 2017-06-20, 06:55 PM
Last Post: storix
  [HELP NEEDED] I have a question about what to do in my project! Fpsroca 0 553 2017-01-10, 09:05 AM
Last Post: Fpsroca
  [Hack/Security Question] Security and Proxies Raeynes 2 972 2016-12-30, 05:05 AM
Last Post: ArtoAllan
  Question about registering domain and host. Skratzy 6 1,325 2016-11-01, 07:06 PM
Last Post: mysteriosx
  VB NET FORM APPLICATION QwertySon 12 1,740 2016-04-27, 08:00 PM
Last Post: Harrington




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

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