<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7453757749735245978</id><updated>2011-11-27T15:16:24.473-08:00</updated><category term='Spambot Killer'/><category term='Visual Studio'/><category term='pab'/><category term='XSLT'/><category term='XSL'/><category term='capture problem'/><category term='Setup application'/><category term='Fatal error'/><category term='getChunk'/><category term='KiweeCommerce'/><category term='vs2008'/><category term='code 740'/><category term='helpProvider'/><category term='Peter Bromberg'/><category term='Dr. Explain'/><category term='ReportViewer'/><category term='capture solution'/><category term='User Access Control'/><category term='ecommerce module'/><category term='MS Office 2003 Primary Interop Assemblies check and install'/><category term='ASP.NET'/><category term='Publish application'/><category term='help generator'/><category term='Dynamic Reports'/><category term='anti-spam'/><category term='permissions'/><category term='hyperlink'/><category term='Dr.Explain'/><category term='bird spotting'/><category term='UAC'/><category term='ship spotting'/><category term='Inno Setup'/><category term='email'/><category term='spotting software'/><category term='merchant ship'/><category term='disable clickonce'/><category term='XsltArgumentList'/><category term='webcontrols'/><category term='TextBox'/><category term='MODx'/><category term='Kiwee'/><category term='.NET Framework check and download'/><category term='Visual C#'/><category term='2008'/><category term='create process failed'/><title type='text'>Developing, coding, etc</title><subtitle type='html'>I have mainly developed using PHP/MySQL using other languages, etc like Javascript, AJAX, CSS AND HTML/XHTML (currently teachmyself Flash). I have been building my first C# (.NET) application as well as learning some ASP.NET.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-1948883747742972594</id><published>2009-06-15T04:41:00.000-07:00</published><updated>2009-06-15T08:32:58.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual C#'/><category scheme='http://www.blogger.com/atom/ns#' term='XSL'/><category scheme='http://www.blogger.com/atom/ns#' term='Dynamic Reports'/><category scheme='http://www.blogger.com/atom/ns#' term='ReportViewer'/><category scheme='http://www.blogger.com/atom/ns#' term='XsltArgumentList'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Dynamically generated Visual Studio Reports</title><content type='html'>Although I was able to get reports generated using the ReportViewer I soon found that I needed the layout of these reports to be dynamically generated whether they were for a single record showing each required field on its own line or a group of associated records in a table format (but again showing only the required fields).&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;XSL/XSLT&lt;/h3&gt;I soon across Dan Shipe's blog &lt;a href="http://csharpshooter.blogspot.com/"&gt;C# Shooter&lt;/a&gt; with both C# and XSLT code to help the dynamic generation of reports, however this was geared towards web generated reports (WebForms) and I needed it for Windows Application (WinForms).&lt;br /&gt;Then I came across an answer of &lt;a href="http://stackoverflow.com/questions/267091/best-way-to-view-a-table-with-lots-of-columns"&gt;StackFlow by MusiGenesis&lt;/a&gt; (which referred to Dan's blog) and this proved to be what I needed. The code was provided me with the basis of what I needed (but still using Dan's XSL file).&lt;br /&gt;From this I was able to start dynamically generating reports.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Passing simple Parameters to XSL&lt;/h3&gt;Although the Dataset was being Transformed with the XSL file I needed other data to be added.&lt;br /&gt;I found somewhere about the XsltArgumentList class which would allow for the adding of parameters which would then be passed through the Transform process&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    xform.Transform(xmlDomSchema, xslArgs, writer);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Passing Array Parameters to XSL&lt;/h3&gt;After many attempts I figured out that the passing of an array was unlikely through the normal method and fortunately found &lt;a href="http://bytes.com/groups/net-xml/175869-there-way-pass-param-array-xslt-funtion-extended-object-xsl-thanks"&gt;Oleg Tkachenko's answer on the Bytes.com&lt;/a&gt; website.&lt;br /&gt;Here Oleg detailed the requirement 'to build XmlDocument or XPathDocument, then ask it to create XPathNavigator, select nodelist of values and pass it.'&lt;br /&gt;I soon implemented his code and after many attempts I began to understand what was happening and soon tweaked it so I could it a Dictionary list (thus giving me the key name of the field and the value of the column width - which would be summed and then ratioed and appended with 'cm').&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    public partial class frmReport_General_groups : Form&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        private DataSet ds;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        private XsltArgumentList xslArgs;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        private const decimal REPORT_WIDTH = 17.75m;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        public frmReport_General_groups(DataSet ds, int customerID, string customerName,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            string reportName,   Dictionary&amp;lt;string,int&amp;gt; columnWidth)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            InitializeComponent();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            this.ds = ds;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            reportName += "s";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            this.Text += reportName + " report : " + customerName +&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                " (" + customerID.ToString().PadLeft(6, '0') + ")";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs = new XsltArgumentList();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs.AddParam("reportWidth", "", REPORT_WIDTH.ToString()+"cm");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs.AddParam("reportName", "", reportName);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs.AddParam("customerName", "", customerName);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs.AddParam("customerID", "", customerID);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            //create XPathNavigator, select nodelist of values and pass it.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            StringWriter sw = new StringWriter();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XmlTextWriter w = new XmlTextWriter(sw);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            w.WriteStartElement("root");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            int totalWidth = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            foreach (KeyValuePair&amp;lt;string,&amp;gt; pair in columnWidth)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                totalWidth += pair.Value;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            foreach (KeyValuePair&amp;lt;string,int&amp;gt; pair in columnWidth)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                w.WriteElementString(pair.Key,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                    (REPORT_WIDTH * ((decimal)pair.Value / (decimal)totalWidth)).ToString("n2") +&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                    "cm");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            w.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            w.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            //XmlNodeWriter should be used instead of temporary string&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XPathDocument doc = new XPathDocument(new StringReader(sw.ToString()));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XPathNavigator navColumns = doc.CreateNavigator();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xslArgs.AddParam("navColumns", "", navColumns.Select("/root/*"));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        private void frmReport_General_groups_Load(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            string AppPath =  System.IO.Path.GetDirectoryName(&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            System.Reflection.Assembly.GetExecutingAssembly().Location);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            Stream rdlc = RdlcEngine.BuildRDLCStream(&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                ds, "general_groups", AppPath + "\\general_groups.xslt", xslArgs);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            reportViewer1.LocalReport.LoadReportDefinition(rdlc);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            reportViewer1.LocalReport.DataSources.Clear();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            reportViewer1.LocalReport.DataSources.Add(&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            new ReportDataSource(ds.DataSetName, ds.Tables[0]));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            reportViewer1.RefreshReport();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    public static Stream BuildRDLCStream(&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        DataSet data, string name, string reportXslPath, XsltArgumentList xslArgs)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        using (MemoryStream schemaStream = new MemoryStream())&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            // save the schema to a stream&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            data.WriteXmlSchema(schemaStream);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            schemaStream.Seek(0, SeekOrigin.Begin);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            // load it into a Document and set the Name variable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XmlDocument xmlDomSchema = new XmlDocument();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xmlDomSchema.Load(schemaStream);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xmlDomSchema.DocumentElement.SetAttribute("Name", data.DataSetName);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            // load the report's XSL file (that's the magic)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XslCompiledTransform xform = new XslCompiledTransform();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            xform.Load(reportXslPath);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            // do the transform&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            MemoryStream rdlcStream = new MemoryStream();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            XmlWriter writer = XmlWriter.Create(rdlcStream);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            if(xslArgs !=null) xform.Transform(xmlDomSchema, xslArgs, writer);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            else xform.Transform(xmlDomSchema, writer);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            writer.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            rdlcStream.Seek(0, SeekOrigin.Begin);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            // send back the RDLC&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            return rdlcStream;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I found that I needed to remove the TableColumn template call&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    &amp;lt;xsl:apply-templates select="xs:element" mode="TableColumn"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    &amp;lt;/xsl:apply-templates&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and instead put in it's place (the variable $navColumns being a parameter that had been passed)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    &amp;lt;xsl:for-each select="$navColumns"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        &amp;lt;TableColumn&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            &amp;lt;Width&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;                &amp;lt;xsl:value-of select="."&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;            &amp;lt;/Width&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        &amp;lt;/TableColumn&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    &amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Alias field names&lt;/h3&gt;The names being used for the Header titles were that of the field/column names which don't have spaces and thus look very poorly formatted. Finding the SQL doesn't like aliased names with spaces I decided to format spaces (based on a Field Alias column I already had that was loaded into the class record along with all the other field details) to underscores and hyphens to astericks and then when the XSL file was 'used' it would translate these back into spaces and hyphens accordingly thus giving me a workaround solution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-1948883747742972594?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/1948883747742972594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/06/dynamically-generated-visual-studio.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/1948883747742972594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/1948883747742972594'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/06/dynamically-generated-visual-studio.html' title='Dynamically generated Visual Studio Reports'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-8273921703946909493</id><published>2009-05-28T10:10:00.000-07:00</published><updated>2009-05-28T10:23:36.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spotting software'/><category scheme='http://www.blogger.com/atom/ns#' term='ship spotting'/><category scheme='http://www.blogger.com/atom/ns#' term='merchant ship'/><category scheme='http://www.blogger.com/atom/ns#' term='bird spotting'/><title type='text'>Merchant Shipping spotting/sighting software in development</title><content type='html'>A chance meeting in Glastonbury with a friend (John) who I hadn't seen for a number of years has lead me to starting the development of spotting software - which was something I had on my mind for a few months as a good projects to start using my new C#/.NET development skills.&lt;br /&gt;&lt;br /&gt;We meet up a few days ago and discussed the many spotting interests he has (birds, planes, ships, trains, etc) and birds and merchant ships came to the fore and soon it was decided to begin with Merchant Ships.&lt;br /&gt;&lt;br /&gt;Enthused by the wealth of information and knowledge of John had, I was soon planning the general look and structure of the application.&lt;br /&gt;&lt;br /&gt;Now a couple of days later (and another meeting showing John my mock up) I'll start coding the application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-8273921703946909493?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/8273921703946909493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/05/merchant-shipping-spottingsighting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/8273921703946909493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/8273921703946909493'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/05/merchant-shipping-spottingsighting.html' title='Merchant Shipping spotting/sighting software in development'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-4420648666737214602</id><published>2009-05-28T02:05:00.000-07:00</published><updated>2009-05-28T02:17:13.639-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='getChunk'/><category scheme='http://www.blogger.com/atom/ns#' term='MODx'/><category scheme='http://www.blogger.com/atom/ns#' term='Kiwee'/><category scheme='http://www.blogger.com/atom/ns#' term='KiweeCommerce'/><category scheme='http://www.blogger.com/atom/ns#' term='Fatal error'/><title type='text'>Kiwee - Fatal error: Call to a member function getChunk()</title><content type='html'>Installed &lt;a href="http://code.google.com/p/kiweecommerce/"&gt;Kiwee &lt;/a&gt;v1.0.7b onto the beginning of a new website (using &lt;a href="http://www.modxcms.com/"&gt;MODx &lt;/a&gt;cms) and soon found that when I clicked on the tabs of some of the management sections under KiweeCommerce that I was getting the following error:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold;"&gt;Fatal error:&lt;/span&gt; Call to a member function getChunk() on a non-object in &lt;span style="font-weight: bold;"&gt;C:\wamp\www\countryvintage\assets\&lt;br /&gt;snippets\shoppingCart\eCart\include\eValues.inc.php&lt;/span&gt;&lt;br /&gt;on line &lt;span style="font-weight: bold;"&gt;240&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I found that the line was trying to get a Chunk called 'gDiscountTplx' which was not installed under the HTMLSnippets section. Hunting through the 'installconfig.inc' file in the installation folder for HTMLSnippets I soon found that the problem was that although the entry existed the following (and last) Tpl file 'gCouponTplx' was incorrectly using the same index number for the $html array thus it was overwriting the details for 'gDiscountTplx' and therefore it was never to be installed.&lt;br /&gt;&lt;br /&gt;This has been fixed for the any new release (which should be called v1.0.8)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-4420648666737214602?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/4420648666737214602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/05/kiwee-fatal-error-call-to-member.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/4420648666737214602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/4420648666737214602'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/05/kiwee-fatal-error-call-to-member.html' title='Kiwee - Fatal error: Call to a member function getChunk()'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-9046365724857297902</id><published>2009-05-28T01:54:00.000-07:00</published><updated>2009-05-28T02:05:23.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce module'/><category scheme='http://www.blogger.com/atom/ns#' term='MODx'/><category scheme='http://www.blogger.com/atom/ns#' term='Kiwee'/><category scheme='http://www.blogger.com/atom/ns#' term='KiweeCommerce'/><title type='text'>KiweeCommerce - a renewed start after a long break</title><content type='html'>After a break from doing any development on Kiwee (&lt;a href="http://code.google.com/p/kiweecommerce/"&gt;KiweeCommerce&lt;/a&gt; - a Ecommerce module for the &lt;a href="http://modxcms.com/"&gt;MODx&lt;/a&gt; CMS Framework) I am now making a renewed start (though it may be filled with breaks as I am using the development of an ecommerce website, for which I'm doing as a favour, as a means to check through what I have added to Kiwee and what other bugs still need ironing out and features to smooth out and maybe introduce).&lt;br /&gt;&lt;br /&gt;I will attempt to comment on the progress of this work whether its solving bugs/issues or changing things or adding things (features, etc) through this blog and will do my best to respond to any queries and comments posted.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.blogger.com/%5C%5Cwww.visionscape.co.uk"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-9046365724857297902?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/9046365724857297902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/05/kiweecommerce-renewed-start-after-long.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/9046365724857297902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/9046365724857297902'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/05/kiweecommerce-renewed-start-after-long.html' title='KiweeCommerce - a renewed start after a long break'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-8381752607465791797</id><published>2009-05-22T03:38:00.000-07:00</published><updated>2009-05-22T04:20:50.350-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webcontrols'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Peter Bromberg'/><category scheme='http://www.blogger.com/atom/ns#' term='hyperlink'/><category scheme='http://www.blogger.com/atom/ns#' term='anti-spam'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='pab'/><category scheme='http://www.blogger.com/atom/ns#' term='Spambot Killer'/><title type='text'>Spambot KIller ASP.NET</title><content type='html'>It had got to the point in developing my first ASP.Net website (for my first C#/.Net application - Accommodation Booking System) that I needed to explore a good way of 'encoding' any email addresses on the website. I had seen this mentioned from time to time over the many years but it wasn't until looking for something else did I feel that now was the time to see what other people were doing/suggesting.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;ASP.NET Hyperlink Control&lt;/h3&gt;I soon found an article by Peter Bromberg called: &lt;a href="http://www.eggheadcafe.com/tutorials/aspnet/9817ba6f-ba00-4523-9097-f0235cdcb480/spambot-killer-aspnet-ma.aspx"&gt;Spambot Killer ASP.NET Mailto: Hyperlink Control&lt;/a&gt; where in Peter goes through some custom code that overrides certain Hyperlink functions and &lt;span style="font-style: italic;"&gt;"... convert everything into it's HTML Entity representation."&lt;/span&gt; thus making it difficult for spambots to recognize as an email address.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Registering the Custom Control&lt;/h3&gt;Not having had much experience of Custom Controls I was suddenly finding it difficult to figure out how to Register this new feature.&lt;br /&gt;&lt;br /&gt;Soon I found that the 'web.config' file could hold details of this and thus also making it globally available to the site, so I added the code under the 'controls' section&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: rgb(0, 153, 0);"&gt;&amp;lt;add tagprefix="pab" namespace="PAB.WebControls"&amp;gt;&amp;lt;/add&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and sure enough now my page that was trying to use it was no longer complaining and I could remove my attempt at trying to Register it before the HTML code.&lt;br /&gt;&lt;br /&gt;&amp;lt;pab:emaillink id="supportHyperLink" runat="server" tooltip="Support email address"&amp;gt;&lt;br /&gt;&lt;br /&gt;As you will notice I have missed out the NavigateURL attribute as well as Text. I have done this so I could add these in the code-behind file&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        supportEmail = ConfigurationSettings.AppSettings["SupportEmail"];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        supportHyperLink.Text = supportEmail;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;        supportHyperLink.NavigateUrl = "mailto:" + supportEmail;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The supportEmail variable is a public string that I declared in the Class. This has the value of a AppSetting called 'SupportEmail' from the web.config file and then this value is attributed to Text and  NavigateURL (prefixed with 'mailto:').&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&amp;lt;pab:emailLink ID="supportHyperLink" runat="server" ToolTip="Support email address" / &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Adding/Changing the EmailLink Class&lt;/h3&gt;I noticed (of course) that the Text generated (which in my case is also the email address) was kept as plain text and although the function had done the job of obfuscating/encoding  the email address as part of the hyperlink I calso needed the same process to happen to the Text attribute otherwise I would expect it would be all for nothing. I decided to change the else if relating to 'mailto:' code block under the Render function&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;link.NavigateUrl = HtmlObfuscate(link.NavigateUrl);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;writer.WriteAttribute("href", link.NavigateUrl);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;if(Text.IndexOf('@') &gt; -1) Text = HtmlObfuscate(Text);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;thus if the Text attribute is identified as having an '@' symbol in it it should be obfuscated as there is a good chance it is an email address.&lt;br /&gt;&lt;br /&gt;In addition to this I added&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;if (!string.IsNullOrEmpty(link.ToolTip))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;      if (link.ToolTip.IndexOf('@') &gt; -1) link.ToolTip = HtmlObfuscate(link.ToolTip);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;      writer.WriteAttribute("title", link.ToolTip);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;again to make sure if it appeared to be an email address within the ToolTip (if there it wasn't null or empty) that it was obfuscated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-8381752607465791797?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/8381752607465791797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/05/spambot-killer-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/8381752607465791797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/8381752607465791797'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/05/spambot-killer-aspnet.html' title='Spambot KIller ASP.NET'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-5015142226853285375</id><published>2009-05-01T07:31:00.000-07:00</published><updated>2009-05-01T08:37:45.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vs2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Inno Setup'/><category scheme='http://www.blogger.com/atom/ns#' term='User Access Control'/><category scheme='http://www.blogger.com/atom/ns#' term='create process failed'/><category scheme='http://www.blogger.com/atom/ns#' term='permissions'/><category scheme='http://www.blogger.com/atom/ns#' term='code 740'/><category scheme='http://www.blogger.com/atom/ns#' term='disable clickonce'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='2008'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Installing and Running VS2008 developed application with Vista's UAC enabled</title><content type='html'>&lt;h3&gt;The problems with UAC&lt;/h3&gt;After testing my new application developed in Visual Studio 2008 (with C#) and seeing it working on both my development machine (running Vista) and my laptop with XP I thought I had covered the basics of the main Windows OSes but then when testing it on another Vista machine I realised I had problems, and that problem was User Access Control (UAC).&lt;br /&gt;This hadn't been an issue on the development machine as I had UAC turned off (it bugged me too much - can't wait to see what Windows 7 various levels are like). So it was back to searching the net for help.&lt;br /&gt;After searching on the errors that appeared as soon as the application was trying to write to the registry or write to the database (lack of permissions  eg. 'Access to the database file is not allowed. [File name = ....'), I found mention of changing their permissions to overcome the errors. However, this didn't seem to work.&lt;br /&gt;I decided to do some proper testing on my development machine with UAC enabled and soon found an issue with a Cryptography process&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;rsa = new RSACryptoServiceProvider(cspParams);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;saying that the object already existed - this was possibly an issue, again, with UAC.&lt;br /&gt;More searches and then I seemed to start getting somewhere.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Application Manifest file&lt;/h3&gt;First I came across:&lt;br /&gt;&lt;a href="http://dariosantarelli.wordpress.com/2007/11/21/vs2008-embedding-uac-manifest-options/" title="Permanent Link to VS2008: Embedding UAC Manifest Options"&gt;VS2008: Embedding UAC Manifest Options&lt;/a&gt;then&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.professionalvisualstudio.com/blog/2007/10/05/enabling-your-application-for-uac-on-vista/"&gt;Enabling Your Application for UAC&lt;/a&gt;this latter article was just what I was looking for and (though I created the manifest per the former article). But like always another issue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ClickOnce doesn't like 'requireAdministrator'&lt;br /&gt;&lt;br /&gt;I had added my Application Manifest File (app.manifest), as suggested.&lt;br /&gt;Changed the 'requestedExecutionLevel' to make 'level=requireAdministrator', but now when I tried to build my application I was getting a critical error complaining about this new setting.&lt;br /&gt;Well then I need to disable ClickOnce as I'm deploying my application with Inno Setup - how do I disabled ClickOnce?&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Disabling ClickOnce&lt;/h3&gt;I found the following thread on &lt;a href="http://msdn.microsoft.com/en-us/default.aspx"&gt;MSDN &lt;/a&gt;&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/1ab8c838-d927-4a0d-ba08-4610c70775f3"&gt;How to remove "clickOnce" from an application&lt;/a&gt;where &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/user?user=TaylorMichaelL"&gt;TaylorMitchell &lt;/a&gt;advises to check both the Signing and Security tabs of the project's properties - there may have been one or two other pointers in the thread so if those two don't switch ClickOnce off read through the rest.&lt;br /&gt;&lt;br /&gt;Now with ClickOnce disabled I was able to continue with the previous article (&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.professionalvisualstudio.com/blog/2007/10/05/enabling-your-application-for-uac-on-vista/" rel="bookmark"&gt;Enabling Your Application for UAC)&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; and soon I had my application with the Vista security shield showing.&lt;br /&gt;&lt;br /&gt;After processing my application files as a setup file with my Inno configuration I found my last hurdle with UAC (well I hope it is :)).&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create Process failed; code 740&lt;/h3&gt;After the setup process came to an end and it then tried to launch my application the following error message showed&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;Unable to execute file&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;c:\ .....&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Create Process failed; code 740.&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;&lt;br /&gt;The requested operation requires elevation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After more Googlings I soon found that the answer was down to a near simple running the setup &lt;/span&gt;&lt;span style="font-size:100%;"&gt;program&lt;/span&gt;&lt;span style="font-size:100%;"&gt; as an Administrator (right-clicking on it and selecting 'Run as administrator').&lt;br /&gt;&lt;br /&gt;This worked. The setup program completed as expected and then launched my application. The application ran without the errors that showed in relation to writing to the database or the registry - registry entries are being written using &lt;/span&gt;Cryptography process on every use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-5015142226853285375?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/5015142226853285375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/05/installing-and-running-vs2008-developed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/5015142226853285375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/5015142226853285375'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/05/installing-and-running-vs2008-developed.html' title='Installing and Running VS2008 developed application with Vista&apos;s UAC enabled'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-1212124150664594212</id><published>2009-04-16T06:20:00.000-07:00</published><updated>2009-04-17T07:55:43.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework check and download'/><category scheme='http://www.blogger.com/atom/ns#' term='Inno Setup'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Setup application'/><category scheme='http://www.blogger.com/atom/ns#' term='MS Office 2003 Primary Interop Assemblies check and install'/><category scheme='http://www.blogger.com/atom/ns#' term='Publish application'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Inno Setup - a simple, free setup program</title><content type='html'>Another first when developing my C# application was considering how I was going to publish it.&lt;br /&gt;&lt;br /&gt;Although there is a Publish tool in Visual Studio/C# and it seemed simple (with lots of extras - some of which I knew I would have to read up on) there was one issue I seemed to find hard to get around and much Googling seemed to show that other people were saying the same thing.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Inclusion of .NET download feature&lt;/h3&gt;Yes, how do you include this. There was talk about using Visual Studio (2008) Setup and Depolyment Templates - I followed one or two tutorials and soon gave up when I didn't seem to have any idea of where you could (or how you could) add the ability for the system not only to download the required .NET Framework but to check the users system to see if existed and if so then to bypass the download.&lt;br /&gt;&lt;br /&gt;Several hours of searching online and reading peoples comments and thinking I was almost there I came to the conclusion that there seemed to be one Setup application that was a front runner when I found details (code) that would allow the users system to be checked before consdiering whether the .NET download was required.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Inno Setup&lt;/h3&gt;&lt;a href="http://www.jrsoftware.org/isinfo.php"&gt;Inno Setup&lt;/a&gt; (&lt;a href="http://www.jrsoftware.org/"&gt;Jordan Russell's Software&lt;/a&gt;) was the one that appeared to be the answer. Not only was it getting sufficient praise/recommendation but it appeared to be both not overly difficult to program but also because of its program nature had the ability to offer good download conditioning.&lt;br /&gt;&lt;br /&gt;I had soon installed Inno Setup Compiler (v 5.2.3) and was beginning my education in its way of setting up the process of the Setup program through it's INI structure.&lt;br /&gt;&lt;br /&gt;The numerous examples and those found online plus the help documentation allowed me to get started and soon I had created a Setup app that allowed for the checking and then (if required) the downloading/installing of .NET 3.5 framework.&lt;br /&gt;&lt;br /&gt;Then I added to this the need to check for and install the following&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SQL Server Compact Edition 3.5 SP1 (file: SSCERuntime-ENU-x86.msi)&lt;/li&gt;&lt;li&gt;Report Viewer 2008 SP1 (file: reportviewer.exe)&lt;/li&gt;&lt;li&gt;MS Office 2003 Primary Interop Assemblies (file: O2003PIA.MSI)&lt;/li&gt;&lt;/ul&gt;With these last three I couldn't figure out from the MS website whether they should be downloaded (which is stated by them and other people in relation to the .NET framework) and as such I have included them as files which are installed (again if certain Registry enteries are missing - the latter one I had to work out as I couldn't find it in my searches on the internet).&lt;br /&gt;&lt;br /&gt;For a FREE piece of software and with what was available (examples and other peoples work plus the supporting documentation) the Inno Setup application is just perfect to allow me to get started 'delivering' my first proper application.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/assets/docs/ams.iss"&gt;The ISS file.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/" title="Website and Software development"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-1212124150664594212?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/1212124150664594212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/04/inno-setup-simple-free-setup-program.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/1212124150664594212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/1212124150664594212'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/04/inno-setup-simple-free-setup-program.html' title='Inno Setup - a simple, free setup program'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-5367909097639176020</id><published>2009-04-16T06:05:00.000-07:00</published><updated>2009-04-17T07:56:18.312-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TextBox'/><category scheme='http://www.blogger.com/atom/ns#' term='capture problem'/><category scheme='http://www.blogger.com/atom/ns#' term='help generator'/><category scheme='http://www.blogger.com/atom/ns#' term='capture solution'/><category scheme='http://www.blogger.com/atom/ns#' term='Dr. Explain'/><title type='text'>Dr. Explain not capturing all fields - problem fixed</title><content type='html'>In the initial stages of using &lt;a href="http://www.drexplain.com/"&gt;Dr. Explain&lt;/a&gt; I was 'blown away' by the way it itemised all the fields (with an exception of a few fields), I soon found myself finding that I was having problems with almost no fields being captured.&lt;br /&gt;&lt;br /&gt;I realised that the screen captured before had little or no TextBox fields and this seemed to be the issue. After much playing around with the layout of the Windows Form to see if that was the issue I decided it was time to ask for help to see if there was something I could change in Dr. Explain or the layout of my application to fix the issue (I was certianly hoping it would be the former).&lt;br /&gt;&lt;br /&gt;After submitting my issue to Dr. Explain I very soon (within 24hrs) had a reply from Dennis (Dr. Explain Team) asking if h could see the 'offending' application.&lt;br /&gt;&lt;br /&gt;after a few days spent by me stripping the application down to just one of the 'offending' forms I emailed it off to Dennis (Friday) and (on my Sunday) received a reply with a solution to my issue.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"The easiest way to overcome the issue is to capture your GUI in Win32 mode. Simply unselect the third check box (Accessible objects) in 'Capture an object' dialog. So, all your editbox will be recognized."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And sure enough this resolved my issue.&lt;br /&gt;&lt;br /&gt;It's always good to know that not only when you buy a product like this you are getting a very useful tool that helps simply and speed up a process that could be so terrible in the time and complexity, but that there are people (like Dennis) who offer such speedy and helpful support (thanks again Dennis).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/" title="Website and Software development"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-5367909097639176020?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/5367909097639176020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/04/dr-explain-not-capturing-all-fields.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/5367909097639176020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/5367909097639176020'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/04/dr-explain-not-capturing-all-fields.html' title='Dr. Explain not capturing all fields - problem fixed'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7453757749735245978.post-4625798914664044332</id><published>2009-03-29T08:14:00.000-07:00</published><updated>2009-04-17T07:56:51.638-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='helpProvider'/><category scheme='http://www.blogger.com/atom/ns#' term='help generator'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Dr.Explain'/><category scheme='http://www.blogger.com/atom/ns#' term='2008'/><title type='text'>Adding Help to Visual Studio 2008 application with Dr.Explain</title><content type='html'>&lt;span style="color: rgb(102, 102, 102);"&gt;Feeling that, although not fully completed, it was about time to move from the core development of my first C# application (Accommodation Management System) I found that there were a number of areas I needed to investigate/learn - one of these was creating the Help feature of the application.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;I trawled through the Net, like you do, trying to find a glimmer of guidance on what you use, where you start from, tutorials, anything and everything with relation to Visual Studio (preferably 2008) and Help files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;I eventually turned up with the usual &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;MSDN&lt;/span&gt; pages and other sites with their wares/apps.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Firstly I tried the MS tutorials (in conjunction with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Innovasys&lt;/span&gt; Help Studio Lite) and although &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;HelpStudio&lt;/span&gt; Lite potentially seemed very impressive I felt somewhat despondent by the way that the help files had to be '&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;integrated&lt;/span&gt;' with the Visual Studio project - several command line entries and additional code that to me as a recent beginner of C# made me reel - there had to be a better way even if it meant not having something that wasn't quite so fancy as MS Help 2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Soon I was surfing and reading more entries but still it was very hard (if not impossible) to find anything that shouted Visual Studio and Help files/generator (or not at least as I was looking for). Soon I decided that I had trawled enough and I have found a select few possible apps to help and read through them and downloaded their software to trial. It wasn't long before I began to realise which appeared to be offering me hope.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.drexplain.com/"&gt;&lt;span style="font-weight: bold;"&gt;Dr. Explain &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Although there was some information I found it to scarce for me to again understand whether this would do what I wanted - or probably more likely would I be able to understand what I would need to do with it for it to give me the end result (a simple help generator that I could 'link' to my project/app).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Well like any good new experience I've had my moments of frustration not being able to understand what certain things did and what I had to do through Visual Studio but since installing it late last night (less than 24 hours ago) I have had my moments of feeling wonder and bliss at finding something that I have been able to use that meets my requirements (yes its quite possible that I am not using it to its full extent but I feel that I have a good base in which to explore and get more out of it).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 102, 102);"&gt;How does it work with Visual Studio 2008?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;... I can &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;almost&lt;/span&gt; hear you say (well I certainly wish I could have heard someone say for me several days ago).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;I was fortunate to come across some interesting posts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.donationcoder.com/Forums/bb/index.php?topic=8933.msg65446#msg65446"&gt;Dr.Explain Mini-Review&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; a 'mini' review by &lt;/span&gt;&lt;a href="http://tinjaw.dcmembers.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;tinjaw&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; on the &lt;/span&gt;&lt;a href="http://www.donationcoder.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;DonantionCode&lt;/span&gt;.com&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; website.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.help-info.de/en/Visual_Basic_net/vbnet_htmlhelp.htm"&gt;Help for controls with VB .NET&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; from the &lt;/span&gt;&lt;a href="http://www.help-info.de/en/welcome.htm"&gt;Help Information&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; website&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;The first inspired me and the latter with its screenshots/examples gave me some idea&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;&lt;/span&gt; of what I should be looking at and even doing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;My steps (in brief)&lt;/span&gt;&lt;br /&gt;&lt;ol style="color: rgb(102, 102, 102);"&gt;&lt;li&gt;When creating your help file (CHM) with Dr. Explain ensure that all the objects that you want to reference from your project/app has an Anchor string - this is available when you click on the object and is under the Properties section just below the Title property).&lt;/li&gt;&lt;li&gt;Save your CHM file by clicking on the Generate CHM icon (the second/middle icon with the green up arrow on the toolbar).&lt;/li&gt;&lt;li&gt;Ensure that you have the correct path for the HTML Help Workshop folder (otherwise download/install before proceeding).&lt;/li&gt;&lt;li&gt;Click Start export and you will be asked to browse where you want the CHM file to be saved.&lt;/li&gt;&lt;li&gt;In Visual Studio drag a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;HelpProvider&lt;/span&gt; component from the Toolbox onto your form.&lt;/li&gt;&lt;li&gt;Click the on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;helpProvider&lt;/span&gt;1 component(which should be under your form) and open its properties window. Set the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;HelpNamespace&lt;/span&gt; to the location of the CHM file you created.&lt;/li&gt;&lt;li&gt;Select a control on the form which created an Anchor reference for.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Change the setting for '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;HelpKeyword&lt;/span&gt; on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;helpProvider&lt;/span&gt;1' to the format [Window Topic name].&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;htm&lt;/span&gt;#[&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_14"&gt;Anchor&lt;/span&gt; name of Control] (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;eg&lt;/span&gt;. 'main_screen.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;htm&lt;/span&gt;#address').&lt;/li&gt;&lt;li&gt;Change the setting for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;HelpNavigator&lt;/span&gt; on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;helpProvider&lt;/span&gt;1' to 'Topic'.&lt;/li&gt;&lt;li&gt;Select the form and change the '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;HelpButton&lt;/span&gt;' setting to 'True' - this will then show the '?' icon at the top-right of the form.&lt;/li&gt;&lt;/ol&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Run your project and you should be able to select the '?' icon and then click on the control that you changed the Help settings of and the Help file (CHM) should load with the related Help topic (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;eg&lt;/span&gt;. 'main_screen') with the relevant object showing near the top (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;eg&lt;/span&gt;. 'address') - just like a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;webpage&lt;/span&gt;. F1 key also works the same way but will actioned the focused object. As this was problem then to get the form (and thus the main part of the Help Window showing as opposed to the individual objects) I added a Help option in my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;MenuStrip&lt;/span&gt; with the following code for the item when clicked:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;private void &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;helpContentsToolStripMenuItem&lt;/span&gt;_Click(object sender, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;            Help.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;ShowHelp&lt;/span&gt;(this, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;helpProvider&lt;/span&gt;1.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;HelpNamespace&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;HelpNavigator&lt;/span&gt;.Topic, "main_screen.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;htm&lt;/span&gt;"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 102, 102);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(102, 102, 102);"&gt;Final thoughts on Dr. Explain&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Again its early days but I am very happy to have found Dr. Explain as I have now been able to implement a Help system into my application.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Maybe I'm easily amazed and having not explored the other Help 'generators' in part or full I'm not sure whether it is part of the other packages but when I first tried to add a Window and it launched the capture utility (and had a couple of miss tries - the first locked up and the other was a mouse action that gave me the wrong result) and then presented me with the image I was wowed by it labelling with its objects almost all of the objects from the Form it captured - I do love things like this that make work so much easier and fun.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://tinjaw.dcmembers.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;tinjaw&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(102, 102, 102);"&gt; has given a much more &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_32"&gt;in depth&lt;/span&gt; look at Dr. Explain and I'm not going to try to do anything like that. I'm very happy (as you probably guessed) but I know at the same time that over time and given time to ponder and compare I could probably could say issues that need addressing but what software doesn't.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;Hopefully this has proven usual even if its just for one person.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;a href="http://www.visionscape.co.uk/" title="Website and Software development"&gt;Visionscape&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7453757749735245978-4625798914664044332?l=richardn66.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://richardn66.blogspot.com/feeds/4625798914664044332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://richardn66.blogspot.com/2009/03/adding-help-to-visual-studio-2008.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/4625798914664044332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7453757749735245978/posts/default/4625798914664044332'/><link rel='alternate' type='text/html' href='http://richardn66.blogspot.com/2009/03/adding-help-to-visual-studio-2008.html' title='Adding Help to Visual Studio 2008 application with Dr.Explain'/><author><name>richardn66</name><uri>http://www.blogger.com/profile/15208473748505617958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
