473,382 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How display a Matrix by VB.NET

Hi all, this is my first time here and i'm not an expert.
The problem is that i have a .dll objetc which function is to generate random matrix (m*n), m =n.
I would display the matrix in a list view but i have a problem, when i use the object appera an error message :" Value of type Double cannot be converted to 1-dimensiona array...". What mean this error message?

The code is :
"
Private Size As Double 'Holds current matrix size
Private theMagic As magicdemo.magicdemoclass 'magic object instance

Private Sub Form_Load()
'This function is called when the form is loaded.
'Creates a new magic class instance.
On Error GoTo Handle_Error
Set theMagic = New magicdemo.magicdemoclass
Size = 0
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub

Private Sub btnCreate_Click()
'This function is called when the Create button is pressed.
'Calls the mymagic method, and displays the magic square.
Dim y As Variant
If Size <= 0 Or theMagic Is Nothing Then Exit Sub
On Error GoTo Handle_Error
Call theMagic.mymagic(1, y, Size)
Call ShowMatrix(y)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
"
Call theMagic.mymagic(1, y, Size), this is the line of code where appear the error message, aunder "Size"
How can pass the problem?
Thanks all in advance
Amartya

P.S.
The builder to generate the .dll component is Matlab, and i'm following an example built for VB6.
Jun 8 '07 #1
0 1430

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mathias | last post by:
Dear NG, I currently ty to switch from matlab to python/scipy but have a lot of trouble with images. What I need is a function for subsequently displaying a number of 2D-matrices as an image. I...
6
by: Ben Ingram | last post by:
Hi all, I am writing a template matrix class in which the template parameters are the number of rows and number of columns. There are a number of reasons why this is an appropriate tradeoff for...
5
by: Jason | last post by:
Hello. I am trying to learn how operator overloading works so I wrote a simple class to help me practice. I understand the basic opertoar overload like + - / *, but when I try to overload more...
1
by: Chi Pheo | last post by:
Hello! I am a C# beginner, so i have not worked well with some windows controls components. When I use Delphi to program, if i want to display a Matrix, I can use a StringGrid by setting the...
8
by: nineteen | last post by:
for example: 16/5: 3 -------- 5)16 15 -------- 1 the user input the dividend and divisor,the program should display the upright formula like the example. and , the program must use recursive...
9
by: Ben R. | last post by:
Hi guys, I've got a DB table of timecards with these fields in the table: ID (Int) UserID (Int) DateWorked (DateTime) HoursWorkedOnThatDate (Double) I'd like to display a grid, with...
2
by: DarrenWeber | last post by:
Below is a module (matrix.py) with a class to implement some basic matrix operations on a 2D list. Some things puzzle me about the best way to do this (please don't refer to scipy, numpy and...
0
by: DarrenWeber | last post by:
# Copyright (C) 2007 Darren Lee Weber # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
2
by: rijaalu | last post by:
I am designing a matrix class that performs addition, multicpication, substraction and division. When ever i complie the code it shows an error. include <iostream> using namespace std; class...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.