Send Data With Subroutine Calls And Functions

Oct 28, 2009

I am trying to send data and arrays using System.Object and System.Event. Lets say I have 4 pieces of data: date, y(1),y(2),y(3).

sub main(...)
Dim date,y(1),y(2),y(3) as integer
Dim obj as System.Object
Dim args as System.Eventargs

How do I organize obj with all the integer data above so I can send it to main2.

main2(obj,args)
end sub
Sub main2(obj as System.Object,args as System.Eventargs)
End Sub

And how do I apply this to (ByVal sender as System.Object, ByVal e as System.EventArgs). I am using VB.net 2005.

View 12 Replies


ADVERTISEMENT

Excel Maths Functions And Calls To All DLL Functions Documentation?

Jan 29, 2007

1) Is it possible to access the Excel mathematical functions without actually opening Excel?

I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?

2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?

Or for all those that Microsoft have chosen to document online at least.

View 1 Replies

Asp.net - Legacy ActiveX Control Calls DLL Functions?

Sep 1, 2010

Hint: this one might sound complicated, because I am trying to give as much info as possible, but I suspect that I just want someone to tell me "yes, you are correct".On this legacy system, which dates from 2002, the user visits a web page and uses an RFID reader to read a tag number, which is then written to an input field on the web page.

The only s/w that comes with the reader is a custom DLL, nop .exe. The very sparse documentation insists that only MSIE be used and that all security relating to ActiveX be disabled.When I look into the source of the web page I see calls to functions in the DLL.Now, here's the fun part: I know zilch about ActiveX, I have to make a minor change to the DLL _but_ the VB6 source code has been lost, so I guess that I have to recreate the (seemingly very simple) DLL from scratch - this week.

Decompiling the DLL shows me the functions (locateReader, getTagVal, closeReader). However, by decompiling I can't really know the number or type of the parameters, nor the return values ... and if anyone knows the API they are refusing to share it, but basically it all seems to have been lost in the mists of time as companies went bust, were bought & sold, merged & demerged and the initial DLL might have been written by an external guy, but no one knows who.So, can I get the function params & type from the ASP page source?I see things like

Reader = new ActiveXObject("<dllName>.Reader");
Reader.locateReader();
tagVal = Reader.getTagVal();
Reader.closeReader();

