Pass Array From One Form To Another

Nov 23, 2009

i got the output of my project and it is displayed in the RT BOX and saved locally.. the values are stored as arrays.. the RT Box will display three values time, conc and preconc.the time, conc and preconc values are stored as arrays. my problem is, i should pass this values to the next form FORM2.VB.. and display the values in a graphical format.how to pass these arrays from one form to other??

View 1 Replies


ADVERTISEMENT

Pass Array To Another Form?

Nov 4, 2009

how can u pass your array to another form

like example
FORM2
public test(2) as string
test(0) = "test1"

[Code]....

how can i get the value from the array test(0) in form 2 to in my textbox in form 1?

View 3 Replies

Pass An Array Of String When A System.Array Is Expected?

Feb 24, 2009

I am writing an OPC Client in VB.NET (2008) and I am using an OPC wrapper from Graybox. I am having some problems with the data types. I have an Array of String that contains all of the OPC Items that I wish to read from the OPC Server. When I attempt to use the Array of String, Option Strict causes the following compile error message:Error 5 Option Strict On disallows narrowing from type 'System.Array' to type '1-dimensional array of String' in copying the value of 'ByRef' parameter 'ItemIDs' back to the matching argument. How do I pass the Item ID's (all strings) in an array?

View 1 Replies

How To Pass Array As Argument

Mar 6, 2010

Does the following work in VB 2008 for passing an array to a function:
Public Function functionname(ByVal array1() As Short, ByVal array2() as Short) As Short
Also, can ByRef be used in place of ByVal?

View 2 Replies

How To Pass Array Between Two Subroutines

Feb 4, 2011

I have 2 arrays X(n) and Y(n) where n can vary programmatically, no set value. I want to pass these two arrays between two subroutines.

Sub sub1()
...
call sub2(X,Y,n)
end sub
sub sub2(x,y,n)
...
end sub

I want to know how to prepare the arrays for the "call sub2" and how to extract the arrays in "sub2".

View 5 Replies

How To Pass Array To Web Service

Jan 13, 2011

i have collection of data in an array. i need to pass it to web service as an array. how can i do that?

View 2 Replies

How To Pass One Dimensional Array To VC++ DLL

Jun 22, 2010

I have a VC++ DLL, which returns the sum of two long double values, passed as one dimensional array?l the right syntax to pass array to this dll from vb.net

currently, my code snippet is as follows: DllClass.vb
Imports System
Imports System.Collections.Generic

[code].....

View 1 Replies

Pass A 3D Array To Function?

Nov 20, 2009

I want to pass the entire array to the next function[code]...

View 3 Replies

Pass Array Value To A Function?

Jun 12, 2009

i need to pass array value to a function , here are the details

function MyTest(byval a as integer, byval b() as string)
if b is nothing
msgbox("no array")

[Code]......

View 3 Replies

Pass Out An Object Array In .NET?

Mar 25, 2011

I'm writing a wrapper class to expose a subset of the functionality of a .NET FTP library edtftpne from Enterprise Distributed Technologies.

When you call the edtftp's GetFileInfos method you get an array of FTPFile objects returned. I'm able to iterate through these but I don't know how to pass them on as a new and different object array containing only Name and Size for each file. Here's the code I have. Sorry it's a little confusing because I have my own class named FTPFile and the .NET library I'm using also has a class named FTPFile. I'm using both of them here. I should probably change the name of my class just to avoid confusion:

Public Function GetFileList() As FTPFile() Implements IFTP.GetFileList
Dim ftpfiles() As EnterpriseDT.Net.Ftp.FTPFile
ftpfiles = fCon.GetFileInfos 'Fill object array

[Code]....

I'd just pass on the object array that I'm getting from the GetFileInfos method but COM clients won't have access to the class/object EnterpriseDT.Net.Ftp.FTPFile without me rewriting it, I'm assuming.

View 1 Replies

.net - Pass COM Array To Managed Code?

Apr 7, 2011

I have a .Net application (VB in particular, although I would this to be as language agnostic as possible) that uses a COM object (made in C++). I need to implement a event in COM that passes a char array from C++ to .Net. I guess I need to convert the array to a managed array; How can I do this?

View 2 Replies

How To Pass Array Variable From Vba To Function

Mar 3, 2012

Im having a very difficult time trying to pass an vba array ive built from ms- access vba to a .net function.I don't have a com problem I can reference the library just fine from vba but and i can call a simple function from vba. however my problem exist when i attempt to try to pass an array to the vb.net function. vb.net code

