Skip to main content

Questions tagged [basic]

For questions about the BASIC (Beginner’s All-purpose Symbolic Instruction Code) programming language. DO NOT USE TO INDICATE YOUR QUESTION IS SIMPLE!

-1 votes
2 answers
26 views

How to open a new windows form from a submenu

I am currently just practicing code on Visual basic. Basically, I created a windows form with many texts on it. each text is the name of a color txtRed, txtBlue, etc. I am trying to create a simple ...
user4138475's user avatar
1 vote
0 answers
31 views

Hide Console from .BAS compiled into .exe code

I'm developing an application manager to handle the execution of some legacy code written in .bas files. The application is being developed in Java/Kotlin and is accessed via a web service. The .bas ...
Victor Dalosto's user avatar
-3 votes
0 answers
22 views

HT BASIC fail call .NET dll file?

BASIC language programs need to call a class library written in C#. We created an intermediate DLL with a C language interface using C++/CLI. The invoke pipeline is: BASIC program—>dll (C++/CLI ...
ligand's user avatar
  • 294
0 votes
1 answer
26 views

Are PowerBASIC variables case-sensitive?

I'm working on porting some old code written in PowerBASIC and compiled by the PowerBASIC Console Compiler. I don't actually have access to a working PBCC myself, only some compiled artifacts to ...
Extradosages's user avatar
0 votes
0 answers
31 views

Visual Basic Linq with Eager Loading Include

I want to start a Linq query with Visual Basic. The query includes Eager Loading with Filtered Includes. Customers should be invited who have at least one order. Furthermore, I would like to limit the ...
OlafMS's user avatar
  • 1
0 votes
0 answers
17 views

How to non-Repeat the code that do the same thing on Visual Basic

I have a question about repeating code. I made an example with a Random Number Generator Public Class Form1 Dim Random As New Random Dim Value(20) As Integer Dim Number As Integer ...
Artur Strutzel's user avatar
1 vote
1 answer
42 views

get the bytes of a file to an array

I use the following 9 lines to put the bytes of a file NameF in vector T() in FreeBasic 0.4.6 FBide. Is there a better or shorter way? DIM L as ulong, NameF as string Input "Enter Name of the ...
Manuel Oliveros's user avatar
0 votes
0 answers
44 views

Trouble understanding a numerical method for solving differential equations