I would say that none of the fn()s take parameters, that closeReader doesn't have to return anything; it looks like locateReader doesn't return anything either, so I guess that error handling will have to be in the DLL (loop forever with a popup demanding that a reader be attached; and getTagVal seems to return a string.

View 1 Replies

Hooking Another Program's Calls To Winapi Functions ?

Oct 22, 2010

I have been trying to build a game bot in vb.net.One of the main problems is getting access to the text the game prints on the screen so I have been trying to hook the games calls to the windows api drawtext and textout functions.I have been hunting for examples of how to set up a hook in vb.net for a long time without any luck.I have found it impossible to translate examples in old school vb, C++, and C#.For convenience's sake I would like to use the freely available deviare and/or easyhook libraries.

View 2 Replies

VS 2010 - How To Track Duration Of Functions Calls

Feb 15, 2012

In our VB6 applications, we added a few utility functions for tracking the amount of time spent in a function. We did this to track performance bottlenecks. Basically, how it worked was there were two utility functions:
StartTickCount() and EndTickCount().

You would pass the name of the function in each, and the functions would use a dictionary to get the tick count when StartTickCount() was called, and then subtract the tick count when EndTickCount() was called. This wasn't perfect because it didn't of course take into consideration that calls to get tick count takes time, etc, but basically it worked for our purposes. How to make sure to call StartTickCount() at the beginning of each function and EndTickCount() at each exit point:

Private Function SomeFuction() as String
' indicate the function started
StartTickCount("MyClass.SomeFunction")
' some logic that causes the function to end
[Code] .....

Anyway, is there any functionality built in, either through the VS 2010 debugger or in the System.Reflection namespace, to do something similar in VB.NET? Basically, what I want is to log the number of times each function is called, the total amount to time spent in that function, the average number of seconds spent in that function, and the maximum amount of time spent in a single call in that function.

View 2 Replies

Send An Update To A Label Control During A Subroutine?

Mar 10, 2010

I want my code to do something that will require a bit of time. I want to be able to send an update to a label regarding the progress of the process during the length of the process, so that the user will know how far the progress has gone. Unfortunately, the label is only updated at the end of the process. I try to simulate it with a simple code below, where the label should be updated from 1 to 10, but it is only updated at 10, rather than 1, then 2, etc until 10. It does not help to show only the end!

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Cursor = Cursors.WaitCursor

[Code].....

View 3 Replies

Make A Root User Interface That "calls" The Functions And Subs Remotely?

May 25, 2010

I have an application that I am reworking. It has many reports and a pain to compile and roll out.I'd like to make a root user interface that "calls" the functions and subs remotely.I was concidering pulling them and making formless exe's of them, passing the needed criteria via command line. Yet still be able to update and control them.

View 4 Replies

Win32 API - Equivalent To Making System Calls Abd And Library Calls In UNIX?

May 8, 2010

What the Win32 API is? I have looked around but no where really outlines what it is. Is it basically a set of procedures, outlined by Microsoft for programmers in order to get services from the operating system? In essence is it the equivalent to making system calls abd and library calls in UNIX? And yes I now Windows makes library calls too.

View 2 Replies

Transfer Data From One Subroutine To Another?

Oct 23, 2009

I am trying to transfer data from one subroutine to another. This is not working "ByVal J(1) As Double, ByVal Max(2) As Double".

Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
...code
Call Data(ByVal J(1) As Double, ByVal Max(2) As Double)

[code]....

View 2 Replies

Replacing DbTransaction Calls With Calls To TransactionScope?

Mar 4, 2010

I have been using DBTransaction for my current projects that access a single database. However, I read some documentation on TransactionScope and was wondering in which scenario would using TransactionScope be better? Or should I be replacing DbTransaction calls with calls to TransactionScope?

View 2 Replies

Subroutine - Saving Data From ListView To TXT File

Mar 1, 2011

I have a subroutine which saves data from a listview to a txt file which is named "listview.txt". I want the file name to change each time I run the program, by putting the date and the match number into the file name instead of the word listview. I have a global variable called Todayda for the date and one called MatchNum for the match number. Is it possible to have variables in a file name? If so, how can I do it?

Attached is the code, which works fine otherwise.
Sub PermMatchRec()
Dim outputstream As New IO.StreamWriter("c:listview.txt", True)
Dim newstr(10) As String
Dim st As Short
Dim myint As Integer
[Code] ......

View 2 Replies

Where To Put Calls To Data Access Layer?

Feb 20, 2009

I am implementing a Data Access Layer (DAL), which is basically a set of classes with (VB.NET) Shared functions to actually execute the database (CRUD) calls. I am trying to figure out the best place to place the calls to the DAL within the class hierarchy. Let me give an example.Suppose I have a class Customer, with only standard ID, Name, Address1, etc. properties and maybe an overridden ToString function or so. I also have a DAL class with Shared methods, such as:[code]Would this be "cleaner" OOP? Or is it acceptable practice to let the presentation call the Dal, passing the business objects like my previous example:[code]

View 3 Replies

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

Passing Data Between Functions?

Jun 8, 2012

I would like to have custom methods to pass data between function, or to keep it in memory throughout the program.

Example:

Private function info()
Addr1 = addr1.text
Addr2 = addr2.text
City = city.text

[code]....

Could I run this function towards the beginning of the program and use it throughout until the form is disposed? I can't seem to get the information to stick once I get out of the function, I will need to use the same information multiple times throughout the application so I figured if I could make a function to keep the info rather than declaring the 5 lines in every option but anytime I call the method, it fills it correctly then when I get back to the main function the info goes back to 'nothing'. is it possible to pass data around between functions like you could in Java?

View 5 Replies

Flexible Data Sets For Functions

Nov 12, 2009

I have only 2 sets of "fixed" numbers used, that I need to be able to toggle between. Particularly, for array sizes/for loops. Is it best to use "Collections" in VB.NET to accomplish this?

View 5 Replies

Mathematic Functions As A Data Type?

Dec 11, 2009

I want to be able to have the user type in a function, say ,x^2 + 1, and have the computer store this such that it can be recalled and plug in a given value for x. For example, say they type in x+4, the program will then (in a bunch of different text boxes) return the value of x+4 when x = 1, x = 2, and so on up to x = 10. But how can I get it so that it will store x+4, be able to recall it and replace x with it's given value

View 2 Replies

VS 2010 Using API Functions - Understand Data Types?

Sep 29, 2010

I freely admit that I tend to avoid using API calls as much as possible I wish to use this API call

[Code]...

View 8 Replies

Pass Data Between Subroutines And Functions Using Public Classes?

Oct 31, 2009

I would like an overview of System.EventArgs. I have an understanding of System.Object where I can pass data between subroutines and functions using Public Classes. I am curious what EventArgs do?

View 3 Replies

.Net Framework 3.5 And 4.0 - Uses Basic Math Functions And Display The Data In Datagridviews

Jul 1, 2010

So im using the inno installer to set up my project and i found a nice script that will check and download 3.5 framework, but can't get it to work for 4.0 so my question is would i be able to compile my project in 3.5 and everything still work correctly?

My program just uses basic math functions and display the data in datagridviews. It uses webbrowser and other toolbox options. It doesn't use the registry and only creates one txt file.

View 1 Replies

Send Data From A Windows Form To An Aspx Page And Send Back A Response - Request.Form Vs Request.BinaryRead?

Mar 29, 2012

Im trying to send data from a Windows Form to an aspx page and send back a response. Im running around in circles trying to make this work. The data im trying to send is 4 strings. So fare I have this in my code, using the build-in webclient in visual studio 2010, in the windows form sending to the aspx

[Code]...

View 2 Replies

Get Listbox1 To Be The Selected Comport Used To Do The Send Data And Get Data Back

Nov 14, 2011

I have two issues I am trying to correct...First am trying to get my listbox1 to be the selected Comport used to do the send data and get data back.

My second issue is its requiring me to send two times to get my read data back as complete data and has odd shapes with the data I get back in front of and after the regular txt.

Beware, I am very new at this so please take it easy on me... Most help I did find was for older versions I only have the 2010 Visual studio Professional...

Public Class Form1
Sub GetSerialPortNames()

End Sub

[CODE]...

View 6 Replies

Creating A Gridview And Gather The Data From Various Functions That Return A Type Of IEnumerable?

Feb 28, 2012

I am creating a gridview and need to gather the data from various functions that return a type of IEnumerable. I've created gridviews using a dataset as a datasource, but how does one use multiple data sources(of IEnumerable) to populate one gridview? Like how do you combine all that into one dataset?

View 1 Replies

What Data Type Will Allow The User To Input 0 And Allow The Mathematical Functions To Work Properly

Mar 29, 2011

I am currently using double data types. The problem I am encountering is that sometimes the user will have to input a value of 0 in the required text box and this creates an error. My question is what data type will allow the user to input 0 and allow the mathematical functions to work properly. Decimals maybe?

View 8 Replies

Send Data To An Array With Different Data Type Declaration?

Apr 28, 2011

In order to re-sort the data received in USB easier, I send the data array received in USB (declared as Byte) to a temporary array (declared as SByte) to re-sort. I declared the temporary array as SByte just for easy sorting. After I compiled, an error message came up "make sure not divided by zero". I tried to use convert.SByte but still didn't help. Is it not allowed to send data to an array with different data type declaration?

View 1 Replies

Differences Between VB Functions And Convert.To* Functions?

Feb 19, 2009

While converting types, I have found myself using both VB functions and BCL Convert.To* methods.
E.g.)

