pyeri 51 Newbie Poster

@fx.eko I don't think it will be as trivial as just putting your VB6 forms and modules into a converter and getting the resulting FPC source files. Free Pascal is a whole different programming language. Comparable to C/C++ but somewhat elegant in syntax and relatively safer due to lack of pointer arithmetic.

Threads like these will help you to migrate your projects, folks who have migrated apps from VB to Free Pascal often share their experiences on these forums. And even though migration might take some initial time and effort, it is very much advisable especially in light of direction that Microsoft Desktop technologies like Windows OS are taking.

And remember, Free Pascal isn't the only option, there are dozen others like Swing, Tkinter, PySide/PyQt, etc. The advantage of FOSS is that even if you switch to a Linux or MacOS desktop tomorrow, your application and code would still remain portable and thus you will future-proof yourself.

fx.eko 31 Junior Poster in Training

hi @pyeri
is there a tool to convert from vb6 to Free Pascal (a dialect of Delphi)

Thank you for the enlightenment

baranoya 0 Newbie Poster

my bad,
invalid file type XD

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What are you trying to do with collect2.exe?

baranoya commented: I do not know what it is +0
baranoya 0 Newbie Poster

Hi,
I'm trying to start learning C++ on "Sublime Text" an error came out
"file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status"
what can I do about it

toneewa 115 Junior Poster

I downloaded a sample csv file, and installed pandas in Visual Studio, Python 3.9, 3.11 with the command prompt: python -m pip install pandas

(workspace directory: C:\Users\toneewa\nasa\repos\read_py_file)
CD C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64
python -m pip install pandas
This runs fine:

import pandas as pd
#shows all
#pd.set_option('display.max_rows', None)
#pd.set_option('display.max_columns', None)
df = pd.read_csv('people.csv')
print(df)

    Index          User Id  ... Date of birth              Job Title
0       1  88F7B33d2bcf9f5  ...    1945-10-26        Games developer
1       2  f90cD3E76f1A9b9  ...    1910-03-24         Phytotherapist
2       3  DbeAb8CcdfeFC2c  ...    1992-07-02              Homeopath
3       4  A31Bee3c201ef58  ...    2017-08-03      Market researcher
4       5  1bA7A3dc874da3c  ...    1938-12-01     Veterinary surgeon
..    ...              ...  ...           ...                    ...
95     96  5eFda7caAeB260E  ...    1954-07-30      Software engineer
96     97  CCbFce93d3720bE  ...    1932-04-29              Barrister
97     98  2fEc528aFAF0b69  ...    1994-12-28         Police officer
98     99  Adc7ad9B6e4A1Fe  ...    2012-04-12   Broadcast journalist
99    100  b8D0aD3490FC7e1  ...    2016-11-15  IT sales professional

AttributeError: module 'pandas' has no attribute 'read_csv' can mean two or more modules are importing each other. Be sure not to have a local file or folders that match import modules. Change your workspace.

Giving this code a try will point you in the right direction.

pyeri 51 Newbie Poster

You might be able to run it for now but at some point in future, Big Tech's surveillance capitalism model will ensure that Visual Studio 6.0 will eventually stop working on modern Windows versions.
The sane choice here is switching to an open source desktop development framework such as PySide/PyQt, Java Swing or Free Pascal (Lazarus IDE). Especially Free Pascal (a dialect of Delphi) is quite reminiscent of Visual Basic and should be quite easy to transition from VB6 with little effort.

trueframe -20 Light Poster

It's useful for customizing reports by criteria like dates or categories and enhancing data analysis and presentation.

JamesTechUSA 4 Newbie Poster

Try running VB6 in compatibility mode for Windows 7 and ensure all necessary dependencies are installed on your Windows 10 Home system.

fx.eko commented: The advice you gave can work well in Win 10 Professional version 22H2 (OS Build 19045.3208) Thank you @JamesTechUSA for your attention +4
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster

Personally, I'd use three separate (number) columns for this, combined with an INSERT trigger. The value you want to show can be a calculated column, combining the three into your display format of choice.

Bhopat 0 Newbie Poster

I am doing small vbproject that must auto generate id using the current year/month/autonumber in vb.net-(VISUAL STUDIO 2010) with MS SQL database. When the form load the autonumber should be displayed in text. And when it save, it should be saved in the database MSSQL. The id number should be like this eg: "2024/07/000000, 2024/07/000001" and so on. Please kindly help me as soon as possible. please. Thanks in advance.

Emma_42 4 Newbie Poster

you should be able to troubleshoot and potentially resolve the issue with compiling VB6 programs on your Windows 10 system. If the problem persists, consider using a more modern development environment or running VB6 on a more compatible operating system.

fx.eko commented: I've tested it by compiling a fairly complex VB6 program with 400 modules, and all the functions are working fine +4
JamesTechUSA 4 Newbie Poster

