Click here to Skip to main content
15,881,858 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 Title

Basic 

20 Oct 2021 by OriginalGriff
This is not a question. This area is for asking questions that you need help with, not for posting random pseudocode with unlikely claims. It may be that your technique works: but I have my doubts: Quote: Compresses any size file down to around...
17 Nov 2016 by Member 12856880
I am getting "'Namespace' statements can occur only at file or namespace level" error. How to fix it?Imports System.ComponentModelImports System.DiagnosticsImports System.DrawingImports System.IOImports System.LinqImports System.Windows.FormsImports System.XmlPublic...
17 Nov 2016 by Mohtshm Zubair
As Matt is tellingmove Namespace NVCompressGUI after last import statement and above class statement like below Imports System.Xml Namespace NVCompressGUI Public Class Form1 and also move End Namespaceto the bottom as last line
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
14 May 2015 by OriginalGriff
How you do that depends on the environment you are writing code for: for WinForms for example, it's a ToolTip : MSDN[^]For web sites, it's the title="" HTML control element that does this.
27 Nov 2013 by Member 10430192
First i would like to thank you for uploading such a awesome animated project.I am doing a project,i have almost completed but lacking for some graphics effects,i want my main interface to be as windows8 start screen.I planned to place a panel control ,n on top a picture box(to show the...
27 Nov 2013 by OriginalGriff
Don't post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.Posting this here relies on them "dropping by" and...
24 Aug 2013 by Member 10229232
Dim serverSocket As New TcpListener(1200) Dim clientSocket As TcpClient Dim counter As Integer serverSocket.Start() msg("Chat Server Started.") counter = 0 While (True) counter += 1 clientSocket =...
24 Aug 2013 by Mahesh Bailwal
It seems like that dataFromClient does not contains "$" and that's why dataFromClient.IndexOf("$") is returning -1 which causing dataFromClient.Substring(0, dataFromClient.IndexOf("$")) to throw "Length cannot be less than zero" exception.Please debug and check it.
24 Aug 2013 by Member 10229232
I made it a little better for you to understand.
22 Oct 2022 by Member 4206974
Form generator is a class module written in Basic4Android (B4A) for build and handle forms data.
14 Feb 2022 by Howard 9448490
Creating a reusable editor for C# Applications using the RichTextBox Control
2 Apr 2015 by BIPENDRA RANA
i want to learn android programming from scratch. please help me ..bipendra rana
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...
2 Apr 2015 by Peter Leow
Follow these winning articles of Learn Android Tutorial Contest [^]
28 May 2013 by Member 10018770
Dear to All,I am making a program in visual basic 2008 for sending SMS.I have some Difficulties with ListBox and Labels with Timer.Please help me for solving my questions.My questions are :1 - I have a ListBox with Mobile Numbers as items of Listbox.2- I have 3 Labels.   (First label...
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[^]
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...
2 Mar 2023 by Member 12450076
i need help ho can i add two numbers using function in visual basicWhat I have tried:add two numbers using function in visual basic
23 Apr 2013 by PEANAFCONSULT
I am developing an application in Visual Basic 2010 that is accessing a database using ADOThe problem I have is that the reference to ADO seems to disappear when I clean the build.The error message I get is:'ADODB' is not declared. It may be inaccessible due to its protection...
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?
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...
27 Sep 2021 by OriginalGriff
Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to...
1 Jun 2013 by Member 10018770
Hy,I want to get Mobile information such as Menufacture,IMEI etc through AT command.I am using the following code but this does not work.Try If SerialPort1.IsOpen Then Label11.Text = (SerialPort1.Write("AT+CGMI")) Else MsgBox("Sorry !...
1 Jun 2013 by Member 10018770
Hy, I am using AT Commands for Getting basic Mobile Informataion such as Mobile Menufacture,Mobile IMEI ,Sim Detail etc.I am using following Code for getting information but Fail.please help me for solving my matter.ThanksTry If SerialPort1.IsOpen Then ...
5 Jan 2024 by Wessel Beulink
Microsoft Azure enhances security with private subnets, fostering efficient network management.
7 Aug 2013 by hasmukhsumra2005
Open remote url webpage with Basic authentication by asp.net,I have done code likeInternetExplorer IEControl = new InternetExplorer();IWebBrowserApp webBrowserCtl = (IWebBrowserApp)IEControl;string strAuthenticationHeader = "Authorization: Basic " +...
7 Aug 2013 by Manas Bhardwaj
I guess you need to really go back to the design board and decide what you want to do. Are you seriously creating InternetExplorer object on server in ASP.Net? That would never work and does not make sense at all.
10 Sep 2019 by krishnakali pal
I am trying to connect to an Analysis service server using basic authentication from the application which already uses SQL authentication to connect to the SQL database. Can I use both SQL authentication and Basic authentication from the same application. It is a .Net application What I have...
10 Sep 2019 by Maciej Los
Quote: ... the application is throwing error 'The page you are requesting cannot be served because of the ISAPI and CGI restrictions list settings on the web server' Please, read this to resolve your issue: 404.2 The page you are requesting cannot be served because of the ISAPI and CGI...
28 Feb 2024 by Chris Boss
BASIC: A powerful language often underestimated and undervalued
15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
31 May 2013 by Member 10018770
Dear, i am sending sms through visual basic2008 by Serialport1.The code that i am using for sending sms is Try If SerialPort1.IsOpen Then With SerialPort1 .Write("AT" & vbCrLf) .Write("AT+CMGF=1" & vbCrLf) ...
4 Feb 2023 by Member 15914116
Public Class Form2 Private Sub btnGO_Click(sender As Object, e As EventArgs) Handles btnGo1.Click Dim stFirstName As String Dim stLastName As String Dim stGender As String stFirstName = txtFirstName.Text ...
4 Feb 2023 by Richard MacCutchan
It most likely means that your button and text fields are not defined on the form. This could be different spelling, or just missing items.
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..
16 Apr 2016 by Lenny Cheng
We learn how to program a TI-83 / TI-84 Graphing Calculator and then write programs to solve several math problems, including determining whether a number is prime, finding the GCD of two numbers, and calculating the radius of an incircle.
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...
30 Jan 2015 by Zoltán Zörgő
What has this to do with logs/logging? Anyway, the simplest method of sharing such data is using a database engine. Not necessary a heavy one like SQL Server - Firebird would do it, aspecially as it implements event model, so you can notify users about changes. An other approach woud be using...
5 Mar 2017 by Member 13039426
Hey guys, Im very new to coding. Im a business major and i have been coding for about 6 months now. I love it, and i think it loves me since it comes pretty easy to me lol. At the moment im okayish fluent in html5,css,php,mysql and a bit of ruby.A few weeks back i came across saas and the...
5 Mar 2017 by Richard MacCutchan
The first thing you need to do is to learn all about SAAS, so a good starting point would be: SAAS - Google Search[^].
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...
19 Oct 2017 by Richard MacCutchan
The following code makes no sense. The first iteration of your loop will terminate your program. for(i = 1; i
19 Oct 2017 by KarstenK
You should write for every needed output a function which deliver it and than do the output. You can define an array like this, but you also need to free the memory: int *arr = 0;// define pointer int count = fillArrayFunc( arr, a, b, n ); for( int i = 0; i
1 Mar 2016 by Member 12362899
Ive been writing a code for a project and I was wondering how to create a method (IsEnrolled) to return a Boolean value (need to use if statement.) This method will have to return a true statement is student is enrolled and a false if student isn't enrolled. The problem is my...
1 Mar 2016 by Parveen Siwach
Put "==" while comparing CurrentEnrolledCourse with null.Try this:public bool IsEnrolled() { if (string.IsNullOrEmpty(CurrentEnrolledCourse)) { return false; } else { return...
1 Mar 2016 by Sergey Alexandrovich Kryukov
It should beif (CurrentEnrolledCourse == null) ...Moreover, all those "if-else" are just pointless. Did you even think of that? Your expression under "if" is already a Boolean, so why "if"? Do just this:public bool IsEnrolled() { return CurrentEnrolledCourse != null; }Isn't that simple?...
1 Mar 2016 by DotNetSteve
Need double equalif (CurrentEnrolledCourse == null)
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 { ...
2 Aug 2020 by DiponRoy
Read a large CSV or any character separated values file chunk by chunk as DataTable and Entity List
5 Nov 2018 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...
22 Nov 2015 by Member 12160080
can we create a class of view instead of table? Using GNR8
30 May 2016 by Member 12530466
Have made an application (VB/NET)that capture pics on packed articles.The problem is to get the resolution higher than 640 x 360 pixels.Many have this issue on the web but I can't find a not to complex solution.The year i 2016 and I thought these things should be fairly easy, but...
22 Dec 2020 by Member 11700078
I have one child Form (Form2) in a MDI project with one label and one button control. Form2 also having a public Sub ChangeText(). When run this SUB changes the Label text. On clicking the Button one Modal Form will pop up. This modal Form also...
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...
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
24 Dec 2022 by Hemil Gandhi
Error in following line, please help Dim num As Short = CShort(1152712705) What I have tried: Googling from last entire week.
24 Dec 2022 by OriginalGriff
A short value has only 16 bits, one of which is used to determine sign: it is positive or negative? As a result, the largest positive number you can fit into a short is 32767. Your value vastly exceeds that and requires an integer (32 bits) or...
29 Nov 2019 by MohannadNajjar
HI ,,, What is wrong in the code to convert the program interface to another language interface ??? IN Visual Basic .NET (Visual Studio 2019) Imports System.Globalization Imports System.ComponentModel Public Class Form1 Private Sub ArButton_Click(sender As Object, e As EventArgs)...
29 Nov 2019 by RickZeeland
Seems ok to me, using an online converter it can be converted to C#. Convert VB.NET to/from C# online - Roslyn Code Converter[^] using System; using System.Globalization; public partial class Form1 { private void ArButton_Click(object sender, EventArgs e) { ...
15 Dec 2015 by Member 12209497
Afternoon, I have searched for a way to count the vowels in a string and have got close, Sub countVowels(userInput As String, ByRef numberOfVowels As Double) Dim userInputArray() As Char Dim mycount As Integer Dim s As String userInputArray =...
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 Dec 2015 by Sergey Alexandrovich Kryukov
This code is what I call "anti-programming"; instead of using programming abstraction, it reflects the thinking of a non-engineer who tries to compare and count everything one by one. In "real" programming, the code is always much more expressive and shorter. Besides, it should be maintainable:...
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...
27 Sep 2014 by Member 11115108
How would I go about creating a onscreen ruler in VB so you press a button and then you click point a and then point b and it shows the length in pixels, please be understanding as I've been programming in VB for a while but only learnt off by mucking around and learning in the internet and this...
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...
10 Apr 2018 by Member 13730124
Hi, im currently working on a project to create a menu driven program only using coding in visual basic console application. I'm stuck on creating the quadratic solver as im unsure on how to start. Im stuck on the quadratic equation part, any help will be appreciated thank you What I have...
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
20 Jan 2016 by Indresh_Prajapati
This tip will help beginners to implement CRUD operations in ASP.NET MVC 4 with scripting language as KnockOut and Database as MS SQL 2008R2.
22 Feb 2016 by Indresh_Prajapati
This tip will help beginners to implement CRUD operations in ASP.NET MVC 5 using WebAPI 2 with scripting language as AngularJS and Database as MS SQL 2008R2.
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'...
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...
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...
9 Jan 2017 by realhastalamuerte
is there a way i can message a person from this forum privatelyWhat I have tried:just asking basic questions to lear more about this site since i heard this is the bes programing site there is
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...
4 Jul 2015 by Walt Hamilton
I have a picture of a cow. I want to drag her around the window. I want to see her while I drag her. I do not want to drag a whole rectangle of background color with her.Is there any way to do this anywhere in Visual Basic in Windows Forms application?
8 Jul 2015 by Ralf Meier
This is a customized PictureBox with a "real" transparent Background.Public Class customPictureBox Inherits PictureBox Public Sub New() Me.SetStyle(ControlStyles.Opaque, True) Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, False) ...
12 Sep 2020 by Member 14936556
Draw an ER diagram for multiple copies of the same book with unique book . What I have tried: can i try this with weak entity? as i take book as strong entity and copy as weak entity and i have no idea what can i give attribute of weak entity....
12 Sep 2020 by Gerry Schmitz
The parent is the ISBN / Title; the children are the physical books for that ISBN. The parent says nothing about condition, price, location / owner; the children do. The parent may contain (original) author, first pub date, ... attributes not...
4 Oct 2015 by Member 12032084
.dll for making the FTP management with VB.NET easier
18 Sep 2017 by OriginalGriff
This is not a development question: you need to find a hardware related site and ask it there: we deal with software queries.
4 Mar 2017 by Member 13037760
Hey Friends. I Am Trying To Access Data From DataGridView To Form By CellClick Event. In VB .NETWhen Ever I Click On Cell I Got All Data From Table To Form But Not Able To See Image In PictureBox.When I Tried Only This Code:pic1 = selectedRow.Cells(13).ValueDim ms As New...
4 Mar 2017 by Graeme_Grant
Convert.ToByte Method (Object) (System)[^]
14 Aug 2013 by Member 10018770
I want to Export Listbox data to Excel.how can i do this.I am using Visual basic6
14 Aug 2013 by Rakesh Meel
Function tired_of_name_test()Dim oExcel As Excel.Application ' Excel ApplicationSet oExcel = New Excel.Application ' Start itoExcel.Workbooks.Open...
14 Aug 2013 by ridoy
Check these..Export data to Excel in Vb.Net with Auto format technique.[^]Export ListBox data to Excel... [^]
26 Aug 2013 by PatilVL
HiI am facing a strange problem.When I insert a record from VB.net code to MS Access 2010, the record gets inserted. But when I open the Access database I find that the first field is not showing the value. But I know that the value is recorded but just not visible (By entering a character...
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...
17 Feb 2014 by PatilVL
This was a silly mistake. In vb code the character vbcrlf was added (in the beginning of the string in some place to the text string which was inserted into field. (If I wanted to stored a string Mystring, I was sending vbcrlf & Mystring). Thus the sting stored was not at all visible!
15 Feb 2016 by Member 12328713
I would like to ask a question. For this I need to attach a small wav file. At a first glance it seems no possible. Or am I wrong?
11 Oct 2017 by Member 13458722
Write a simple For Loop that asks how many times they would like to display a certain message. On entering this number the program then prints out the message that many times. What I have tried: I have tried various ways but i just dont understand it how do i do it please
11 Oct 2017 by OriginalGriff
This is your homework: so I'll give you no code! But this is pretty simple, if you read your notes from the last lesson. There are two sections to this: 1) Ask the user how many times to print the message, and get the response as a number. 2) Loop that many times to print the message. Now, I'm...
3 Sep 2015 by TheBigBearNow
Hello all,I am currently working on a Visual Basic application and I currently have a form created. I was wondering and been looking for a way so when the user re-sizes the form the controls will change in size depending on the user making it bigger or smaller.Also another thing I am...