I can I add QBASIC codes in VB?
Ex: To draw a line,
Cls
Screen 13
Line (0,0)-(151,160)
End
Printable View
I can I add QBASIC codes in VB?
Ex: To draw a line,
Cls
Screen 13
Line (0,0)-(151,160)
End
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
Actually, this would have worked too. (except for setting the screen resolution)
Code:Cls
Line (0, 0)-(151, 160)
End
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.
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
I don't think so.
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.