This might be a great idea if US government goes for software development and it should be related to Economic Forecasting. Such kind of software can help to every country in recession.

pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster

Shouldn't you pass a value to your parameter?

Dim param_allocatedjobs As New ReportParameter("allocated_jobs", True)

fx.eko 31 Junior Poster in Training

It turns out that the compilation problem in vb6 can be solved as long as it is in windows 10 Professional version 22H2 (OS Build 19045.3208)
Therefore, the computer should not always be connected to the internet, because Win 10 is always updated automatically and this can affect because what was still supported suddenly may no longer be supported

What you need to know is that with 4 GB of memory on the above version of win 10 it can still run well, and I managed to make the package deployment wizard

Thank you for the response from all of you, warm greetings from me

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

So sorry for being 3 years late here.

It means:

AttributeError: Partially initialized module 'pandas' has no attribute 'read_csv' (most likely due to circular import) I can't figure this out, what should I do?

Salem 5,265 Posting Sage
  1. Run the program in the debugger.
  2. Put a breakpoint on con.Open();
  3. Run the backup part of the program.
  4. Print the contents of the cmd string, after it's made all the runtime substitutions.

Is that string what you were expecting?

The spaces around your double-back-slash seem out of place.

R_4 14 Newbie Poster

By the way I am using sql server that bult-in in Visual Studio

R_4 14 Newbie Poster

THis is the error

System.Data.SqlClient.SqlException: 'An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.'

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What error?

R_4 14 Newbie Poster

Hi
What is wrong in my this backup code it always not working and gives me an error

 SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;
                                     AttachDbFilename=D:\repos\mysales\WindowsFormsApp4\Database1.mdf;
                                     Integrated Security=True;
                                     ");
 string database = con.Database.ToString();
 if (textBox1.Text == "") 
 {
     MessageBox.Show("Please Enter Backup File Location");
 }
 else
 {
     string cmd = "BACKUP DATABASE [" + database +"] To DISK = '"+ textBox1 .Text + " \\ " +"database"+"-"+ DateTime .Now .ToString ("yyyy-MM-dd--HH-mm-ss") +".bak'";
     con.Open();
     SqlCommand  command=new SqlCommand(cmd, con);
     command.ExecuteNonQuery();
     MessageBox.Show("Database Backup Done Seccessfully.");
     con.Close();
     button2.Enabled = false;
 }
rproffitt 2,701 https://5calls.org Moderator

Small world that it is, someone in my circle worked on such and went with a "close enough" solution for access control to an automatic gate. They went with a system that only had to match 5 out of 7 letters and numbers which was good enough for the system and site.

It appears that Halcon is commercial which may be why I haven't encountered it over Tensorflow/OpenCV and others.
If I were to try this today I'd test with OpenALPR.

Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

For those unfamiliar, they are using Halcon.

Is line 20 of your above code correct?

li_049 0 Newbie Poster

图片1.png
The value of the Class variable is '0' 'I' '0' 'H' '0' '4'
I hope the value of the Class variable is A' 'T' '0' 'H' '6' '9'
I tried using sort_region to sort SelectedRegions1, but it still didn't work

    read_image (Image1, 'C:/Users/29185/Desktop/图片1.png')
    get_image_size (Image1, Width, Height)
    dev_close_window ()
    dev_open_window (0, 0, Width, Height, 'black', WindowHandle)

    rgb1_to_gray (Image1, GrayImage)
    dev_display (GrayImage)

    gen_rectangle1 (Rectangle, 59, 49, 89, 159)
    reduce_domain (GrayImage, Rectangle, ImageReduced)

    threshold (ImageReduced, Regions, 98, 194)
    shape_trans (Regions, RegionTrans1, 'rectangle1')

    reduce_domain (GrayImage, RegionTrans1, ImageReduced1)

    orientation_region (RegionTrans1, Phi)
    Phi area_center (RegionTrans1, Area, Row, Column)
    vector_angle_to_rigid (Row, Column, rad(180)-Phi, Row, Column,0 , HomMat2D)
    ,Phi>0 , [rad(180)-Phi]
    affine_trans_image (Image1, ImageAffineTrans, HomMat2D, 'constant', 'false')
    reduce_domain (ImageAffineTrans, RegionTrans1, ImageReduced)

    threshold (ImageReduced, Regions1, 100, 215)
    connection (Regions1, ConnectedRegions)
    select_shape (ConnectedRegions, SelectedRegions1, 'area', 'and', 89.39, 169.58)

    read_ocr_class_mlp ('Industrial_0-9A-Z_NoRej.omc', OCRHandle4)

    do_ocr_multi_class_mlp (SelectedRegions1, ImageReduced, OCRHandle4, Class, Confidence)
    disp_message (WindowHandle, Class, 'window', 0, 0, 'black', 'true')