View 3 Replies

Pass A Multidimensional Array To A Function?

Oct 29, 2010

I have a multidimensional array (not jagged array) that saves data from rows and columns of an excel spreadsheet. After it completes recording the data from Excel, I need to pass the array to another function.I understand how to pass a jagged array, but not a true multidimensional array.

Can someone point me in the right direction? I've done some searching on this site, and others, but most of the info only includes single dimension arrays or jagged arrays.

View 1 Replies

Pass An Array Literal To A Sub Routine?

Apr 2, 2009

Isn't there a way in VB to pass an array literal? Say the subroutine ask for an array of integers and you have just one. Can't you do something like

DoSomething({MyNum})
instead of
Dim MyNums as Integer() = {MyNum}
DoSomeThing(MyNums)

I'm thinking I'm just missing some adornment to the array literal inorder pass it.

View 4 Replies

Pass Array To Function As Parameter?

Dec 7, 2010

I would like to pass array to function as parameter. Here is an example for variable that is not array:

[Code]...

View 5 Replies

Pass Array Variable From Vba To Function?

Mar 1, 2012

Im having a very difficult time trying to pass an vba array ive built from access vba to a .net function. I dont have a com problem I can reference the library just fine from vba but and i can call a simple function from vba. however my problem exist when i attempt to try to pass an array to the vb.net function. vb.net code

<ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _
Public Class ComClass1
Public otag As String()

[code].....

View 1 Replies

Pass In Array To Select Case?

Dec 14, 2009

have a sub routine that I will create a string array dynamically. The XML is also listed,but it could be any of the values listed below. It will be something like this:

Dim offensiveLine() As String = New String() {"center", "right wing", "left wing"}
Dim defensiveLine As String = "defense"
Dim playerInfo = <Player><Name>John</Name><Position val="right wing"/></Player>

[code].....

View 2 Replies

Pass Subset Of An Array To Function?

Jun 25, 2010

I have a simple VB.Net Form that acts as an interface to a control library with a public API.

One of the API calls takes an Array of UIntegers ByRef:

Public Function Get_Values(source_id As Byte, first_value_address As Byte, number_of_values As Byte, ByRef valuesOut As UInteger()) As Integer

After the call, valuesOut will hold a list of values number_of_values long from source_id starting at first_value_address.

There is a hardware driven limitation that the max number of values returned is 15 regardless of requested length. I need to get 28 values into an array from my VB.Net code.

Is it possible to send only part of an array variable to the function similar to this C code?

uint[28] values;
Get_Values(0, 0, 15, values);//get first part
Get_Values(0, 15, 13, &values[15]); //get second part of data

View 3 Replies

VS 2008 Pass Array To Thread

Nov 4, 2009

Further to:- [URL] I now need to pass an array thus:- HTML

[Code]....

Myarray can be redimentioned. Since I need to pass an OBJECT to the thread how do I get the thread to recognise the passed array?

View 5 Replies

2008 Create Array And Pass It Using A Property

Apr 19, 2009

I am currently learning VB.net but for a project I need to create and array and pass it using a property. The data to be passed will be a train's destination, the time its due and the expected time of the train. I was wondering if someone could simplly explain how to first produce an array and then show how to pass it to a custom control

View 1 Replies

Pass An Array As Parameter To A Table Adapter?

Apr 26, 2010

is it possible to pass an array as a parameter to a table adapter at design time in wizard in vb.net.

View 4 Replies

Pass An Array Of Arrays As A Function Argument?

Nov 11, 2010

I have several parameters consisting of separate System.Byte() arrays. What I need is the syntax for a function declaration where the parameter is an array of arrays - I do not want to delve into System.Collections, and it's my preference not to CType each array into an Object and then back into a Byte().

Problem I'm having here is that:

Public Function MyFunc(arrayparam() As System.Byte) As System.Byte()

accepts a single-dimensional Array of individual Bytes.

Then Public Function MyFunc(arrayparam() As System.Byte()) As System.Byte()

View 12 Replies

Pass Array Variable Of IpAddresses To Sendkeys?

Sep 29, 2010

What I am trying to do is automate a telnet session. I have working code that uses Sendkeys but I dont see a way to pass my array variable of IpAddresses to sendkeys. Whats the best way to accomplish automating a telnet session and reading in an array of Ipaddresses. Have I overlooked something in what seems like it should be simple? Or will I have to use sockets?

View 3 Replies

Pass Integer Array To C++ Active Control?

Mar 12, 2009