This is the BASIC code for solving a nth order IVP using the RK 4 method: CLS:KEY OFF: "Program RK-n for nth order IVPs" DIM A(4),G(4,4),W(4),X(4):W(1) = W(4) = 1/6:W(2)= W(3)=1/3 DEF FNF(T,...
Ajaykrishnan R's user avatar
0 votes
1 answer
90 views

How do I get content of a text cursor in Libreoffice Writer?

I want to get content of a text cursor in Libreoffice Writer. In this case, the content of the first word in the document. I tried the code below. The last line in the sub gets me the content of the ...
Jan Siebert's user avatar
0 votes
2 answers
121 views

Unable to change shape color using macro in LibreOffice Impress presentation mode

I'm trying to use Basic macros to make a shape change its color when clicked during presentation mode. My goal is to create versatile code that works on any slide, regardless of the number of shapes. ...
Alex Hubbe's user avatar
0 votes
1 answer
149 views

Paste formula in Libre Calc using Basic macro

I am trying to replicate an excel macro in Libre Calc using the native Basic. I've come up against what I feel should be a simple problem/resolution (for someone who has a clue what they are doing). I ...
Paul's user avatar
  • 3
2 votes
0 answers
40 views

Interpretation of BASIC line

I have had to OCR an old bit of BASIC code which contains this line: which I have interpreted as: 10140 FOR K = 1 TO NS: FOR J = 1 TO NN:A%(CJ%(J),S%(K)) = 1 * (A%(CJ%(J),S%(K)) = 1 OR A%(CJ%(J),N) ...
Adrian's user avatar
  • 325
0 votes
0 answers
16 views

Count down daily email sent out

Dim targetDate As Date Sub ScheduleEmail() ' Set the target date targetDate = DateValue("2024-01-14") ' Schedule the SendCountdownEmail macro to run at 9 AM every day ...
Samuel Wilson's user avatar
0 votes
0 answers
84 views

quickBasic WINDOW statement

I found this old book and in the appendix there are some QuickBasic programs that I want to try out.. the problem is that those were written on/for Apple Macintosh II and I use DosBox on a Linux PC.. ...
skibidi's user avatar
  • 13
0 votes
1 answer
227 views

Libreoffice Calc Basic macro to combine sheets with different number of columns

I need help with this LibreOffice Basic code intended to merge & combine all sheets into the "Combined" sheet. Columns are supposed to be merged as union of columns from all sheets, i.e. ...
zlatko's user avatar
  • 640
0 votes
1 answer
23 views

My existing code is altered by adding a button

If I add a new button to a VB windows form, all the existing buttons on that form, have part of the first line of their code wiped, as shown in italics below. Private Sub Button1_Click(sender As ...
Col Mortimer's user avatar
0 votes
0 answers
35 views

Reducing gap in the DatagridView's panel

See screenshot The dgv Inside the blue panel should be maximized in without any gap Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click If Not ValidateInput(CtrlDtl) ...
agaesh kumar's user avatar
0 votes
1 answer
80 views

Why is there an unexpected character on line 6 in C64 Basic?

PRG Studio says there is an unexpected character on line 6. But, I can't figure out why. I'm programming for the c64. 1 rem setup 3 holding = "nothing" 6 playing_game = true 10 rem intro 20 ...
kai's user avatar
  • 35
1 vote
2 answers
68 views

Length of random sequence in Locomotive Basic (1986)

I am learning BASIC and working now in GEM Locomotive BASIC (1986) on '86 Amstrad PC1512DD (8MHz, 512 ram, 5.25" 360 kb floppies) I am randomly generating numbers in a range with a program that ...
Liebenfiels's user avatar
0 votes
1 answer
76 views

A way to add subroutines by code at runtime in libreoffice basic

Is there a way to add / delete subroutines or functions by code at runtime in libreoffice basic? I would very like to be able to create, delete and run subroutines or functions by code at runtime. I ...
mutercim's user avatar
0 votes
1 answer
57 views

creating a new module in a chosen library using libreoffice basic

How can I create a new module in a chosen library using libreoffice basic code? I've tried: ThisComponent.getLibraryContainer().getByName("C_calc").getModuleContainer().insertByName("...
mutercim's user avatar
1 vote
0 answers
74 views

Libreoffice upgrade (7.5 to 7.6) broke my macro

The macro was working perfectly under 7.5 (7.5.3??) but very frustratingly it's now dead after a Libreoffice 7.6.0.3 upgrade, as are the many(!) instances / slight variants of this code through my ...
Micklos's user avatar
  • 137
-1 votes
2 answers
101 views

VB.NET and DataGridView: how read a specific Cell value

I have a DataGridView of 3 columns and 3 rows (it's just an example). I would like to read only the value of a specific cell (in this example 2x2). How do you do this? I try this code but visual ...
Marco Giglio's user avatar
0 votes
1 answer
19 views

Inverting a number digits in Applesoft Basic

I'm using the Apple II+ emulator in the following link: https://www.calormen.com/jsbasic/ To run the following code: 10 HOME 20 DEF FNMOD(NUMBER) = NUMBER - INT(NUMBER / 10) * 10 30 LET N = 135 40 LET ...
Vinicius Lima Cordeiro's user avatar
0 votes
1 answer
55 views

how to pass array(1) element of array(5,5) to a function in VB

Private Sub fun1() Dim array(5,5) As Integer someinit(array) For I As Integer = 0 To 4 Function (array(I)) Next End Sub I want to pass the arrays array(0), array(1), etc to ...
Cinverse's user avatar
  • 128
1 vote
1 answer
123 views

Porting from Santaka ZX Spectrum clone code to Z80 to compile a Santaka game - how to translate to this dialect?

This is a continuation of https://retrocomputing.stackexchange.com/questions/27077 I am trying to port my father's game for the Z80 compiler. I have managed to read up on the tutorials and other ...
Sir Muffington's user avatar
0 votes
0 answers
170 views

Recompiling an legacy BASIC program with .BAS files for 64-bit machines

I have an old program written in Microsoft compiled BASIC that consists of two .BAS files. The only executable I have is a 16-bit .exe file compiled with QuickBASIC 7.x, designed for old machines (...
Khalil Misbah's user avatar
-1 votes
2 answers
6k views

I can't find "Windows Forms App (.NET Framework)" in Visual Studio 2022 (free download)

I used VB6 a couple of decades ago, now I need VB again. Got the free download from https://visualstudio.microsoft.com/vs/community/. Started the tutorial at https://learn.microsoft.com/en-us/...
BitTwiddler's user avatar
1 vote
1 answer
63 views

Im trying to make tetris in Basic , but I have encoutered a problem which i cant seem to solve

' Define the subroutine SUB MySubroutine PRINT "Hello, world!" END SUB ' Call the subroutine CALL MySubroutine I wanted to try and make TetrisTetris in qbasic but I'm trying to figure ...
Mirazz_Boi's user avatar
0 votes
1 answer
38 views

Clearing the Console in BASIC

I've tried researching for the answer but nothing comes up. The results it showed me would say to put 'clear' or 'clr' in the code, but it doesn't work.
Charlie's user avatar

15 30 50 per page
1
2 3 4 5
29