Print Page | Close Window

[RESOLVED] TaskDialog in C#.Net

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=20426
Printed Date: 02 August 2025 at 10:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [RESOLVED] TaskDialog in C#.Net
Posted By: Xander75
Subject: [RESOLVED] TaskDialog in C#.Net
Date Posted: 13 December 2012 at 11:12am
Hi,

I will be moving over to C#.Net sometime during the start of next year, this means all my current projects will at some point require to be coded over to C# from VB6.

I have been playing around with C# and can get most controls working as before, however I can't seem to get the TaskDialog to display.

When I step through, the code just passes over the line "TaskDialog.ShowDialog();" and nothing displays.

Does this work in C#?

TaskDialog.Reset();
TaskDialog.AddButton("Yes", 100);
TaskDialog.AddButton("No", 101);
TaskDialog.ContentText = "Can you read this message?";
TaskDialog.DefaultButton = 101;
TaskDialog.MessageBoxStyle = true;
TaskDialog.WindowTitle = "Test Message";
TaskDialog.ShowDialog();

I normally wrap a case statement around the .ShowDialog in this case it would be a switch statement but the code above as is doesn't fire.

PS. I can't see a TaskDialog sample to confirm if this works or not.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)



Replies:
Posted By: SuperMario
Date Posted: 07 January 2013 at 1:28pm
What version of .NET?  Your code works fine for me.  I tried in VS2008 and VS2012, both work fine.  Can you submit the project?


Posted By: Xander75
Date Posted: 08 January 2013 at 8:31am
Hi Supermario,

Thanks for checking this out for me!

I have only installed VS2012 Professional as of last night, prior to this I was playing about with VS2010 Express Edition. It would appear that this works as expected in VS2012 Professional and it was the Express Edition that was causing the issues with the CJ components!

On a further note this has also resolved my issue with the CalendarControl I was having too!!!

So beware of VS2010 Express Editions folks!!!


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net