Results 1 to 7 of 7

Thread: BASIC in VB?

  1. #1

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441

    Question

    I can I add QBASIC codes in VB?

    Ex: To draw a line,

    Cls
    Screen 13
    Line (0,0)-(151,160)
    End

  2. #2
    Guest
    You can't really draw a line anywhere on the screen with VB's intrinsic functions, but in the following example the form functions as the screen.
    Code:
    Me.Cls
    'Screen 13 cannot be implemented in windows
    Me.Line (0,0)-(151,160)
    End 'Either End or Unload Me

  3. #3
    Guest
    Actually, this would have worked too. (except for setting the screen resolution)
    Code:
    Cls
    Line (0, 0)-(151, 160)
    End

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    VB is object oriented, which is the huge difference between qbasic and VB, the language it self doesn't differ much, some methods implemented on the form is the same as in qbasic. What is new is you have to handle events, create you user interface with controls and forms, and a bit different in handling the variables too.
    And usually you don't use End (you shouldn't) to close your app, you should do it by unloading all forms, using unload statement.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Hyperactive Member mastermind94's Avatar
    Join Date
    Jun 2000
    Location
    Montréal, Canada
    Posts
    441

    Arrow

    I know that QBasic is different than VB (VB uses object codes). What I want to know is if the is a way to write generic basic codes in VB line

    Code:
    Screen 13
    palette 0,60
    print "This is VGA Graphique Low-Res"
    end

  6. #6
    Guest
    I don't think so.

  7. #7
    Guest
    You can use print "This is VGA Graphique Low-Res", and a lot of other like circle and pset, but palette and screen are just qbasic code.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width