<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clarion Edge &#187; Windows</title>
	<atom:link href="http://www.clarionedge.com/category/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clarionedge.com</link>
	<description>Get an Edge with Clarion!</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:58:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Hosting WPF user control in 2.0 WinForms</title>
		<link>http://www.clarionedge.com/windows/development/hosting-wpf-user-control-in-2-0-winforms.html</link>
		<comments>http://www.clarionedge.com/windows/development/hosting-wpf-user-control-in-2-0-winforms.html#comments</comments>
		<pubDate>Mon, 06 Feb 2012 13:52:47 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Addins]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Examples]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=1057</guid>
		<description><![CDATA[&#160;
Ok, so before you ask why on earth would you bother let me explain  
As part of my work over at ClarionAddins I am always looking for way to improve the user experience as [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Ok, so before you ask why on earth would you bother let me explain <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As part of my work over at <a href="http://clarionaddins.com/" target="_blank">ClarionAddins</a> I am always looking for way to improve the user experience as well as stretching my knowledge of .Net programming. I thought it might be nice to use WPF but since the Clarion IDE is targeting v2.0 of the .Net framework this is not so easy. Hence this example!</p>
<p>Of course there are many resources out there related to this topic, see below, but nothing I could discover specific to v2.0 so for me it took a little work to get there. I learnt a lot about reflection along the way!</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms742215.aspx" target="_blank">Walkthrough: Hosting a WPF Composite Control in Windows Forms</a> </li>
<li><a href="http://www.switchonthecode.com/tutorials/wpf-tutorial-using-wpf-in-winforms" target="_blank">WPF Tutorial &#8211; Using WPF In WinForms</a> </li>
<li><a href="http://wrb.home.xs4all.nl/Articles/Article_WPFViewerXAML_02.htm" target="_blank">A XAML graphics viewer and validator for Windows Forms</a> </li>
</ul>
<p>This code assumes that the v3.5 Framework is installed on the target machine. For production it would of course be necessary to test for this and react accordingly.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Reflection</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Forms</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> ClarionAddins<span style="color: #008000;">.</span><span style="color: #0000FF;">WpfTest</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">partial</span> <span style="color: #6666cc; font-weight: bold;">class</span> WpfTestForm <span style="color: #008000;">:</span> Form
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> WpfTestForm <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            InitializeComponent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            AddWpfControl<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> AddWpfControl<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #008080; font-style: italic;">// You need a full AssemblyQualifiedName for the elementHost class</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> elementHostQualifiedName <span style="color: #008000;">=</span> <span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>System<span style="color: #008000;">.</span><span style="color: #0000FF;">Windows</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Forms</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Integration</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ElementHost</span>, WindowsFormsIntegration, Version<span style="color: #008000;">=</span>3<span style="color: #008000;">.</span>0<span style="color: #008000;">.</span>0<span style="color: #008000;">.</span>0, Culture<span style="color: #008000;">=</span>neutral, PublicKeyToken<span style="color: #008000;">=</span>31bf3856ad364e35<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;;</span>
            <span style="color: #008080; font-style: italic;">// Using this it is possible to load the ElementHost class at runtime and create an instance we can use</span>
            Type elemHostType <span style="color: #008000;">=</span> Type<span style="color: #008000;">.</span><span style="color: #0000FF;">GetType</span><span style="color: #008000;">&#40;</span>elementHostQualifiedName, <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">object</span> ctrlHost <span style="color: #008000;">=</span> Activator<span style="color: #008000;">.</span><span style="color: #0000FF;">CreateInstance</span><span style="color: #008000;">&#40;</span>elemHostType<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008080; font-style: italic;">// Dock this ElementHost into our WinForms control container</span>
            MethodInfo info <span style="color: #008000;">=</span> elemHostType<span style="color: #008000;">.</span><span style="color: #0000FF;">GetMethod</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>Dock<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            elemHostType<span style="color: #008000;">.</span><span style="color: #0000FF;">GetProperty</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>Dock<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SetValue</span><span style="color: #008000;">&#40;</span>ctrlHost, DockStyle<span style="color: #008000;">.</span><span style="color: #0000FF;">Fill</span>, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008080; font-style: italic;">// Finally, add the ElementHost to the WinForms list of controls</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Controls</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>Control<span style="color: #008000;">&#41;</span>ctrlHost<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Now, load the WPF UserControl to be displayed</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> currentPath <span style="color: #008000;">=</span> Path<span style="color: #008000;">.</span><span style="color: #0000FF;">GetDirectoryName</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Uri</span><span style="color: #008000;">&#40;</span>Assembly<span style="color: #008000;">.</span><span style="color: #0000FF;">GetExecutingAssembly</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">CodeBase</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">AbsolutePath</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> userControlPath <span style="color: #008000;">=</span> Path<span style="color: #008000;">.</span><span style="color: #0000FF;">Combine</span><span style="color: #008000;">&#40;</span>currentPath, <span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>WpfControlLibrary<span style="color: #008000;">.</span><span style="color: #0000FF;">dll</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Assembly assembly <span style="color: #008000;">=</span> Assembly<span style="color: #008000;">.</span><span style="color: #0000FF;">LoadFrom</span><span style="color: #008000;">&#40;</span>userControlPath<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Type userControlType <span style="color: #008000;">=</span> assembly<span style="color: #008000;">.</span><span style="color: #0000FF;">GetType</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>WpfControlLibrary<span style="color: #008000;">.</span><span style="color: #0000FF;">MyUserControl</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>, <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008080; font-style: italic;">// Create an instance of the UserControl and call the InitializeComponent method</span>
            <span style="color: #6666cc; font-weight: bold;">object</span> userControl <span style="color: #008000;">=</span> Activator<span style="color: #008000;">.</span><span style="color: #0000FF;">CreateInstance</span><span style="color: #008000;">&#40;</span>userControlType<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            info <span style="color: #008000;">=</span> userControlType<span style="color: #008000;">.</span><span style="color: #0000FF;">GetMethod</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>InitializeComponent<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            info<span style="color: #008000;">.</span><span style="color: #0000FF;">Invoke</span><span style="color: #008000;">&#40;</span>userControl, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Last of all, attach the UserControl to the ElementHost !</span>
            elemHostType<span style="color: #008000;">.</span><span style="color: #0000FF;">GetProperty</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>Child<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SetValue</span><span style="color: #008000;">&#40;</span>ctrlHost, userControl, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Here is a screenshot of this technique being used in an addin I am working on:</p>
<p><a href="http://www.clarionedge.com/wp-content/uploads/image66.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px 15px 3px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WPF UserControl in an Addin Pad!" border="0" alt="WPF UserControl in an Addin Pad!" src="http://www.clarionedge.com/wp-content/uploads/image_thumb58.png" width="229" height="244" /></a></p>
<p>-brahn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/development/hosting-wpf-user-control-in-2-0-winforms.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native Clarion in the Cloud (Azure)</title>
		<link>http://www.clarionedge.com/clarion/native-clarion-in-the-cloud-azure.html</link>
		<comments>http://www.clarionedge.com/clarion/native-clarion-in-the-cloud-azure.html#comments</comments>
		<pubDate>Thu, 05 Jan 2012 20:02:51 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Clarion]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=1034</guid>
		<description><![CDATA[&#160;
The following is a simple example of running a native clarion win32 application as a cloud service.
Technologies used:

Clarion6 by Softvelocity (C7, C8 whatever should work fine)
NetTalk by Capesoft
Windows Azure by Microsoft

For the Impatient
See it running [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>The following is a simple example of running a native clarion win32 application as a cloud service.</p>
<p>Technologies used:</p>
<ul>
<li>Clarion6 by <a href="http://www.softvelocity.com/" target="_blank">Softvelocity</a> (C7, C8 whatever should work fine)</li>
<li><a href="http://www.capesoft.com/accessories/netsp.htm" target="_blank">NetTalk</a> by Capesoft</li>
<li><a href="http://www.microsoft.com/windowsazure/learn/get-started/" target="_blank">Windows Azure</a> by Microsoft</li>
</ul>
<h3>For the Impatient</h3>
<p>See it running – <a href="http://wazclariontest.cloudapp.net/" target="_blank">WazClarion</a> (Waz – <strong>W</strong>indows <strong>Az</strong>ure!)</p>
<h3>Say what?!</h3>
<p>Using the PackAndDeploy example from the Smarx <a href="http://blog.smarx.com/posts/tutorial-running-the-mongoose-web-server-in-windows-azure" target="_blank">Running the Mongoose Web Server in Windows Azure</a> tutorial I have managed to successfully test and deploy a clarion application to the Windows Azure cloud service! Read on for some more info on the steps involved. Leave a comment or send me an email if you have any questions.</p>
<h3>Prerequisites</h3>
<p>Install the <a href="http://www.microsoft.com/windowsazure/learn/get-started/" target="_blank">Windows Azure SDK</a> to your dev machine.</p>
<h4>Step 1 –  Git clone the PackAndDeploy to a dev folder.</h4>
<p>See Step 1 in the <a href="http://blog.smarx.com/posts/tutorial-running-the-mongoose-web-server-in-windows-azure" target="_blank">Quick Walkthrough</a> from Smarx.</p>
<p>Additionally I highly recommend following that example and making sure that your Azure SDK and emulator are setup and running correctly and get a little familiar with Azure before you start adding clarion to the mix.</p>
<h4>Step 2 – Prepare your clarion APP</h4>
<p>I used the “BasicBrowseAndForm” example that comes with NetTalk. Anything that can reply to HTTP requests should work fine.</p>
<p>There were a couple of changes to get the example working</p>
<ul>
<li>WebServer procedure, in ThisWebServer.Open, before parent</li>
</ul>
<pre>SELF.Port = Command(‘port’)
SELF._ServerIP = Command(‘ip’)</pre>
<ul>
<li>WebServer procedure, in ThisWindow.Init</li>
</ul>
<pre>GlobalErrors.SetSilent(TRUE)</pre>
<ul>
<li>In application global properties, file control tab set the access mode to <strong>ReadOnly</strong>.</li>
</ul>
<h4>Step 3 – Adjust the PackAndDeploy example to work with the clarion app</h4>
<p>Delete all the files in the WorkerRole sub directory except for the Run.cmd</p>
<p>Edit the WorkerRole\Run.cmd file to look like this:</p>
<pre>cd /d "%~dp0"
start /w web1.exe port=%PORT% ip=%ADDRESS%</pre>
<p>Copy your clarion EXE and support directories into the WorkerRole folder. Anything in this folder gets included in the deployment package.</p>
<h4>Step 4 – Deploy to the cloud</h4>
<p>Use the “pack.cmd” from the PackAndDeploy example to create a package for upload and use the Windows Azure portal to deploy your application!</p>
<h4>Step 5 – See it in Action!</h4>
<p><a title="http://wazclariontest.cloudapp.net/" href="http://wazclariontest.cloudapp.net/">http://wazclariontest.cloudapp.net/</a></p>
<p>Ok so it is not perfect yet, I had to tell clarion to only access the files in ReadOnly mode. You would need to look into the various storage options to fix that if you really want to use TPS, a better alternative will most likely be to use SQL server for your data needs. Error handling and diagnostics would need some forethought. There is a way to access a remote desktop session for debugging via a GUI if you want though. The pack and deploy process can probably do with some further automation too <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.clarionedge.com/wp-content/uploads/wlEmoticon-smile3.png" alt="Smile" />.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/native-clarion-in-the-cloud-azure.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clarion syntax for the Sublime Text editor</title>
		<link>http://www.clarionedge.com/clarion/general/clarion-syntax-for-the-sublime-text-editor.html</link>
		<comments>http://www.clarionedge.com/clarion/general/clarion-syntax-for-the-sublime-text-editor.html#comments</comments>
		<pubDate>Fri, 30 Dec 2011 16:25:50 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Clarion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=1028</guid>
		<description><![CDATA[&#160;
Sublime Text is a sophisticated text editor for code, html and prose. You&#8217;ll love the slick user interface and extraordinary features.

I must say that after a few days of use I totally agree! This is [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<blockquote><p align="center"><a href="http://www.sublimetext.com/" target="_blank">Sublime Text</a> is a sophisticated text editor for code, html and prose. You&#8217;ll love the slick user interface and extraordinary features.</p>
</blockquote>
<p align="left">I must say that after a few days of use I totally agree! This is looking like the top contender to replace <a href="http://textpad.com/" target="_blank">TextPad</a>, something I have been trying to do for years without any success. TextPad is great but falls short in a few places and until now I have not found anything that comes close to its ease of use and performance…</p>
<p align="left">Of course there is no syntax definition available for clarion files by default so I have made a start on one. </p>
<p align="left">Disclaimer, I am new to Sublime Text as well as GitHub but I will plug away at it for a while and see what comes out!</p>
<p align="left">You should take a look at the official help for <a href="http://sublimetext.info/docs/en/extensibility/syntaxdefs.html" target="_blank">creating Syntax Definitions</a> before trying to understand the files in the GitHub repo. When it is a little more mature I will create a package that can be loaded easily, for now you will have to do it the hard way <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p align="left">Grab the code for <a href="https://github.com/fushnisoft/SublimeClarion" target="_blank">SublimeClarion on GitHub</a>.</p>
<p align="left"><a href="http://www.clarionedge.com/wp-content/uploads/image65.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.clarionedge.com/wp-content/uploads/image_thumb57.png" width="244" height="179" /></a></p>
<p align="left">-brahn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/clarion-syntax-for-the-sublime-text-editor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeta Color Editor for Clarion.</title>
		<link>http://www.clarionedge.com/clarion/zeta-color-editor-for-clarion.html</link>
		<comments>http://www.clarionedge.com/clarion/zeta-color-editor-for-clarion.html#comments</comments>
		<pubDate>Tue, 20 Sep 2011 10:20:37 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Clarion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[interop]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=915</guid>
		<description><![CDATA[&#160;
Inspired by a recent newsgroup thread and my latest experiments in Clarion &#8211;&#62; DotNet interop I have put together a simple program that shows you how to use the Zeta Color Editor from a clarion [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Inspired by a recent newsgroup thread and my latest experiments in Clarion &#8211;&gt; <a href="http://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports#TOC-Marshalling-sample" target="_blank">DotNet interop</a> I have put together a simple program that shows you how to use the Zeta Color Editor from a clarion app!</p>
<p><a href="http://www.clarionedge.com/wp-content/uploads/image63.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.clarionedge.com/wp-content/uploads/image_thumb55.png" width="244" height="149" /></a></p>
<p>&#160;</p>
<p>The <a href="http://www.codeproject.com/KB/miscctrl/ZetaColorEditor.aspx" target="_blank">Zeta Color Editor</a> is from an article in The Code Project and I have adapted it slightly to include a “Clarion Code” entry control as well as the “HTML code” it comes with. You may remember this control from the awesome <a href="http://www.clarionaddins.com/addins/InsertClarionColor.html" target="_blank">InsertClarionColor addin</a>.</p>
<p>This is the complete C# code used to call the Zeta Color Editor:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Drawing</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Forms</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">RGiesecke.DllExport</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">ZetaColorEditor.Runtime</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> ColorPicker
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">internal</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">class</span> UnmanagedExports
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">&#91;</span>DllExport<span style="color: #008000;">&#40;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>ShowColorDialog<span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span>, CallingConvention <span style="color: #008000;">=</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Runtime</span><span style="color: #008000;">.</span><span style="color: #0000FF;">InteropServices</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CallingConvention</span><span style="color: #008000;">.</span><span style="color: #0000FF;">StdCall</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> Int32 ShowColorDialog<span style="color: #008000;">&#40;</span>Int32 lastSelectedColor<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> colorstr <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>ColorEditorForm cd <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ColorEditorForm<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                ColorConverter cc <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ColorConverter<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                cd<span style="color: #008000;">.</span><span style="color: #0000FF;">SelectedColor</span> <span style="color: #008000;">=</span> ColorTranslator<span style="color: #008000;">.</span><span style="color: #0000FF;">FromWin32</span><span style="color: #008000;">&#40;</span>lastSelectedColor<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>cd<span style="color: #008000;">.</span><span style="color: #0000FF;">ShowDialog</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">==</span> DialogResult<span style="color: #008000;">.</span><span style="color: #0000FF;">OK</span><span style="color: #008000;">&#41;</span>
                <span style="color: #008000;">&#123;</span>
                    <span style="color: #0600FF; font-weight: bold;">return</span> ColorTranslator<span style="color: #008000;">.</span><span style="color: #0000FF;">ToWin32</span><span style="color: #008000;">&#40;</span>cd<span style="color: #008000;">.</span><span style="color: #0000FF;">SelectedColor</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> lastSelectedColor<span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>The clarion declaration looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">  MODULE('ColorPicker.dll')
ShowColorDialog PROCEDURE(LONG lastSelectedColor),LONG,NAME('ShowColorDialog'),PASCAL,RAW,DLL(TRUE)
  END</pre></div></div>

<p>The zip file contains a clarion 8 solution (app file, etc), compiled exe for the impatient, the C# wrapper (ColorPicker.dll) and the ZetaColorEditor.dll. This should be everything you need to do your own testing. The original source for the ZetaColorEditor is found at the Code Project link at the beginning of this post, my customisations can be found at the <a href="https://code.google.com/p/clarion-addins/" target="_blank">clarion-addins</a> google project page.</p>
<div class="download">
<table border="0">
<tbody>
<tr>
<th>Download:</th>
<td><a rel="nofollow" title="Download version 0.1 of ColorPickerTest.zip" onclick="if (window.urchinTracker) urchinTracker ('http://www.clarionedge.com/downloads/examples/ColorPickerTest.zip');" href="http://www.clarionedge.com/downloads/examples/ColorPickerTest.zip"><img src="http://www.clarionedge.com/wp-content/plugins/drain-hole/images/download.png" alt="download" width="128" height="128"/></a> <a rel="nofollow" title="Download version 0.1 of ColorPickerTest.zip" onclick="if (window.urchinTracker) urchinTracker ('http://www.clarionedge.com/downloads/examples/ColorPickerTest.zip');" href="http://www.clarionedge.com/downloads/examples/ColorPickerTest.zip">ColorPickerTest.zip</a></td>
</tr>
<tr>
<th>Version:</th>
<td>0.1</td>
</tr>
<tr>
<th>Updated:</th>
<td>September 20, 2011</td>
</tr>
<tr>
<th>Size:</th>
<td>852.29 KB</td>
</tr>
<tr>
<th>Downloads:</th>
<td>36</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/zeta-color-editor-for-clarion.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Data Connection Dialog Source Code</title>
		<link>http://www.clarionedge.com/windows/development/sql-data-connection-dialog-source-code.html</link>
		<comments>http://www.clarionedge.com/windows/development/sql-data-connection-dialog-source-code.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:25:10 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/windows/development/sql-data-connection-dialog-source-code.html</guid>
		<description><![CDATA[Whilst looking for something else today I came across this little nugget. Something that should&#160; be handy for anyone connecting to SQL servers wanting to build a connection string at runtime.
Here is a link to [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst looking for something else today I came across this little nugget. Something that should&#160; be handy for anyone connecting to SQL servers wanting to build a connection string at runtime.</p>
<p>Here is a link to the blog:</p>
<p><a href="http://blogs.msdn.com/b/vsdata/archive/2010/02/02/data-connection-dialog-source-code-is-released-on-code-gallery.aspx" target="_blank">Data Connection Dialog Source Code is released on Code Gallery!</a></p>
<p>And a link to the source code just in case:</p>
<p><a title="http://code.msdn.microsoft.com/Connection/" href="http://code.msdn.microsoft.com/Connection/">http://code.msdn.microsoft.com/Connection/</a></p>
<p>&#160;</p>
<p>Enjoy,   <br />Brahn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/development/sql-data-connection-dialog-source-code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Management Studio add-in</title>
		<link>http://www.clarionedge.com/windows/tools/sql-server-management-studio-add-in.html</link>
		<comments>http://www.clarionedge.com/windows/tools/sql-server-management-studio-add-in.html#comments</comments>
		<pubDate>Wed, 03 Nov 2010 09:14:49 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/windows/tools/sql-server-management-studio-add-in.html</guid>
		<description><![CDATA[&#160;
I discovered this little beauty the other day, SSMS Tools Pack for Microsoft SQL Server Management Studio from a developer in Slovenia. I haven’t had a chance to make use of everything in the package [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>I discovered this little beauty the other day, <a href="http://www.ssmstoolspack.com" target="_blank">SSMS Tools Pack</a> for Microsoft SQL Server Management Studio from a <a href="http://www.ssmstoolspack.com/About" target="_blank">developer in Slovenia</a>. I haven’t had a chance to make use of everything in the package yet but so for it has been pretty neat. The <a href="http://www.ssmstoolspack.com/Features?f=2" target="_blank">Query Execution History</a> has been pretty handy.</p>
<p>&#160;</p>
<p>From the website:</p>
<blockquote><p>SSMS Tools Pack is an add-in for Microsoft SQL Server Management Studio (SSMS) 2005, 2008, 2008 R2 and their respective Express versions.     <br />It contains a few upgrades to the SSMS IDE that I thought were missing.</p>
</blockquote>
<p>&#160;</p>
<p><a href="http://www.clarionedge.com/wp-content/uploads/image33.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.clarionedge.com/wp-content/uploads/image_thumb25.png" width="244" height="191" /></a></p>
<p>&#160;</p>
<p>Get it here &#8211; <a title="http://www.ssmstoolspack.com/" href="http://www.ssmstoolspack.com/">http://www.ssmstoolspack.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/tools/sql-server-management-studio-add-in.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun windows trick #42</title>
		<link>http://www.clarionedge.com/windows/fun-windows-trick-42.html</link>
		<comments>http://www.clarionedge.com/windows/fun-windows-trick-42.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 10:42:18 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/windows/fun-windows-trick-42.html</guid>
		<description><![CDATA[&#160;
This is something I discovered by accident a while ago, maybe you already know about it… 
Use the mouse to move a window around and then, while you still have the left mouse button held [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>This is something I discovered by accident a while ago, maybe you already know about it… </p>
<p>Use the mouse to move a window around and then, while you still have the left mouse button held down, press the escape key. The window will be returned to its original position!</p>
<p>Ok, so it isn’t very useful but it was new to me <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/fun-windows-trick-42.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>v5.3.1 of Textpad is out</title>
		<link>http://www.clarionedge.com/windows/tools/v531-of-textpad-is-out.html</link>
		<comments>http://www.clarionedge.com/windows/tools/v531-of-textpad-is-out.html#comments</comments>
		<pubDate>Fri, 16 Oct 2009 10:04:52 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=259</guid>
		<description><![CDATA[This is just an incremental update on v5.3.0 but if you are not already on v5.3 then I think it is worth upgrading. Having the option to substitute TextPad for Notepad baked into the program [...]]]></description>
			<content:encoded><![CDATA[<p>This is just an incremental update on v5.3.0 but if you are not already on v5.3 then I think it is worth upgrading. Having the <strong>option to substitute TextPad for Notepad</strong> baked into the program alone is worth it!</p>
<p>Textpad, a great general purpose editor &#8211; <a href="http://www.textpad.com/download/index.html" target="_blank">http://www.textpad.com/download/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/tools/v531-of-textpad-is-out.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally a decent looking clipboard manager</title>
		<link>http://www.clarionedge.com/windows/development/finally-a-decent-looking-clipboard-manager.html</link>
		<comments>http://www.clarionedge.com/windows/development/finally-a-decent-looking-clipboard-manager.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 17:08:57 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=256</guid>
		<description><![CDATA[It has been ages since I have had a chance to post here so lets start of with a quick one.
I have just started using this and so far it looks really good and appears [...]]]></description>
			<content:encoded><![CDATA[<p>It has been ages since I have had a chance to post here so lets start of with a quick one.</p>
<p>I have just started using this and so far it looks really good and appears to still be in active dev &#8211; <a href="http://ditto-cp.sourceforge.net/" target="_blank">http://ditto-cp.sourceforge.net/</a></p>
<p>Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/development/finally-a-decent-looking-clipboard-manager.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vista File Associations &#8211; Follow up</title>
		<link>http://www.clarionedge.com/windows/vista/vista-file-associations-follow-up.html</link>
		<comments>http://www.clarionedge.com/windows/vista/vista-file-associations-follow-up.html#comments</comments>
		<pubDate>Mon, 16 Mar 2009 23:18:13 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=220</guid>
		<description><![CDATA[Early last year I posted an article about changing icons and file associations in Vista. The bad news is that nothing seems to have changed natively in this regard for Vista. Perhaps things will be [...]]]></description>
			<content:encoded><![CDATA[<p>Early last year I posted an <a href="http://www.clarionedge.com/windows/vista/vista-file-associations.html" target="_blank">article</a> about changing icons and file associations in Vista. The bad news is that nothing seems to have changed natively in this regard for Vista. Perhaps things will be different in Window7&#8230; who knows.</p>
<p>The good news though is that I have since found a much nicer program for assigning your own icons:</p>
<h1>Types</h1>
<p>“Types” is a free and lightweight utility for Windows  that allows you to edit program associations, icons, context menus and other properties of various file types displayed in Explorer.</p>
<p><a href="http://types.sourceforge.net/" target="_blank">http://types.sourceforge.net/</a></p>
<p><a href="http://www.clarionedge.com/wp-content/uploads/types.png"><img class="alignnone size-medium wp-image-221" title="types" src="http://www.clarionedge.com/wp-content/uploads/types-246x152.png" alt="types" width="246" height="152" /></a></p>
<p>When I first tried it out way back in the beginning of last year I had a few difficulties but when I recently setup a new development VM and had a need once again to customize my clarion file associations I gave it another go. This time round they have made great improvements in stability and it performed beautifully and did what it said it would. No more, no less.</p>
<p>Hopefully someone will find this useful too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/windows/vista/vista-file-associations-follow-up.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.clarionedge.com/category/windows/feed ) in 0.60631 seconds, on Feb 7th, 2012 at 11:08 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 12:08 pm UTC -->
