Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - [RESOLVED] TaskDialog in C#.Net
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[RESOLVED] TaskDialog in C#.Net

 Post Reply Post Reply
Author
Message
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Topic: [RESOLVED] TaskDialog in C#.Net
    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)
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.