I'm using VB.NET within Visual Studio 2008.I have a ActiveX control on my form that contains a method that takes an Array. In VB6 I just passed in the array and it was populated OK. When I do the same in VB.NET, I get a result but the value of each index appears to be a pointer.Here is the C++ method code...

void CMyCtrl::GetRowInfo(const VARIANT FAR& vArray, short sNumRows)
{
// Declaretemp array to put the row list into
short asRowList[24];

[code]....

Here is the VB code (same VB6 and VB.NET...

Dim maintRowList(0 To 23) As Integer
AxMyCtrl.GetRowInfo(maintRowList, 24)

In VB6, the value of maintRowList(0) is in the range 0 to Windows screen height(its a pixel value)In VB.NET the value of maintRowList(0) is a value that looks like a pointer to me (e.g 285671429).In VB.NET, the type of the 1st parameter is Object. In VB6 it is a Variant. I've tried AxMyCtrl.GetRowInfo(maintRowList(0), 24) and got the same result. I think I need to get a pointer to either the array or the first element of the array but I can't see a way to do that. how I can pass an array to this type of C++ ActiveX method?BTW - I cannot change the ActiveX code so the solution must be within VB.NET.

View 1 Replies

Pass String Array To Unmanaged Code In A Dll?

May 10, 2009

First of all; I'm completely new to VB.

Pass a string array from Visual Basic Express 2008 to unmanaged code in a Dll.The array is Dimmed as in DIM myArray(11) as String

I'm developing the dll myself using Powerbasic.

The dll expect a 4 bytes pointer to a safearray's handle. As far as I have understood it; the array's string elements must be passed in ANSI format. The code in the dll will then use OLE Api to get the LBound and Ubound of the array and the address of the first element in array.

View 2 Replies

Pass Structure Variable Array To Function?

Feb 2, 2012

I have a structure to hold a student name, an array to hold 5 test scores, and an average score. I have created an a array of structures for 6 students. User input is setup through text boxes. I want to calculate the average for each student. I have made a function to do this. What I am having trouble with is how to pass the array of test scores to the function.

Here is what I have so far:

CODE********
Public Const intMAX_STUDENTS As Integer = 6
Public Const intMAX_NUMTESTS As Integer = 5
Public student(intMAX_STUDENTS - 1) As StudentData

[Code].....

View 3 Replies

VS 2008 Pass An Array Between Private Subs?

Sep 4, 2009

I want to use a string array created in a different private sub in another, so I need to pass the array. How do I accomplish this task?

View 2 Replies

VS 2008 Pass BYTE Array Reference To C++ DLL From .NET?

Mar 9, 2010

C++ DLL MiFare.h has

MIFAREAPI_API unsinged short MIFAREAPICC MF_ReadCardBlock( DWORD dwBlkAdr, DWORD dwRdrKey, DWORD dwKeyAB, DWORD dwRspBufSz, BYTE *pRspBuf );

my decalre in VB is

<DllImport("MifareAPI.dll")> _
Private Shared Function MF_ReadCardBlock(ByVal BlkAdr As ULong, _
ByVal RdrKey As ULong, _

[code]....

but i can't get the correct data?

View 7 Replies

Pass An Array Of Objects As A Result But Excel Is Complaining?

May 6, 2012

I have created a COM Object via VB .NET and exposed some functions that I wish to call in Excel using VBA. I am currently trying to pass an array of objects as a result to VBA but Excel is complaining the following:

'Function or interface marked as restricted, or the function uses an automation type not supported in Visual Basic.'

I have looked around on the internet and have seen similar issues but not to one I am trying to do.My VB .NET function, which I wish to call in Excel is declared as follows:

Public Function CallArray(ByVal serviceName As String, _
ByVal effectiveDate As String,
ByVal serviceParams() As System.Object,
ByRef ArrayRes() As System.Object) As System.Boolean

VBA is complaining about the System.Objects my question is how the heck are you supposed to pass and return arrays from .NET to VBA. Also the data that will be in the ArrayRes() is mixed type, its not just strings etc, its an array of arrays that can contain strings, integers doubles etc.I chose VB .NET because I assumed it would be possible to map to VBA easier.if System. Object and Arrays in VB .NET is not the way, ie maybe theres another way via collections or lists, then Im open to that. I just need to get this data into VBA.Also I could move over to C# if needs be.

View 4 Replies

Pass And Access The Array Variable In Stored Procedures?

Jun 10, 2011

How can i pass and access the array variable in Stored Procedures

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved