2

What sort of code do i need to put in a button's can_execute() method in order to open a .chm help file i made for my lightswitch application and how will i make sure that even after publishing the whole application... the .chm file is transferred into the user's computer automatically and it stays in the right directory? ..... Thanks!

 partial void Help_Execute()
    {
        // Write your code here.

        if (AutomationFactory.IsAvailable)
        {
            dynamic shell = AutomationFactory.CreateObject("Shell.Application");
            shell.ShellExecute("C:/Users/Thuto/Documents/Visual Studio 2010/Projects/ElectricalContructors/ElectricalContructors/Client/Resources/SparkHelpDocumentation.chm", "", "", "open", 1);
        }
        else
        {
            this.ShowMessageBox("Automation not available");
        }

    }

After a hours of trying to find a better way i tried this and it worked but i want to know the proper way of doing it, thanks!

4

1 回答 1

0

这是一篇关于在客户端制作图像嵌入资源的文章。我没有用 .chm 尝试过,但我不明白为什么它不应该工作。

http://blogs.msdn.com/b/bethmassi/archive/2011/06/15/adding-static-images-and-text-on-a-lightswitch-screen.aspx

于 2012-05-30T14:43:46.770 回答