Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1771

Re: VB 5 screen display

From Deanna Earley <dee.earley@icode.co.uk>
Newsgroups comp.lang.basic.visual.misc
Subject Re: VB 5 screen display
Date 2013-05-03 09:19 +0100
Organization Aioe.org NNTP Server
Message-ID <klvrve$950$1@speranza.aioe.org> (permalink)
References <48920a48-d284-4880-b062-8880c98e9458@googlegroups.com> <klsi7p$m94$1@dont-email.me> <1642207920389161157.524759jgroshan-pacbell.net@news.giganews.com> <klv085$2b8$1@dont-email.me> <1004232976389243119.528239jgroshan-pacbell.net@news.giganews.com>

Show all headers | View raw


On 03/05/2013 04:06, Justin Groshan wrote:
> Thank you for your answers to my question. It's obvious that I do not
> understand visual basis. I have attempted to find the answer to my question
> without success. I probably don't know what to look for. I did find
> debug.print in a book on VBA and I attempted it in vb5 with no success. I
> will try it again. For vb6 and later editions I was able to find
> write.console, however I have not tried it in vb5. I found a site in
> Microsoft to download free versions of Visual Basic. I have quick basic and
> I am operating it in virtual xp on my windows 7 64  bit computer. My
> concern is that ultimately I will have to load windows 8. I understand that
> dos programs will not run on windows 8. I have basic programs on my ipad. I
> would like to be able to use vba. Just before writing this post I found in
> a book that I just bought to learn vb5 the code to write z = x+y, define z
> as a string and display it in a text box. This was purely by accident, I
> looked under the section on code and found what I just described. There was
> no reference in the index.

You seem to have a very mismatched understanding of the languages and 
code and confusing everything.

A few basics (no pun intended):

* Basic is a relatively simple language and syntax used by multiple 
different languages.

* QBasic is a DOS interpreter (and sometimes compiler) for Basic.
It allows console output (CLI), and with effort, a text based UI.

* VBDos adds "flashy" TUI and event driven programming to DOS applications.

* Visual Basic (3, 4, 5, 6, or "classic") is a Windows GUI development 
tool. This involves windows, controls, text boxes, buttons and the 
mouse, and is still event driven.
While it's possible to create Win32 CLI applications, it's not supported 
natively.

* VBA is a version of the Visual Basic (classic) IDE and engine embedded 
into another application, primarily Office. It has no use outside this 
environment and can not create CLI applications (or standalone GUI 
applications).

* VB.Net is the latest incarnation of the "Basic" environment from 
Microsoft and has full support for Win32 CLI and GUI applications.

You seem to be trying to use VB5 to create a CLI application which isn't 
going to happen until you learn a lot more (fact, no offence meant, 
programming is hard).

As you're working in the world of Windows, it is FAR easier to create a 
full Win32 GUI application based on text boxes, buttons, labels, etc.
With VB5, this is SOO easy as that's what its entire design is geared 
around. Try this as a starter:

Create a new blank project in VB5, Open the default form, add two text 
boxes, a button and a label.
Double click the button and add this between the two lines it added:

     Dim Value1 As Single
     Dim Value2 As Single
     Dim Result as Single
     Value1 = Val(Text1.Text) 'Get the number in text box 1
     Value2 = Val(Text2.Text) 'Get the number in text box 2
     Result = Value1 * Value2 'Simple multiplication to get a result
     Label1.Caption = CStr$(Result) 'Put the result in the label

With the help of the many tutorials available online, I'm sure you can 
expand on this very basic (pun intended this time :p) multiplication 
calculator to do what you want.

Good luck, and just for clarity, if you're learning from scratch, ditch 
VB5 and all VB Classics. Go straight to VB.Net. There is no point 
learning a 16 year old language and IDE. If you're doing a college 
course, then tell the college to ditch VB5 :)

-- 
Deanna Earley (dee.earley@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the 
group.)

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

VB 5 screen display jgroshan@gmail.com - 2013-05-01 19:07 -0700
  Re: VB 5 screen display Michael Cole <invalid@microsoft.com> - 2013-05-02 12:18 +1000
    Re: VB 5 screen display Justin Groshan <jgroshan@pacbell.net> - 2013-05-02 00:34 -0500
      Re: VB 5 screen display Michael Cole <invalid@microsoft.com> - 2013-05-03 10:30 +1000
        Re: VB 5 screen display Justin Groshan <jgroshan@pacbell.net> - 2013-05-02 22:06 -0500
          Re: VB 5 screen display Justin Groshan <jgroshan@pacbell.net> - 2013-05-02 22:17 -0500
            Re: VB 5 screen display "DaveO" <djo@dial.pipex.com> - 2013-05-03 09:30 +0100
              Re: VB 5 screen display Justin Groshan <jgroshan@pacbell.net> - 2013-05-03 09:29 -0500
                Re: VB 5 screen display "DaveO" <djo@dial.pipex.com> - 2013-05-03 15:53 +0100
                Re: VB 5 screen display "Theo Tress" <rbk@online.de> - 2013-06-07 19:41 +0200
                Re: VB 5 screen display "DaveO" <djo@dial.pipex.com> - 2013-06-10 09:15 +0100
                Re: VB 5 screen display "Theo Tress" <rbk@online.de> - 2013-06-11 18:01 +0200
          Re: VB 5 screen display Deanna Earley <dee.earley@icode.co.uk> - 2013-05-03 09:19 +0100
            Re: VB 5 screen display Justin Groshan <jgroshan@pacbell.net> - 2013-05-03 09:29 -0500
  Re: VB 5 screen display Deanna Earley <dee.earley@icode.co.uk> - 2013-05-02 08:49 +0100
  Re: VB 5 screen display "MikeS" <misarY@gothere.ukX.com> - 2013-05-02 09:00 +0100
  Re: VB 5 screen display ralph <nt_consulting@yahoo.com> - 2013-05-02 05:11 -0500

csiph-web