Cstr() vs. Convert.ToString()
CInt() vs. Convert.ToInt32()
CDbl() vs. Convert.ToInt64()
etc...

Are there any subtle differences that should be noted?

View 1 Replies

[2005] MembershipUser Functions - See Exactly What The Functions Are Doing?

Mar 4, 2009

Is there a way to see exactly what the functions are doing. What i mean is there a way to see the class? I know what it does, i just want to know the code.
For example the function: Membership.FindUsersByName()

View 1 Replies

Send Data From PHP To C# Or .NET?

Sep 18, 2011

Today'm trying to pass a variable and an array of PHP to a desktop application, but I have no clue how to do it.To be more precise in my question I need PHP run the Desktop Application Developed in C # or VB.NET and send a variable.

View 2 Replies

How To Send Data On Email

Jan 25, 2009

i'm having difficulties on how to send data in email using VB.net i'm kind of newbie in VB.net!

View 2 Replies

How To Send Text Data Through Php

Sep 22, 2010

I am using this httpwebrequest, it where I am connecting to a site. So I cannot be able to send the text data to php.

Try
'Address of URL
Dim URL As String = "http://www.mysite.com/myscript.php"

[code].....

View 1 Replies

Send Data Between Subroutines?

Apr 22, 2011

I would like to send the variable "dst" from the Combobox1 sub to the Data sub. [code]...

View 1 Replies







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