help with changing to visualbasic

pliz change this to basic[visual] from structuered basic
10 input"filename"f$
20input"location cdrive or internet"l$
30if l$:=internet then sub600
-
-
-
-
-
-
600seachfor f$
610disable password

Comments

  • : pliz change this to basic[visual] from structuered basic
    : 10 input"filename"f$
    : 20input"location cdrive or internet"l$
    : 30if l$:=internet then sub600
    : -
    : -
    : -
    : -
    : -
    : -
    : 600seachfor f$
    : 610disable password
    :

    I'm afraid that won't change very well. Also, I don't know which of those might be built in commands or which might be a subroutine. Finally, I don't have a clue what l$:=internet means. I'm guessing it means l$ = "internet", so that's what I'm using here.

    [code]Dim F As String, L As String
    F = InputBox("filename")
    L = InputBox("location cdrive or internet")
    If L = "internet" Then
    searchfor F
    disable password
    End If
    [/code]

    I hope this helps some,
    KDL
  • : : thanx a span for themessage i made a typing error i wanted to type

    if L$:="internet" then seach for f$
  • : : : thanx a span for themessage i made a typing error i wanted to type
    :
    : if L$:="internet" then seach for f$
    :

    I believe I would have posted the same code anyway. You may be better off re-posting this message on the Visual Basic board. Some of us may understand that version of basic better that I do and be able to give a better conversion.

    http://www.programmersheaven.com/c/MsgBoard/wwwboard.asp?Board=14

    Good luck!
    KDL
  • I've seen ":=" in VB before and not known what to do with it. It seems like you could just leave it out and it would work fine to me, but I never really looked into it to see what it did.

    For example, in the MSDN Help file for VB6, the example given for SaveSetting is:
    [code]
    SaveSetting appname := "MyApp", section := "Startup", _
    key := "Top", setting := 75
    [/code]

    when it seems to me that the below would work just as well..
    [code]
    SaveSetting "MyApp", "Startup", "Top", 75
    [/code]

    I'm not sure why the former is given as an example though..
  • : I've seen ":=" in VB before and not known what to do with it. It seems like you could just leave it out and it would work fine to me, but I never really looked into it to see what it did.
    :
    : For example, in the MSDN Help file for VB6, the example given for SaveSetting is:
    : [code]
    : SaveSetting appname := "MyApp", section := "Startup", _
    : key := "Top", setting := 75
    : [/code]
    :
    : when it seems to me that the below would work just as well..
    : [code]
    : SaveSetting "MyApp", "Startup", "Top", 75
    : [/code]
    :
    : I'm not sure why the former is given as an example though..
    :

    AHHHHHHH!!!!!! I had forgotten all about that. That is called named parameters and only seems to be supported by certain functions that VB knew about beforehand (like Windows' messages that VB knows to create events for).

    All of the following will work (assuming I didn't mess them up):

    [code]
    SaveSetting section := "Startup", appname := "MyApp", _
    key := "Top", setting := 75
    SaveSetting appname := "MyApp", setting := 75, _
    section := "Startup", key := "Top"
    SaveSetting appname := "MyApp", key := "Top", _
    setting := 75, section := "Startup"
    [/code]
    Why anyone would want to use the idea, I have no idea. But it basicly lets you put the parameters in any order you like by naming which one is which.

    Unfortunately, that's unrelated to the syntax in the current question...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories