473,406 Members | 2,620 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,406 software developers and data experts.

Call a procedure

How can I call a control procedure

call Timer1_Elapsed()

I get :

Argument not specified for paramter 'e' of Private
sub_Timer1_Elapsed(sender as Object, e as System.timers.ElapsedEventArgs)

Thanks in Advance,

Laurence Nuttall
Programmer Analyst III
UCLA - Division of Continuing Education

Nov 20 '05 #1
3 1552
Public Class Form1
Inherits System.Windows.Forms.Form

Private objTimer As New System.Timers.Timer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

AddHandler objTimer.Elapsed, AddressOf OnTimedEvent

objTimer.Interval = 1000
Dim objArgs As System.Timers.ElapsedEventArgs

OnTimedEvent(Me, objArgs)

System.Threading.Thread.CurrentThread.Sleep(2000)
objTimer.Start()
End Sub

Private Shared Sub OnTimedEvent(ByVal source As Object, ByVal e As
System.Timers.ElapsedEventArgs)
Console.WriteLine(Now.ToString & " Hello")
End Sub

"Laurence Nuttall" <Bl***@Bliff.com> wrote in message
news:OK*************@tk2msftngp13.phx.gbl...
How can I call a control procedure

call Timer1_Elapsed()

I get :

Argument not specified for paramter 'e' of Private
sub_Timer1_Elapsed(sender as Object, e as System.timers.ElapsedEventArgs)

Thanks in Advance,

Laurence Nuttall
Programmer Analyst III
UCLA - Division of Continuing Education

Nov 20 '05 #2
Cor
Hi Laurence,

When you are working with timers have a good look which one you use.

There are 3, mostly are used the system.timers.timer and the
system.windows.forms.timer
(The threading timer is the other one)

The work completly different and also the events signatures are different.

I hope this helps?

Cor
Nov 20 '05 #3
* Laurence Nuttall <Bl***@Bliff.com> scripsit:
How can I call a control procedure

call Timer1_Elapsed()

I get :

Argument not specified for paramter 'e' of Private
sub_Timer1_Elapsed(sender as Object, e as
System.timers.ElapsedEventArgs)


Remove the 'Call' and pass something for 'sender' and 'e', or even
better: Create a separate procedure and move the code from the 'Elapsed'
event handler to this procedure. Then call this procedure from the
'Elapsed' event handler and at any place you want the handling code to
be executed.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: Mariusz | last post by:
I want to write function to call another function which name is parameter to first function. Other parameters should be passed to called function. If I call it function('f1',10) it should call...
4
by: Jean-Marc Blaise | last post by:
Dear all, I have simulated the windows MULTI application with a java program calling the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or ZLinux. If the proc is NOT FENCED,...
1
by: news.onet.pl | last post by:
Hello! I have a small question concerning to the procedure call. I have the following procedure: private sub procedure_name (ByVal name1 as string) .... end sub When I call it I just...
0
by: IamtheEvster | last post by:
Hi All, I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am unable to call a MySQL stored procedure that returns output parameters using mysql, mysqli, or PDO. I'm having a...
3
by: harborboy76 | last post by:
I am calling the exact same stored procedure called myprocedure from 2 different boxes from the CLP, but I'm experiencing different behaviors between them. After I was unable to get any support...
4
by: Pakna | last post by:
Hi, is there any way to call a JAVA stored procedure from a SQL Trigger? We are having difficulties with this and cannot verify whether DB2 even *has* this capability? Thank you very much....
2
by: savio XCIX | last post by:
I created the following stored procedure: ======= CREATE PROCEDURE TBLNAME.proc_test (IN p_custnum VARCHAR(8), IN p_zipcode...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
12
by: barmatt80 | last post by:
I don't know if this is the right part of the forum. But.... I have been working all night trying to create a web service to call a stored procedure in sql server 2008. The stored procedure calls...
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.