Click here to Skip to main content
15,885,546 members
Everything / Programming Languages / Basic

Basic

Basic

Great Reads

by Chris Boss
More about BASIC and what can be accomplished with the language
by Howard 9448490
Creating a reusable editor for C# Applications using the RichTextBox Control
by Chris Boss
BASIC: A powerful language often underestimated and undervalued
by Chris Boss
BASIC is one of the most misunderstood programming languages! Mention BASIC to a current software developer and one quickly finds out that it is not viewed favorably by most programmers.

Latest Articles

by Chris Boss
BASIC: A powerful language often underestimated and undervalued
by Wessel Beulink
Microsoft Azure enhances security with private subnets, fostering efficient network management.
by Jani Giannoudis
Structured approach to ASP.NET Localization
by vblover Programmer
Adding ContextMenu's MenuItem to the SystemMenu of Form in Windows Forms Application

All Articles

Sort by Score

Basic 

15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
14 Feb 2022 by Howard 9448490
Creating a reusable editor for C# Applications using the RichTextBox Control
28 Feb 2024 by Chris Boss
BASIC: A powerful language often underestimated and undervalued
4 Sep 2017 by Chris Boss
BASIC is one of the most misunderstood programming languages! Mention BASIC to a current software developer and one quickly finds out that it is not viewed favorably by most programmers.
28 Jun 2016 by David A. Gray
A reference chart that doubles as the engine behind a data structure mapper
4 Oct 2015 by Member 12032084
.dll for making the FTP management with VB.NET easier
28 Aug 2016 by George Sefcik
This article will show an easy way to add the ability to print, or save as an image, each screen (Window) or FrameworkElement (UserControl) in your application.
15 Aug 2016 by Richard Deeming
If you're replacing the entire contents of the textbox, try the simple approach:txtclients.Text = string.Join("\n", storedata);
24 Dec 2016 by OriginalGriff
1. Who creates a database? How is it created? Where is it created? And, what does it look like?Developers, mostly - often in their guise as "data administrators". Basically, we do it - because while it's actually pretty simple to "create a database" getting it right is a lot harder. How do...
6 Apr 2018 by CHill60
VB 6.0 is not sold any more - it hasn't been supported for decades. I haven't tried but I doubt very much you will get it to work under Windows 10. It was difficult enough in Windows 7 (that is a period of my life that I prefer not to talk about) Make the move to VB.net - it's free for many of...
26 Jan 2024 by Dave Kreskowiak
Quote: Compresses any size file down to around 2600 Bytes. That statement alone means you don't understand what you're doing, and you have MASSIVE collision problems with your algorithm, NO MATTER HOW IT IS WRITTEN OR WHAT IT IS DOING. You just...
18 Apr 2013 by Mike Meinz
testDataLabel.Text = testDataLabel.Text & typeListBox.Items(typeIndex).ToString & " " & guests.ToString & " " & totalCharge.ToString("C0") & vbNewLine
2 Aug 2013 by OriginalGriff
Set the tab order so that a different control that can accept the user input focus has a lower number: the OK button, for example."It works but only with buttons and textbox,RTF boxes ones ! i dont need it but is there any way to work it with picture box or labels something... Just curious...
3 Aug 2013 by Sergey Alexandrovich Kryukov
"Focus" always means "keyboard focus". You can have focus on something else, some other control which allows user input. Not having keyboard focus when a form gets activated makes no sense at all.Besides, it's the best to set focus to some control of your choice only once, when the form is...
13 Aug 2014 by Richard MacCutchan
There is no simple way by programming to rename a registry key. You would have to create a new key, copy the subkeys and values from the old one to the new one, and delete the old key and its content. This seems like quite an advanced test for a school project, especially given your comments...
16 Feb 2015 by Richard MacCutchan
At a brief glanceico == Icon.FromHandle(bmp.GetHicon); // error should not be "=="// should be ico = Icon.FromHandle(bmp.GetHicon);However, your title mentions Visual Basic so there may be other issues. Please edit your question and explain exactly what error you see.
18 Jun 2015 by Sergey Alexandrovich Kryukov
You cannot "contain a FillRectangle"; this is not a stationary object. You can render rectangle using System.Drawing.Graphics.FillRectangle, but it happens in response to Paint event.First, scrolling. For scrolling, you can have your control where you render graphics inside some scrollable...
29 Jul 2015 by Wendelius
You have an extra comma in the end of the column list in the statement. Instead of str = "insert into ListOfVessels ([VesselCompanyName], [VesselBuild], [VesselType], [VesselGross], [VesselDW], [VesselFlag], [VesselImoNo], ) values (?, ?, ?, ?, ?, ?, ?)"try str = "insert into ListOfVessels...
28 Sep 2015 by Sergey Alexandrovich Kryukov
Please see my comment on Free Pascal. From your comments, I suspect this is what you may like. There is a huge culture (anti-curly-braces culture, by the way) behind it: Algol, then Wirth's Pascal, Modula, Ada (most important step), Borland's Turbo Pascal, Object Pascal, Delphi (major .NET...
15 Dec 2015 by OriginalGriff
You're getting close, but you need a loop to go through each of the characters in turn: at the moment you only look at the first one (and that by luck, since you don't ever assign a value to mycount).I'd also use a Select Case instead of long If condition:Dim vowels As Integer = 0For Each...
15 Feb 2016 by hypermellow
Hi,The reason you are receiving an exception is because the email address format is NOT valid.Have a look at:Email address - Wikipedia, the free encyclopedia[^]Local part:Character . (dot, period, full stop), ASCII 46, provided that it is not the first or last character, and...
24 Mar 2016 by Patrice T
Qbasic is seriously outdated, I recommend to update to more recent language.The only way is by reading documentation, trying examples, and finding tutorials (if possible), you are more likely to find examples programs, but you will have to analyze them yourself to understand.
24 Sep 2016 by OriginalGriff
Look at your IF:IF num1 > num2 AND num3 THENThat doesn't do what you think it does!You think it means "if number one is the greatest of the three numbers" - it doesn't. The AND breaks it into two separate conditions and insists that both must be true: So "if number one is greater than number...
8 Aug 2020 by Richard MacCutchan
Sandeep's answer is partially correct, but I think you want the possibility of any combination of the options, so something like: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim someString As String ...
20 Jul 2021 by OriginalGriff
To define a class in Python, you use the keyword class: Python Classes[^] So all you need to do to find the class name in there is find the keyword and look to it's right. And .. it isn't in there. So ... no classes are created in that code,...
13 Dec 2022 by vblover Programmer
Adding ContextMenu's MenuItem to the SystemMenu of Form in Windows Forms Application
11 Feb 2024 by Ralf Meier
When seeing your Solution I want to suggest you some little modifications : Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click Cursor.Position = GetCenterOfControl(Button6) End Sub ...
24 Oct 2012 by _Vitor Garcia_
Check this outQuickSort Revisited, Optimised, and Stabilised[^]
24 Feb 2013 by Prakash Thirumoorthy
use session objects,value assigningsession["SessionName1"]="test";getting values from sessionvar a = session["SessionName1"];Regards,Prakash.T
28 May 2013 by Maciej Los
Have a look at similar question and answers: Take One List Box Item At A Time Then Perform Code[^]
29 May 2013 by CHill60
There is quite a lot wrong with your code ...1. You have started a timer and stopped it but you are not actually using it. Here is a link to a timer tutorial[^]2. As a result of that your For loop runs very quickly straight through to the point where it sets Label3 text to "OK".3....
2 Aug 2013 by Pheonyx
Hi there,I believe the solution to your problem can be found here:How to extract the strings between two characters[^]It uses a regular expression to find the string and extract it.
2 Aug 2013 by Thomas Daniels
Hi,Try this:label1.Text = System.Text.RegularExpressions.Regex.Match(textBox1.Text, "(?
7 Mar 2014 by OriginalGriff
All you need to do is look at the entries in the file.Assuming you are using SharpZipLib:public static bool IsPasswordProtected(string path) { using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read)) { using (ZipInputStream zip = new...
27 May 2014 by Richard MacCutchan
References:recordset ' is a reference to a set of records, and must be initialised at the beginning of the program..field ' is a reference to a particular property of the recordset("DATE") ' is a field qualifier which creates a reference to the "DATE" column in the recordset field...
18 Jun 2014 by _Asif_
Add one bracket in both these linesif ((((strcmp(taxstatus, "S")==0))||((strcmp(taxstatus, "s")==0)))){if ((((strcmp(taxstatus, "M")==0))||((strcmp(taxstatus, "m")==0)))){
18 Jun 2014 by KarstenK
it is a bracket too much opened, but write cleaner code:if ((((strcmp(taxstatus, "H")==0))||((strcmp(taxstatus, "h")==0))) && (grosspay>500)){//is is enough bur use spaceif ( ( (strcmp(taxstatus, "H")==0) || ((strcmp(taxstatus, "h")==0) && (grosspay>500) ) {instead of...
28 Sep 2014 by Richard MacCutchan
You can read http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseposition(v=vs.110).aspx[^] for getting the mouse position, and http://msdn.microsoft.com/en-us/library/system.drawing.graphics.drawline(v=vs.110).aspx[^] for drawing lines. If you are starting out in...
29 Oct 2014 by Peter Leow
Read this to understand the root cause: SQL FOREIGN KEY Constraint[^]
2 Apr 2015 by OriginalGriff
If you go to the home page: http://www.codeproject.com/[^]You will see a link on the right hand side: http://www.codeproject.com/Learn/Android/[^] - start there.
2 Apr 2015 by Suvendu Shekhar Giri
I believe, the source to learn android programming is Getting Started With Android Development[^]This is official documentation/help site for android developers.Another useful website is -Android Programming Tutorial[^]Even I've written few android tutorials, have a look if those...
18 Aug 2015 by CHill60
If you debug your code you will find that Obj1 contains all of the values in your range, not just a single cell.I also prefer to use the StringBuilder class rather than concatenating strings (you will need Imports System.Text)So potentially the easiest way to iterate through all of the...
3 Sep 2015 by OriginalGriff
Don't. It's possible but it rarely ends well.The problem is that while it's easy to grow and shrink the controls themselves (in the .NET version of VB that can be automatic using the Dock and Align properties) that doesn't change any font size, because that is set by the system to be...
6 Nov 2015 by Maciej Los
Above code refers to Microsoft Office Excel BeforeSave event, but you mentioned that you use OpenOffice Calc!See:Using a Global Library to Automate OOo Calc[^]Document Events[^]Creating a simple macro[^]Google book: Using Spreadsheets in OpenOffice.org 3.3[^]
26 Nov 2015 by Garth J Lancaster
I think you need to 1) explain what you mean by JSON format and or check the definition.2) explain what you'll be doing with the JSON data that 'represents' a file you could, for example, do something like this :-"MyFileStringArray" : ["File Line 1", "File Line 2"]but that...
26 Nov 2015 by Sergey Alexandrovich Kryukov
The question, as formulated, makes little sense. JSON format is nothing but just format; this is the form of syntax for a JavaScript object of type 'object'. Okay, if, for example, you have some text in, say, JavaScript variable, allText, the JSON string may look as{"text": allText; }When...
15 Feb 2016 by Richard Deeming
This bug seems to have been fixed somewhere between versions 4.0 and 4.6 of the framework. The following code fails in .NET 3.5, but works as expected in 4.6 on my machine:var address = new MailAddress("name.@outlook.com");If you need to support this type of address, it seems your only...
1 Mar 2016 by Matt T Heffron
This is clearly homework since "need to use if statement".Clearly you need to get more familiar with C# syntax; specifically the assignment and comparison operators.public bool IsEnrolled(){ if (CurrentEnrolledCourse == null) { return false; } else { ...
23 Mar 2016 by Richard Deeming
Use the shell folder constant {commonstartup}, as documented here[^].
24 Mar 2016 by CPallini
Google[^] is your friend.
10 Apr 2016 by Patrice T
Quote:i need helpho can i add two numbers using function in visual basicWhat you need is to learn the language and this, we can't do it for you.I recommend to read VB documentation and follow tutorials. You will find the answer to your question pretty soon.The question tells us that...
7 Sep 2016 by Garth J Lancaster
you're doing a lot of console.readline(s) there ... are you sure you need that many ? how about something like (using one variable to hold the answer, instead of one for yes and no)Dim answer As StringConsole.WriteLine("Hello, Would you like to know why programming is valuable? Yes or...
26 Sep 2016 by Garth J Lancaster
I would have started on a piece of paper, since you only have 3 variables, LINES, X, YI'm going to use a notation a
11 Oct 2016 by CPallini
Following Richard's suggestion:Quote:You are looking for the string "time" in the array of integers, so that will never work. You need to create a variable named time that will be allocated some integer value indicating what the hour is.trystore_open = Nonestore_hours = [9, 10, 11, 12,...
8 Jan 2017 by Dave Kreskowiak
The last version of Visual Studio that was supported on Vista (requires SP2) was 2010.I'd SERIOUSLY look at upgrading the O/S to at least Windows 7 so you can use the latest version of Visual Studio.You can get VS2010 Express from here[^].Today's free version of Visual Studio is 2015...
8 Jan 2017 by Peter Leow
You will need a development pc and an IDE for development and testing, you can get a community edition of the latest visual studio at Downloads | Visual Studio Official Site[^] Before that, get yourself a newer pc and os that meet these Visual Studio 2017 System Requirements[^] Once the...
9 Jan 2017 by OriginalGriff
It depends. If the member has it enabled - and not all do - then if you look at any forum message (not Quick Answers) then there will be an "Email" option at the bottom, next to "Reply". This send a private message to them, adding with your email for a reply. Be aware that many people may...
3 Apr 2017 by Dave Kreskowiak
You don't "code the check boxes". You write code to get the state of the checkboxes and go through whatever algorithm you're talking about to generate the value you're looking for. Since you make no mention of what this algorithm is supposed to do to generate the end result, it's impossible to...
26 Apr 2017 by Richard MacCutchan
Your signUp class does not have an explicit base class so it is based on the Object Class (System)[^] which does not have a load method.
22 Sep 2017 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action. Try it yourself, you may find it is...
19 Jan 2018 by Karthik_Mahalingam
W3Schools JS [^] is the best and easy way to start for beginners You shall practice using   Try it Yourself »   button under each topic, but it will not have any intellisense support, for smooth typing experience you shall download any code editor like Visual Studio Code - Code Editing....
19 Jan 2018 by Patrice T
This site will help you ti learn languages and techniques related to web development. W3Schools Online Web Tutorials[^]
5 Feb 2019 by CPallini
You code doesn't try to find prime numbers: it lacks a primality test and the like. Try import math def is_prime(primes_list, n): # primality test limit = math.ceil(math.sqrt(n)) i = 0 while primes_list[i]
28 Feb 2019 by MadMyche
I would review the MS Documentation on Basic Authentication and look at the section for configuration of login domains Basic Authentication | Microsoft Docs[^]
31 Mar 2019 by CHill60
You are not supposed to "find" the code, you are supposed to write it. We will not write code for you - there are other websites where you can pay programmers to do that. This is either your job or your homework. Either way it is your responsibility to write the code (and test it, and submit...
29 Oct 2019 by OriginalGriff
Start with the last element, and reduce your index instead of increasing it. If you use the Array.Length property, and subtract one you have the index of the final element: in your case that would be 10 - 1 = 9 I'd use a For loop instead of While though.
27 Apr 2020 by CHill60
If you know enough about this to give us a hint then you know enough to answer your own question. But, what you have actually done is post your homework or course exercise. We do not do your homework, although we will help if we can if you get...
28 Apr 2020 by Richard MacCutchan
The constructor for Student contains one more parameter than the constructor for Person. You need to add a call to the parent constructor with the following code: Student(String firstName, String lastName, int id, int[] testScores) { ...
7 May 2021 by Richard MacCutchan
Wrong place. This website is for technical questions, and you have been a member long enough to know that. Try your local library.
15 Jun 2021 by Wendelius
If I understand the situation correctly, I think it would be easier to work with XmlDocument rather than using a XmlWriter to write the content. With XmlDocument you can create/modify/delete the content and when needed you can save or load the...
15 Jun 2021 by Maciej Los
I'd suggest to use XmlSerialization[^]. See: A Complete Sample of Custom Class Collection Serialization and Deserialization[^]
19 Jun 2021 by Patrice T
Quote: ArrayTag contains more than three items, whatever number i decide to arragtag, same problem. Maybe is all about the module Stop guessing, and make sure with the debugger. Your code do not behave the way you expect, or you don't...
24 Jun 2021 by Maciej Los
WebBrowser class[^] has several disadvantages. See: c# - Webbrowser Control Limitations - Stack Overflow[^] - answer provided by Erx_VB.NExT.Coder. So, if you would like to be able load sites with javascript, you have to change with another control.
25 Aug 2021 by Dave Kreskowiak
Keywords - Visual Basic | Microsoft Docs[^] FORTRAN 77 doesn't have any reserved words, but that doesn't mean using any keywords is a good idea.
16 Aug 2023 by Graeme_Grant
Here is a library that will do what you need: NuGet Gallery | WinForms.DataVisualization 1.8.0[^] You can download the source code and run the sample app. It has both C# and VB sample code with over 100 samples for you: GitHub -...
26 Jan 2024 by OriginalGriff
There is a good technical reason why it doesn't work, and it's the same reason that you can't "decrypt" a SHA or MD5 hash: Decrypting MD5 and SHA: Why You Can't Do It[^] 2600 bytes only allows for 20,800 different combinations: many people have...
24 Oct 2012 by b2906
I have been given an algorithm which I then have to make a program for which allows the user to enter in 8 Numbers into an array. Each time a number is entered, the index is incremented and a new maximum is found based on the numbers entered. The algorithm goes as is: BEGIN Set Index to...
24 Oct 2012 by fjdiewornncalwe
I would make a small change in the way you write your conditions so as to remove some redundant duplication of code.If Index = 7 Then MsgBox("Maximum amount of data entered, reset to add more.")ElseIf txtShoeSize.Text = "" Then MsgBox("Enter a Number.")Else If Num >= Maximum...
24 Oct 2012 by psychic6000
i cant find where you are read the variable num, are you missing thisIf (Integer.TryParse(txtnum) = True) Then num = Integer.Parse(txtnum) Else MessageBox.show("Not A number")returnend if
1 Nov 2012 by Deenuji
how to pass one page fileuploadbox filename to another page in asp.net?
1 Nov 2012 by sarathtamil
IN Upload Button Clickstring strFilename = Path.GetFileName(FileUpload1.FileName);label1.text=strFilename;Session["filename"]=label1.text.ToString();using session to pass the filename in another page:another page:pageload()string a=Session["filename"].ToString();Label2.Text=a;
9 Jan 2013 by Sarathkumar Nallathamby
Hi all,I am having exp in asp.net .. But some of my fri tellling learn from basics.. As i know c, c++ is the basic for the programming ..But, Somebody telling before u start to develop u need to study some logics and maths like algorithms and all .. Whether anybody have any suggestion...
9 Jan 2013 by prashant patil 4987
you must learn basc concept of c, CPP, OOPs all Concepts..
18 Jan 2013 by Member 9768396
Hello every one so i want to learn Visuel Basic 6 Because i'm finish C langauge .If you have any books can help me do note hestate please and thank you ...
18 Jan 2013 by Tharaka MTR
If you finished "C" language, I can't imaging why are you going to study Visual Basic 6 instead of C#. My advice is, C# is suitable for you. Event VB.NET is better than VB6. VB6 is very old language.anyway, here are the links for...
18 Jan 2013 by Richard MacCutchan
Don't! VB6 is long out of support and will gain you nothing. If you want to learn some sort of Basic then VB.NET is the way to go. However, as others have already said, C# is probably a better choice if you have a C background.
3 Feb 2013 by Dree2
After all those responses :) and a couple of days of more searching I found this:http://visualstudiogallery.msdn.microsoft.com/28b96cd4-b755-48a0-b686-9abb7d5607a8[^]Works like a dream.Dree