Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
help with changing to visualbasic Posted by sandra33x on 1 Oct 2003 at 11:52 PM
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
Report
Re: help with changing to visualbasic Posted by KDivad Leahcim on 3 Oct 2003 at 5:10 PM
: 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.

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


I hope this helps some,
KDL
Report
Re: help with changing to visualbasic Posted by sandra33x on 3 Oct 2003 at 11:57 PM
: : thanx a span for themessage i made a typing error i wanted to type

if L$:="internet" then seach for f$
Report
Re: help with changing to visualbasic Posted by KDivad Leahcim on 4 Oct 2003 at 6:18 AM
: : : 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
Report
Re: help with changing to visualbasic Posted by the walrus on 10 Oct 2003 at 10:50 PM
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:
SaveSetting appname := "MyApp", section := "Startup", _
            key := "Top", setting := 75 


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


I'm not sure why the former is given as an example though..
Report
Re: help with changing to visualbasic Posted by KDivad Leahcim on 11 Oct 2003 at 10:49 PM
: 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:
:
: SaveSetting appname := "MyApp", section := "Startup", _
:             key := "Top", setting := 75 
: 

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

:
: 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):

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" 

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...



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.