9 Replies - 523 Views - Last Post: 14 January 2013 - 11:00 AM Rate Topic: -----

#1 IsaacMessi10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 23-December 12

Visual Basic Help !

Posted 14 January 2013 - 01:59 AM

How can you make a program that when the status of something is changed it will do something else. I presume it's done with an IF condition. Thanks.

PS: I'm new to VB
Is This A Good Question/Topic? 0
  • +

Replies To: Visual Basic Help !

#2 kai_itz me  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 159
  • Joined: 03-August 12

Re: Visual Basic Help !

Posted 14 January 2013 - 02:45 AM

I NEVER USE VB 6.. BUT I THINK THERE MUST BE EVENT HANDLER FOR THIS PURPOSE...
Was This Post Helpful? 0
  • +
  • -

#3 IsaacMessi10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 23-December 12

Re: Visual Basic Help !

Posted 14 January 2013 - 03:03 AM

Usually I make use of Java but I thought it would be a great idea to learn VB
Was This Post Helpful? 0
  • +
  • -

#4 anandrosan1  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 23
  • Joined: 20-December 12

Re: Visual Basic Help !

Posted 14 January 2013 - 03:30 AM

What something? What status? Could you be more specific or post something that you are currently working with ! that would be easier to fix the problems !
Was This Post Helpful? 0
  • +
  • -

#5 maj3091  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 300
  • View blog
  • Posts: 1,771
  • Joined: 26-March 09

Re: Visual Basic Help !

Posted 14 January 2013 - 04:26 AM

View PostIsaacMessi10, on 14 January 2013 - 10:03 AM, said:

Usually I make use of Java but I thought it would be a great idea to learn VB


In that case, I would pick a newer version than VB6 (Check out the VB.Net forums).

In regards to your question, as already stated, you need to provide a little more detail for a more specific answer.
Was This Post Helpful? 0
  • +
  • -

#6 IsaacMessi10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 23-December 12

Re: Visual Basic Help !

Posted 14 January 2013 - 04:29 AM

I'm building a Web Browser. I want to make the URL / Address Bar and its button multi purpose like Chrome (Search / Go To).
Was This Post Helpful? 0
  • +
  • -

#7 maj3091  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 300
  • View blog
  • Posts: 1,771
  • Joined: 26-March 09

Re: Visual Basic Help !

Posted 14 January 2013 - 10:34 AM

In simple terms you could use an IF statement for this on the button click event.

You would check for the various states of the Address bar (Empty, Valid URL or string) and then perform the relavent action.

something like

If strAdressBar.Text = "" then
  'Empty address

ElseIf fblnValidURL(strAddressBar.Text) then 
  ' fblnValidURL would be a separate function to validate if it's a URL or not

Else
  ' Must be a string of some description, so attempt a search

End If


You would have to look at how to determine whether it's a valid URL, as that's not something I'm familiar with.

This post has been edited by maj3091: 14 January 2013 - 10:59 AM

Was This Post Helpful? 1
  • +
  • -

#8 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3360
  • View blog
  • Posts: 11,385
  • Joined: 12-December 12

Re: Visual Basic Help !

Posted 14 January 2013 - 10:48 AM

Just to mention that ElseIf is one word in VB.
Was This Post Helpful? 0
  • +
  • -

#9 maj3091  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 300
  • View blog
  • Posts: 1,771
  • Joined: 26-March 09

Re: Visual Basic Help !

Posted 14 January 2013 - 10:59 AM

View Postandrewsw, on 14 January 2013 - 05:48 PM, said:

Just to mention that ElseIf is one word in VB.

Thanks mate...typo on my part. Post edited.
Was This Post Helpful? 0
  • +
  • -

#10 IsaacMessi10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 23-December 12

Re: Visual Basic Help !

Posted 14 January 2013 - 11:00 AM

View Postmaj3091, on 14 January 2013 - 10:34 AM, said:

In simple terms you could use an IF statement for this on the button click event.

You would check for the various states of the Address bar (Empty, Valid URL or string) and then perform the relavent action.

something like

If strAdressBar.Text = "" then
  'Empty address

ElseIf fblnValidURL(strAddressBar.Text) then 
  ' fblnValidURL would be a separate function to validate if it's a URL or not

Else
  ' Must be a string of some description, so attempt a search

End If


You would have to look at how to determine whether it's a valid URL, as that's not something I'm familiar with.


exactly what I was looking for thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1