Jump to content
  • Advertisement
Sign in to follow this  

Windows Forms C++ Syntax help

This topic is 3779 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to add my own idle function but this line is not valid. void App_Idle(System::Object sender, System::EventArgs e) Application::Idle += System::EventHandler(App_Idle); Error : cannot convert from 'void (__clrcall *)(System::Object,System::EventArgs)' to 'System::EventHandler' What am I missing ? heres the full code below,
#include "stdafx.h"
#include "Form1.h"

using namespace System;
using namespace BlackJackForm;

int i = 0; //is this legal code ?

void App_Idle(System::Object sender, System::EventArgs e) 

int main(array<System::String ^> ^args)
	// Enabling Windows XP visual effects before any controls are created
	Application::Idle += gcnew System::EventHandler(App_Idle); 
	i = 3;
	// Create the main window and run it
	Form1 ^MainForm;
	MainForm = gcnew Form1();

	return 0;

[Edited by - fishleg003 on February 18, 2008 7:11:54 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!