Click here to Skip to main content
15,886,806 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 Updated

Basic 

26 Aug 2013 by _Amy
No, it's not possible. A value you inserted in database will/should be available in the database table. If I am not wrong, your record(which you are trying to insert) is not getting inserted in database.PatilVL Wrote:By entering a character of the value in search textbox, it will be visible...
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)))){
24 Oct 2012 by _Vitor Garcia_
Check this outQuickSort Revisited, Optimised, and Stabilised[^]
7 Mar 2014 by Abhinav S
This cannot be done without using a third party like SharpZipLib[^].
2 Aug 2013 by AbhinavGauniyal
I was just writing a small program to start with Visual Studio (visual basic) , and i am stuck at 1 particular position. Suppose there is 1 text box (in which user enters some sentence) and a label beside it. now i want that if User enters this sentence: "#Green# What is color of the leaf"Then...
4 Mar 2016 by AbhinavGauniyal
I have created a form in Visual basic and a textbox into it. Whenever i start the form[debug it :p] (press F5) the textbox automatically gains focus. I dont want it to gain focus, any way to do that?
26 May 2014 by abkcareer
I'm working on a RESTful mobile application using ASP.Net Web APIs. I am inclined to use Basic authentication. I have followed some articles which gave me good start. I understood that "username:password" will be encoded and added to "Authorization: Basic " and sent it as header on subsequent...
29 Aug 2014 by ADemontis
I have an app where i add images programmatically to simulate the desktop shortcuts.... the idea is that i can drag the images around and click on them to start a process.The app creates the mouse events via addHandler in order to drag the image around...it uses 1)mousedown: it sets a...
30 Aug 2014 by ADemontis
I have found out that the Button object is not viable for this particular issue, in no way there is a method to implement the MouseClick or the MouseDoubleClick in the same object defining the mousedown and mouseup event programmatically.I had to change the newbutton type to Picturebox and now...
14 May 2015 by Ahmed Mohamed Hafez
I want to make a title appear when the mouse pointer Enter for example a button Like thishttp://www9.0zz0.com/2015/05/14/15/236720724.jpgI'm using Visual basic 2013
4 Feb 2024 by Albert Redditt
I wrote this program several years ago. It allows you to make fully scalable "pictures" for font characters. It's written in Free BASIC.. Since the font characters can vary in size , i couldn't figure out how to make an editor for it. How...
8 Feb 2024 by Albert Redditt
The Free BASIC coders wrote a program called "Swig" You run it on a *.dll and it outputs a *.bi ( BASIC include ) file like a C ( header file ) So then you can call C and windows libraries , from inside of BASIC. To run the above code you...
8 Sep 2021 by albert_redditt
Hello: This code is in FreeBasic... How do you undo it , to reveal v1 , v2 , v3 ??? screen 19 do dim as ubyte v1 = int( rnd * 4 ) + 1 dim as ubyte v2 = int( rnd * 4 ) + 1 dim as ubyte v3 = int( rnd * 4 ) + 1 dim as...
8 Sep 2021 by albert_redditt
It makes it possible with the following code added map+= bin( v2 mod 2 ) so ((v1*v2)-1) and ((v2*v3)-1) if you know that v2 is even or odd , since the values are all 1 to 4. if v2 is odd then it has to be a 1 or 3 else its a 2 or 4
11 Sep 2021 by albert_redditt
Can someone help speed this code up?? It currently uses string indexing.. How would you do it with pointers or shifts or logic or math?? I'm using FreeBASIC n1 = "110110" v1 = ( ( n1[ 0 ] - 48 ) * 2 ) + ( n1[ 1 ] - 48 ) v2 = ( ( n1[ 2 ] - 48...
11 Sep 2021 by albert_redditt
Here's the main loop again.. I tweaked it a little.. using pointers.. Now it's down to under 25 seconds.. for a megabyte input.. It's using ubyte pointers... so it takes 6 operations to do 6 bits.. I couldn't figure out ushort ptr's.. It would...
11 Sep 2021 by albert_redditt
Here's the whole program... It's in FreeBASIC You need Zlib.dll the the directory with the compiled exe.. I got the Compress_loop() tweaked as much as i can... The only thing left is inline ASM... ...
24 Sep 2021 by albert_redditt
Here's the whole program... It's written in FreeBASIC.. '===================================================================== '===================================================================== 'Start Z lib...
22 Oct 2021 by albert_redditt
It's for a data compressor... The code is FreeBasic.. ( freebasic.net ) if n1 = 110 or 111 it compresses a bit.. if n1 = 000 or 001 it expands 2 bits.. it compresses a bit more often than it expands 2 bits, so it overall it compresses.. ...
23 Nov 2019 by albert_redditt
This code by it's self doesn't compress.. But when used in conjunction with Zlib it compresses.. See compress_loop() it starts a the end of the hex input stream and squares each digit. if puts the last hex digit into the output, and carry's the remainder to the next input digit. I'm looking...
7 Oct 2018 by Alex McAllister
Im making a site where my students can submit anonymous answers to me, I have a domain for the site, and I just want the site to be a blank page with a text box that they can enter words into. How to I receive what the students posted, so that other students cant see it? Can I send the answers...
20 Jul 2021 by Alice Woods
Hi there, Can someone please help me how to locate the class name, object attribute and variables, and object methods from the code below... I'm so confused, please help! thank you import sys import numpy as np frankston_stock = []...
9 Aug 2016 by Alеksey Nemiro
Authorization users using OAuth for websites and programs. Using API of different providers: CodeProject Forums Viewer, Dropbox file
2 Mar 2023 by Amerigoware
The error is: Quote: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown. What I have tried: My code is: Private Sub PlayList_SelectedIndexChanged(sender As Object, e As EventArgs) Handles...
24 Dec 2016 by Amogh Halageri
I'm a beginner in computer programming, and so far I've done Java and Android. I don't know much about databases. I have a few questions in order to get a clear picture of database's place in computer based application development. 1. Who creates a database? How is it created? Where is it...
2 Mar 2023 by Andre Oosthuizen
The public properties and methods of an ActiveX control can only be referenced after the ActiveX control has been instantiated and initialized completely; otherwise the AxHost.InvalidActiveXStateException exception is thrown. The...
8 Nov 2016 by Anele 'Mashy' Mbanga
Using Basic4Android, develop your first Android Native App
29 Oct 2019 by Anibalito
Hi, I'm working with SpreadsheetLight in Visual Studio 2008. DocumentFormat - 2.05 SpreadsheetLight - 3.4 When executing the SaveAs ("File Name") method on some terminals, regardless of whether it is Windows 7 or 10 it takes a long time to finish its execution, not allowing you to do anything...
29 Oct 2019 by Anibalito
Hello, After continuing to test, without results, I decided to change and do it in Visual Studio 2019 with NetFramework 4.7.2. and the same libraries. Problem solved!
28 Oct 2014 by Animesh Datta
Hello ,The error clear says that You're trying to insert a value into a column that has a FK constraint on it that doesn't match any values in the lookup table.So , check "id_book" column of which the table references before insert the data . thanks
31 Mar 2015 by AnotherKen
Maybe this will help? Mouse and Keyboard Tracking and Simulator[^]
28 Oct 2014 by Anzeis
Greetings,I have a problem with visual studio, I'm trying to insert values into a table with a foreing key, but I keep getting this errorThe INSERT statement conflicted with the FOREIGN KEY constraint"FK__sales__id_book_1920BFC". THe conflict ocurred in database "....Bookstore.mdf",...
29 Oct 2014 by Anzeis
I gave up and dropped the database and made a new one, then I removed the DataSet from my application on Visual Studio and created it again.
20 Apr 2014 by Atakan Aktoprak
Hi , I'm trying to write a program.Will be a question.How do I print the name and save face?I made the program codes.Dim cekim As Capture = New Capture Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim resim As...
25 Aug 2017 by B.Sudhir
1. I was trying to execute a Bash Shell Script from any directory in the system. for this I need to make it available to execute anywhere in the system. 2. I also mistakenly added wrong path which I wanted to delete but its not happening. Please help. What I have tried: 1. I've added the...
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...
7 Jun 2014 by Bebser
I really don't get why this doesn't work for 64bit applications to read 32bit applications modules.Works perfect with 32bit -> 32bitWell this works perfect to grab modules from 32bit process to other 32bit process when using dwFlags &H8But with 64bit to 32bit it fails with dwFlags set to...
5 Apr 2022 by benngia
Hi, I have a listbox with many items like these: test_test_0.0.0.0_000 test5_test5_1.1.1.1_000_0 testing_testing_0.1.2.3_000 blabla_blabla_0.5.4.3_000 I need to rename the listbox items into: rtsp://test:test@0.0.0.0:000...
15 Jun 2021 by BenNgu123
I'm pretty new, I was wondering how I can add new elements to my code instead of constantly changing the same one. My code just allows me to edit the same element instead of being able to make a new element. My goal is making a contacts...
20 Mar 2014 by Benniit
I'm using visual studio 2012 (vb.net) and when I created the project, there was this start button on the tool bar which looks like an arrow.Some weeks later, I realized the start button had changed to "Attach".When I run the application, "Attach to Process" form appears instead of my...
21 Mar 2014 by Benniit
I'm using visual basic.net 2012 ultimateand when I created the project, the start/continue button on the tool barwhich looks like an arrow was there.Some weeks later, I realized the startbutton had changed to "Attach".When I run the application, "Attach toProcess" form appears...
18 Jan 2021 by Bhasker Babu
when I am inserting a array of char type. I have set rray, but when I run the program it takes less values and print them instead of taking the no. of values which I have initialized. please check this import java.io.*; class charr { public...
2 Apr 2015 by BIPENDRA RANA
i want to learn android programming from scratch. please help me ..bipendra rana
10 Oct 2014 by Bizancio Martínez García
Hello, I need to know how to print data from a form, not the form, only the values. Also, I'd like to know how to print data greed's data.I expect to learn from what you answer.Thank you very much.
13 Dec 2014 by Bud Laman
I can create an array of text boxes but adding tb.dodragdrop does not make them drag and drop. what do I need to add when they are created?This is a partial list of code so far which doesn't allow dropping image names from the image files:Dim TextCtrl(13) As TextBoxDim xLoc1 As Integer =...
2 Jul 2015 by ChasHH
I have completed a Voice Recognition program written in Visual Basic 2013, which I would like to enhance by loading data dynamically into my Grammar. Below I have found an example that does EXACTLY what I need!! Unfortunately, it is not written in Basic and I can not seem to convert it into...
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....
24 Nov 2013 by CHill60
Assuming this wasn't meant to be ironic (Socrates Programme[^]) I can only assume that you are referring to the Socrates medical Software packages. As these are proprietary, commercial packages I would suggest the only way you're going to view the code is by managing to gain employment with...
23 Mar 2014 by CHill60
I presume you are referring to the green "Start Debugging" button and you have inadvertently changed the menu bar optionsThe following link will explain how you can change thathttps://www.google.co.uk/?gfe_rd=ctrl&ei=YisvU8z7FKfR8gej5IFA&gws_rd=cr#q=visual+studio+customize+menu+bar[^]
6 Jan 2015 by CHill60
They're still being posted e.g. http://www.codeproject.com/search.aspx?q=vb.net&doctypeid=1%3b2%3b3%3b13%3b14&sort=threadmodifieddesc[^]Obviously there are fewer if it's VB6 you meant http://www.codeproject.com/search.aspx?q=vb6&doctypeid=1%3b2%3b3%3b13%3b14&sort=createddesc[^]
11 Jun 2015 by CHill60
Whenever you are getting data from a database you should always check that the query has returned something before attempting to use it. For example Protected Sub DDOFIREF_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DDOFIREF.SelectedIndexChanged 'LblRef.Text...
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...
12 Jul 2017 by CHill60
Here is a version of your code that copies data from D9 to the end of the data used and pastes the results into the [Comprehensive] sheet starting at cell D9 instead of A2. It copies the data present from D9 to the last column rather than attempting to copy all of the columns for the rows used...
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...
30 May 2018 by CHill60
In the VBA editor (Alt-F11 to get to it) double click on the Sheet you want this to happen on. Enter the following code:Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) 'This checks for any entry in column B If Application.Intersect(Range("B:B"),...
12 Jul 2018 by CHill60
This is not a code-writing service - although there are such services out there be prepared to pay and the less you are prepared to pay the lower the quality of the product you are likely to receive. I strongly recommend that you edit your post and remove your email - this is an open forum and...
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...
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...
22 Dec 2020 by CHill60
Have a read of this series of Tips that will show you the right way to do this Transferring information between two forms, Part 1: Parent to Child[^] Transferring information between two forms, Part 2: Child to Parent[^] Transferring information...
4 Apr 2022 by CHill60
As far as I know, the ListBox item has to be selected before you can change the text. You will find that difficult in a For Each loop, especially as you have Strings rather than Objects. Try changing the loop to a For iterator = range loop....
16 Jan 2023 by CHill60
If you don't understand the question then you need to talk to your tutor. We will not do your assignment for you - assignments are designed to cement knowledge in your head and to help your tutor better gauge your needs. Getting someone else to...
2 Nov 2016 by Chris Boss
One of the challenges which I have felt made the WIN32 API dfficult to learn is that it leaned heavily on C and as a long time BASIC programmer, I always felt the C language syntax was terse in nature and that it lacked the natural syntax of languages like BASIC.
19 Apr 2017 by Chris Boss
After years of learning how Windows works under the “hood”, as a WIN32 API programmer, I can look back at classic Visual Basic from a different perspective and see how it could have been designed better right from the start. As a long time BASIC programmer, I appreciated how easy it was
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.
15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
28 Feb 2024 by Chris Boss
BASIC: A powerful language often underestimated and undervalued
30 Jan 2015 by codetowns
I am trying to find the best way to create and manage a shared log over a network in VB.net. Users on different PCs must be able to change checkboxes related to the status of files within a folder and all users must see all changes. In other words, say 5 people on different PCs all have...
24 Mar 2016 by CPallini
Google[^] is your friend.
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,...
22 Sep 2017 by CPallini
Quote: Not much since I do not understand anything Then it's time to study. Take, for instance, Task1. You should be able to get an integer from the user check if it is odd or even (there's the hint 'use modulus') report the result to the user Just using Google you can get help on each of...
10 Apr 2018 by CPallini
Is is just a matter of Translate mathematical formulas into Visual Basic expressions Use an if chain on the discriminant value e.g. det = b * b - 4 * a * c If det
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]
5 Sep 2016 by Dahal Mahesh
Hi Alec I had used Cognitive services using Azure for OCR and found them interesting. Though not 100% accurate but very close to it. You might want to explore on it if you got an azure subscription.
20 Jul 2014 by damuvi
Hi everyone, First of all I want to thank everyone in advance and to apologize because I have very little experience playing with wndproc and messages. I'm using the code of the following link (converted to Visual Basic and a bit modified) to intercept the keys from a barcode scanner and...
11 Oct 2016 by Daniel Choban
I don't understand what i'm doing wrong here:This is the code challenge:"I'm going to create a variable named time. It'll be an integer for the current hour (well, what I want the current hour to be).I need you to make an if condition that sets store_open to True if time is in...
4 Apr 2021 by Daniel Peqini
I want to find the order that the buttons are clicked and add them in an Array where they are sorted by their click order. Then i want to know the name of the last button clicked (4 buttons). What I have tried: I have tried to check when a...
8 Aug 2020 by Dark Frost
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If CheckBox1.Checked = True Then Dim a As String = "-clone" Else End If If CheckBox2.Checked = True Then ...
18 Jun 2015 by Dave Kreskowiak
You problem is that you paint on the Panel only once. Once you scroll the Panel over, everything you painted is lost. You have to do the painting of the Panel in the Panels Paint event. Every time the Panel is scrolled or another window is passed over your panel you will lose everything you...
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...
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...
3 Nov 2017 by Dave Kreskowiak
Did you even bother to contact Revelation Software for Support[^] and documentation on their product? Notice the "Support" link in the header of the page.
14 Jun 2018 by Dave Kreskowiak
Well, you can easily find the source of the problem if you used the debugger. The collection exposed by .classes doesn't exist. It's null. When you called the Add method on a null object, you got that exception. You have to examine your TravelInformation class to find out why that collection...
14 Jun 2018 by Dave Kreskowiak
Oh, it's not that help isn't allowed. It's that your definition of "help" isn't helpful to you at all. No, you're not going to have your code written for you. You don't learn a damn thing that way.
28 Mar 2021 by Dave Kreskowiak
There is a property on the ProgressBar control, called Style. Set it to ProgressBarStyle.Marquee. No other code required.
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.
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...
28 Jun 2016 by David A. Gray
A reference chart that doubles as the engine behind a data structure mapper
1 Nov 2012 by Deenuji
how to pass one page fileuploadbox filename to another page in asp.net?
2 Aug 2020 by DiponRoy
Read a large CSV or any character separated values file chunk by chunk as DataTable and Entity List
1 Mar 2016 by DotNetSteve
Need double equalif (CurrentEnrolledCourse == null)
2 Feb 2013 by Dree2
Hi,Just back from a few years not programming, before with vb6, now I'm using Visual Basic 2010. Re making my old programs I encountered a small problem. I made a email notification program with a free PoP ActiveX, it can set the port but it does not contain the Possibility to set SSL on or...
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
19 Oct 2017 by E.Açıkgöz
Write a program that reads there integers from the user(keyboard) namely, n, a and b. Your program sohuld print all positive numbers satisfying the following condition: *The number smaller than n and the ratio of the number and sum of its positive divisors is equal to a/b. You should print the...
11 Jun 2015 by Emm4
Good AfternoonI'm hoping someone can assist as I'm obviously missing something here.Basically I have a drop down list of a category when viewing in the webpage and selecting a job with a category its coming up with an errorAn exception of type 'System.ArgumentOutOfRangeException'...
14 Aug 2016 by F-ES Sitecore
After the loop you could addtxtclients.Text = txtclients.Text.TrimEnd('\n');
6 Dec 2016 by FellippeHeitor
IF Solutions are ok.Bashing BASIC without knowing about QB64 is not ok.QB64 is a modern extended version of the Basic programming language that retains QB4.5/Qbasic compatibility and compiles natively for Windows, Linux and macOS.www.qb64.org