Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

c# EventHandler

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
vuser
Posts: 1
Joined: 22 May 2020, 15:18

c# EventHandler

Post by vuser » 22 May 2020, 15:20

Hello guys,

I'm maybe missing something with EventHandler on Ventuz ?

Here is an example of code i try, but TimerState didn't wait interval to change.
(same problem with using System.Windows.Timers instead of Forms)

Code: Select all

	System.Windows.Forms.Timer Timer1 = new System.Windows.Forms.Timer();
	bool TimerState;
	
	private void TimerEventProcessor(Object sender, EventArgs myEventArgs)
	{
		TimerState = false;
	}
	public bool OnMethod2(int arg)
	{
		Timer1.Interval = 3000;
		Timer1.Enabled = true;
		Timer1.Tick += new EventHandler(TimerEventProcessor);
		TimerState = true;
		return false;
	}

sribas
Posts: 34
Joined: 21 Oct 2016, 09:34

Re: c# EventHandler

Post by sribas » 25 May 2020, 09:11

no problem with this code, don't forget to use and add assembly
Windows.System.Forms;

Post Reply