<?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>devbar.de &#187; Powerbuilder</title>
	<atom:link href="http://www.devbar.de/index.php/tag/powerbuilder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devbar.de</link>
	<description>just code chunks</description>
	<lastBuildDate>Sat, 07 Jan 2012 19:50:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Drag &amp; Drop from Windows Explorer to PowerBuilder application</title>
		<link>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/</link>
		<comments>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 13:16:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/</guid>
		<description><![CDATA[
It isn’t a big thing but user-friendly to let your user drop some files in your PowerBuilder application. Maybe to import, merge, strip, archive, …. you name it 
  
1. Insert the external functions to your window object.
function ulong DragQueryFileW( ulong hDrop, ulong iFile, ref string LPTSTR, ulong cb ) library 'shell32.dll'
subroutine DragAcceptFiles(ulong h, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/gb.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 6px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="gb" border="0" alt="gb" align="left" src="http://www.devbar.de/wp-content/uploads/2011/08/gb_thumb.png" width="16" height="11" /></a></p>
<p>It isn’t a big thing but user-friendly to let your user drop some files in your PowerBuilder application. Maybe to import, merge, strip, archive, …. you name it <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/01/wlEmoticon-winkingsmile1.png" /></p>
<p>  <span id="more-731"></span>
<p>1. Insert the external functions to your window object.</p>
<pre class="brush: plain;">function ulong DragQueryFileW( ulong hDrop, ulong iFile, ref string LPTSTR, ulong cb ) library 'shell32.dll'
subroutine DragAcceptFiles(ulong h, boolean b ) library 'shell32.dll' </pre>
<p>2. Insert a custom event with ID “pbm_dropfiles” to you window object and insert some code like this.</p>
<pre class="brush: plain;">string     ls_filename
ulong     ll_fileCount
ulong     ll_index
long        ll_row

ll_fileCount = DragQueryFileW(Message.WordParm,-1,ls_filename,0)
ls_filename = space(255)
for ll_index = 1 to ll_fileCount
    DragQueryFileW(Message.WordParm,ll_index - 1,ls_filename,255)
    ll_row = dw_files.insertRow ( 0 )
    dw_files.setItem ( ll_row, &quot;filename&quot;, ls_filename);
next </pre>
<p>&#160;</p>
<p>3. Make sure you enabled and disabled Drop behavior in open and close event of the window object.</p>
<pre class="brush: plain;">DragAcceptFiles(handle(this),true) //open</pre>
<pre class="brush: plain;">DragAcceptFiles(handle(this),false) //close</pre>
<p>That’s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerBuilder in Obsidian Theme</title>
		<link>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/</link>
		<comments>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 15:14:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[4fun]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/</guid>
		<description><![CDATA[
If you like it 
  
Insert following lines in your pb.ini to get this look.
[PB]
...
EditorColor0=31777504 20197673
EditorColor1=65280 20197673
EditorColor2=65280 20197673
EditorColor3=31777504 20197673
EditorColor4=31777504 20197673
EditorColor5=31777504 20197673
EditorColor6=31777504 20197673
EditorColor7=32768 1073741824
EditorColor8=31777504 20197673
EditorColor9=255 20197673
EditorColor10=31777504 20197673
EditorColor11=255 20197673
EditorColor12=8421504 20197673
EditorColor13=255 20197673
EditorColor14=16776960 20197673
...

[colors]
color1=15000288
color2=16777215
color3=3420457
color4=16777215
color5=16777215
color6=16777215
color7=16777215
color8=16777215
color9=16777215
color10=16777215
color11=16777215
color12=16777215
color13=16777215
color14=16777215
color15=16777215
color16=16777215
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/01/pb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="pb" border="0" alt="pb" src="http://www.devbar.de/wp-content/uploads/2012/01/pb_thumb.png" width="445" height="392" /></a></p>
<p>If you like it <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/01/wlEmoticon-winkingsmile.png" /></p>
<p>  <span id="more-729"></span>
<p>Insert following lines in your pb.ini to get this look.</p>
<pre class="brush: plain;">[PB]
...
EditorColor0=31777504 20197673
EditorColor1=65280 20197673
EditorColor2=65280 20197673
EditorColor3=31777504 20197673
EditorColor4=31777504 20197673
EditorColor5=31777504 20197673
EditorColor6=31777504 20197673
EditorColor7=32768 1073741824
EditorColor8=31777504 20197673
EditorColor9=255 20197673
EditorColor10=31777504 20197673
EditorColor11=255 20197673
EditorColor12=8421504 20197673
EditorColor13=255 20197673
EditorColor14=16776960 20197673
...

[colors]
color1=15000288
color2=16777215
color3=3420457
color4=16777215
color5=16777215
color6=16777215
color7=16777215
color8=16777215
color9=16777215
color10=16777215
color11=16777215
color12=16777215
color13=16777215
color14=16777215
color15=16777215
color16=16777215</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PB .NET Add-In: Generating Structures and NonVisualObjects from Datawindow</title>
		<link>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</link>
		<comments>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Add-In]]></category>
		<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[Dw2Struct]]></category>
		<category><![CDATA[Nonvisual]]></category>
		<category><![CDATA[Structure]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</guid>
		<description><![CDATA[Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.
So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/gb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 6px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="gb" border="0" alt="gb" align="left" src="http://www.devbar.de/wp-content/uploads/2011/08/gb_thumb.png" width="16" height="11" /></a>Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.</p>
<p>So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder 12.5 beta newsgroup I created a small plugin to easily create some Structures and NonVisualObjects from a Datawindow.</p>
<p>  <span id="more-721"></span>
<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 16px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.devbar.de/wp-content/uploads/2011/08/image_thumb.png" width="183" height="158" /></a>This is very useful if you want to transfer data from or to a Datawindow by dot notation. If you have a lot of fields it can be a very painful job to create the Nonvisual and enter the variables in the correct order. Because of this Bruce Armstrong created a small tool called “Dw2Struct” that can do this for you in PB Classic. What I do is to extend the tool for NonVisuals and build a add-in around it.</p>
<p>So take a look at the code and the binaries. The Installation is easy. Just put it in a directory where Powerbuilder 12.5 .NET looks for add-ins. You can see what paths are observed by going to Extras-&gt;Options-&gt;Add-In. If you are not sure where to copy it, enter the path where you unpack the downloaded files. After restart the IDEs shows you two new entries in context menu of Datawindow. That’s it. </p>
<p>Have fun!</p>
<p><strong>Links:</strong></p>
<ul>
<li>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:e2e5e9cb-a8ba-4a47-9ccc-140ede6de99c" class="wlWriterEditableSmartContent">
<div><a href="http://www.devbar.de/wp-content/uploads/2011/08/PB-Addin-Dw2Struct.zip" target="_self">PB-Addin-Dw2Struct.zip</a></div>
</div>
</li>
<li><a href="https://github.com/devbar/PB-Addin-Dw2Struct">GitHub</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aero Glass in PowerBuilder nutzen</title>
		<link>http://www.devbar.de/index.php/2011/07/aero-glass-in-powerbuilder-nutzen/</link>
		<comments>http://www.devbar.de/index.php/2011/07/aero-glass-in-powerbuilder-nutzen/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 21:42:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Aero]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/07/aero-glass-in-powerbuilder-nutzen/</guid>
		<description><![CDATA[Vor einiger Zeit hatte ich ja bereits gebloggt wie man in C# transparente Fenster erstellt und damit ganz nette Effekte erzielen kann. Die Funktionalität lässt sich auch aus PowerBuilder nutzen. Ich habe hier mal ein kleines Beispiel gebastelt.
Links:
GitHub

PBGlass.zip

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/07/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 4px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.devbar.de/wp-content/uploads/2011/07/image_thumb1.png" width="175" height="106" /></a>Vor einiger Zeit hatte ich ja bereits gebloggt <a href="http://www.devbar.de/index.php/2010/05/transparente-fenster-in-c/">wie man in C# transparente Fenster erstellt</a> und damit ganz nette Effekte erzielen kann. Die Funktionalität lässt sich auch aus PowerBuilder nutzen. Ich habe hier mal ein kleines Beispiel gebastelt.</p>
<p><strong>Links:</strong></p>
<p><a href="https://github.com/devbar/PB-Aero-Glass">GitHub</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:63a556c7-5329-4420-af46-9d314133d49d" class="wlWriterEditableSmartContent">
<div><a href="http://www.devbar.de/wp-content/uploads/2011/07/PBGlass.zip" target="_self">PBGlass.zip</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/07/aero-glass-in-powerbuilder-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watermarks in PowerBuilder nutzen</title>
		<link>http://www.devbar.de/index.php/2011/07/watermarks-in-powerbuilder-nutzen/</link>
		<comments>http://www.devbar.de/index.php/2011/07/watermarks-in-powerbuilder-nutzen/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 20:07:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[cue banners]]></category>
		<category><![CDATA[Watermarks]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/07/watermarks-in-powerbuilder-nutzen/</guid>
		<description><![CDATA[Wer in Win32-Anwendungen Watermarks nutzen möchte, kann sich einfach der Windows-API bedienen. Wenn man das Feature in PowerBuilder DataWindows nutzen möchte, muss man allerdings ein wenig basteln. 
Links:
GitHub

PB-Watermark.zip

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/07/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 2px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.devbar.de/wp-content/uploads/2011/07/image_thumb.png" width="168" height="169" /></a>Wer in Win32-Anwendungen Watermarks nutzen möchte, kann sich einfach der Windows-API bedienen. Wenn man das Feature in PowerBuilder DataWindows nutzen möchte, muss man allerdings ein wenig basteln. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://www.devbar.de/wp-content/uploads/2011/07/wlEmoticon-smile.png" /></p>
<p><strong>Links:</strong></p>
<p><font color="#333333"><a href="https://github.com/devbar/PB-Watermark">GitHub</a></font></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:4681f1a7-3020-4c14-9f40-4f4e70b93bb3" class="wlWriterEditableSmartContent">
<div><a href="http://www.devbar.de/wp-content/uploads/2011/07/PB-Watermark1.zip" target="_self">PB-Watermark.zip</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/07/watermarks-in-powerbuilder-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerBuilder Support</title>
		<link>http://www.devbar.de/index.php/2010/06/powerbuilder-support/</link>
		<comments>http://www.devbar.de/index.php/2010/06/powerbuilder-support/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 17:13:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Vivo]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=569</guid>
		<description><![CDATA[Vor einiger Zeiten hat Jason Fenter eine eigene Community für Powerbuilder-Entwickler in Ning ins Leben gerufen. Leider will Ning nicht mehr kostenlos hosten und so ziehen wir jetzt um.
Das neue Board befindet sich jetzt hier. Als Engine nutze ich das auf DotNetNuke basierende Vivo. Vivo selbst und die Community sind noch im Aufbau, weswegen es [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2010/06/logo_pb_small.png"><img class="aligncenter size-full wp-image-570" title="logo_pb_small" src="http://www.devbar.de/wp-content/uploads/2010/06/logo_pb_small.png" alt="" width="444" height="110" /></a>Vor einiger Zeiten hat Jason Fenter eine eigene Community für Powerbuilder-Entwickler in <a href="http://powerbuilder.ning.com/">Ning </a>ins Leben gerufen. Leider will Ning nicht mehr kostenlos hosten und so ziehen wir jetzt um.</p>
<p>Das neue Board befindet sich jetzt <a href="http://www.powerbuilder.devbar.de/">hier</a>. Als Engine nutze ich das auf DotNetNuke basierende <a href="http://imvivo.com/">Vivo</a>. Vivo selbst und die Community sind noch im Aufbau, weswegen es mit Sicherheit an der ein oder anderen Ecke haken wird. Also &#8211; Einfach mal reinschauen.</p>
<p>Links:</p>
<ul>
<li><a href="http://powerbuilder.devbar.de">www.powerbuilder.devbar.de</a></li>
<li><a href="http://imvivo.com/">vivo</a></li>
<li><a href="http://www.ning.com/">Ning</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/06/powerbuilder-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom (XAML-)Controls in Datawindows nutzen</title>
		<link>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/</link>
		<comments>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/#comments</comments>
		<pubDate>Thu, 20 May 2010 03:12:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=433</guid>
		<description><![CDATA[
Eines der interessantesten Features in Powerbuilder .NET ist die Verwendung von WPF (XAML) zur Definition der Benutzeroberfläche. Dabei ist es nicht nur möglich Controls auf dem Fenster mit XAML zu beschreiben, sondern auch innerhalb von Datawindows (Custom Control). In dieser kleinen Beispielanwendung bette ich ein 5-Sterne-Rating-XAML-Control zur Bewertung von Filmen in ein Datawindow ein und [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-434  aligncenter" title="2010-05-18 23h33_54" src="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h33_54.png" alt="" width="417" height="506" /></p>
<p style="text-align: left;">Eines der interessantesten Features in Powerbuilder .NET ist die Verwendung von WPF (XAML) zur Definition der Benutzeroberfläche. Dabei ist es nicht nur möglich Controls auf dem Fenster mit XAML zu beschreiben, sondern auch innerhalb von Datawindows (<strong>Custom Control</strong>). In dieser kleinen Beispielanwendung bette ich ein 5-Sterne-Rating-XAML-Control zur Bewertung von Filmen in ein Datawindow ein und &#8220;binde&#8221; es an die enthaltenen Daten.</p>
<p style="text-align: left;"><span id="more-433"></span></p>
<p><strong>Überblick</strong></p>
<p>Der Source und das Tool können <a href="http://devbar.de/wp-content/uploads/2010/05/MovieCat.zip">hier</a> heruntergeladen werden. Das Projekt besteht aus einem Fenster, einem Datawindow, ein paar Ressourcen und einem Assembly (RatingControlSample.dll). Das Assembly enthält  das Rating-Control, dass wir im Datawindow verwenden wollen (gefunden auf <a href="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html">Nick Andersson&#8217;s Blog</a>). Um mir die Arbeit ein wenig zu vereinfachen, habe ich mir ein External-Datawindow gebaut, das meine Filme enthält. Natürlich könnte hier auch eine Datenbank oder ein SOAP-Service als Datenquelle genutzt werden.</p>
<p><strong>Vorgehensweise</strong></p>
<p style="text-align: center;"><a href="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h34_47.png"><img class="size-medium wp-image-438  aligncenter" title="2010-05-18 23h34_47" src="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h34_47-297x300.png" alt="" width="297" height="300" /></a></p>
<p style="text-align: left;">Das Erstellen des Projekts, des Fensters und des Datawindows ist wie aus Powerbuilder Classic bekannt.</p>
<p style="text-align: left;"><strong>1. Das Assemly aufnehmen</strong></p>
<p style="text-align: left;">Dafür sucht ihr im Navigator(links) den Bereich &#8220;References&#8221; und wählt &#8220;Add Reference&#8221;. Anschließend müsst ihr per &#8220;Browse&#8221; das gewünschte Assembly auswählen.</p>
<p style="text-align: left;"><strong>2. Das Custom Control hinzufügen</strong></p>
<p style="text-align: left;">Wenn ihr im Datawindow-Painter seid, gibt es in eurer Toolbox einen Eintrag &#8220;Custom Control&#8221;. Zieht das Control auf das Datawindow und es öffnet sich ein neuer Dialog. Das Wichtige hier ist der XAML-Code, der eingefügt werden muss.</p>
<pre class="brush: xml">&lt;RatingControl xmlns="clr-namespace:RatingControlSample;assembly=RatingControlSample" Width="87" Height="15" /&gt;</pre>
<p style="text-align: left;">Die restlichen Felder kann man erstmal leer lassen.</p>
<p style="text-align: left;"><strong>3. Das Control mit den Datawindow verbinden</strong></p>
<p style="text-align: left;">Um das Datawindow mit den Daten zu binden, sind folgende Eigenschaften des Controls wichtig:</p>
<ul>
<li>Table und Column: Dies ist die Tabelle und die Spalte die in das Control übergeben werden soll. Im Fall eines External-Datawindows muss nur Column gefüllt werden. In diesem Fall wird Column mit &#8220;rating&#8221; gefüllt.</li>
<li>Content: Hier wird der Name der Property angegeben, in die der Wert aus &#8220;Column&#8221; geschrieben werden soll. Selbstverständlich müssen die Datentypen kompatibel sein. Für das Beispiel sollte hier &#8220;RatingValue&#8221; stehen, da die entsprechende Eigenschaft zum Einblenden der Sterne so heißt. Die Eigenschaft kann Werte von 1 bis 5 aufnehmen, je nachdem wieviele Sterne vergeben werden.</li>
<li>Keyclause: Hier wird die Bedingung angegeben, die zum Laden der Tabelle genutzt werden soll. Ich brauche dies in meinem Beispiel eigentlich nicht, da ich auf ein External-Datawindow zurückgreife.</li>
<li>XAML Syntax: Hier kann die in Schritt 2 eingegebene Syntax bearbeitet werden.</li>
</ul>
<p>Wenn ihr das Datawindow verwendet, wird das Control entsprechend den Daten aus dem DW geladen. Wenn der Anwender die Anzahl der Sterne verändert, wird der entsprechende Wert in das Datawindow zurückgeschrieben.</p>
<p>Viel Spaß beim Ausprobieren <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Links:</p>
<ul>
<li><a href="http://devbar.de/wp-content/uploads/2010/05/MovieCat.zip">MovieCat downloaden</a></li>
<li><a href="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html">Nick Andersson&#8217;s Blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Powerbuilder .NET in 165 Sekunden</title>
		<link>http://www.devbar.de/index.php/2010/05/hello-world-pb-12-net-in-165-sekunden/</link>
		<comments>http://www.devbar.de/index.php/2010/05/hello-world-pb-12-net-in-165-sekunden/#comments</comments>
		<pubDate>Wed, 12 May 2010 06:44:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=73</guid>
		<description><![CDATA[Muss man da noch viel sagen? Das obligatorische &#8220;Hello World!&#8221; in 165 Sekunden  

]]></description>
			<content:encoded><![CDATA[<p>Muss man da noch viel sagen? Das obligatorische &#8220;Hello World!&#8221; in 165 Sekunden <img src='http://www.devbar.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/sD1R1URVjg4" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/sD1R1URVjg4"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/hello-world-pb-12-net-in-165-sekunden/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Powerscript in Wordpress Highlighten</title>
		<link>http://www.devbar.de/index.php/2010/05/powerscript-in-wordpress-highlighten/</link>
		<comments>http://www.devbar.de/index.php/2010/05/powerscript-in-wordpress-highlighten/#comments</comments>
		<pubDate>Tue, 11 May 2010 04:12:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=117</guid>
		<description><![CDATA[Wenn ihr selber Blogs betreibt wo, öfter mal Quellcode auftaucht, kann ich euch dieses Plugin ans Herz legen. Für alle gängigen Sprachen wird Highlighting angeboten und für alles Andere (wie z.B. Powerscipt) muss man halt ein bischen erweitern.

Download
Hier gibts meine Brush-Datei um das Highlighting zu erweitern

shBrushPowerbuilder

Installation

Datei in das Verzeichnis /wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts auf eurem Server uploaden
In der [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn ihr selber Blogs betreibt wo, öfter mal Quellcode auftaucht, kann ich euch <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">dieses Plugin </a>ans Herz legen. Für alle gängigen Sprachen wird Highlighting angeboten und für alles Andere (wie z.B. Powerscipt) muss man halt ein bischen erweitern.</p>
<p><span id="more-117"></span></p>
<p><strong>Download</strong></p>
<p>Hier gibts meine Brush-Datei um das Highlighting zu erweitern</p>
<ul>
<li><a href="http://devbar.de/wp-content/uploads/2010/05/shBrushPowerbuilder.js">shBrushPowerbuilder</a></li>
</ul>
<p><strong>Installation</strong></p>
<ol>
<li>Datei in das Verzeichnis <em>/wp-content/plugins/syntax-highlighter-and-code-prettifier/scripts </em>auf eurem Server uploaden</li>
<li>In der Datei <em>syntax-highlighter-and-code-prettifier/syntax-highlighter.php </em>die Zeile
<pre class="brush: pb">&lt;script type="text/javascript" src="&lt;?php echo $current_path; ?&gt;scripts/shBrushPowerbuilder.js"&gt;&lt;/script&gt;</pre>
<p>einfügen (vor der Zeile <em>&lt;script type=&#8221;text/javascript&#8221;&gt; </em>und hinter den Standardscripten).</li>
</ol>
<p><strong>Anwenden</strong></p>
<p>Wenn man jetzt einen Block highlighten möchte, verwendet man dazu folgende Syntax (Editor im HTML-Modus) <em>&lt;pre class=&#8221;brush: powerbuilder&#8221;&gt;Code&lt;/pre&gt;</em>.</p>
<p>Hier kann man das ganze mal in freier Wildbahn betrachen <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: pb">OLEObject adoRecordset
String  ls_DNSDomain, ls_Query, ls_Name
String  ls_Type, ls_Value
String  ls_Colname[], ls_Coltype[], ls_Date, ls_Time
Long    ll_nextrow, ll_Value
Integer li_rc, li_col, li_max
DateTime ldt_Value

this.Reset()

// Setup ADO objects
li_rc = adoCommand.ConnectToNewObject("ADODB.Command")
If of_ConnectError(li_rc, "ADODB.Command") Then
	Return -1
End If

li_rc = adoConnection.ConnectToNewObject("ADODB.Connection")
If of_ConnectError(li_rc, "ADODB.Connection") Then
	Return -1
End If

adoConnection.Provider = "ADsDSOObject"
adoConnection.Open("Active Directory Provider")
adoCommand.ActiveConnection = adoConnection

// Determine the domain
li_rc = adoRootDSE.ConnectToObject("LDAP://RootDSE")
If of_ConnectError(li_rc, "ADODB.Connection") Then
	Return -1
End If

ls_DNSDomain = adoRootDSE.Get("defaultNamingContext")

// Construct the SQL syntax query
ls_Query = "SELECT "
li_max = Integer(this.Object.DataWindow.Column.Count)
For li_col = 1 To li_max
	ls_Name = this.Describe("#" + String(li_col) + ".Name")
	ls_Type = Left(this.Describe(ls_Name + ".ColType"), 5)
	If li_col = li_max Then
		ls_Query += ls_Name + " "
	Else
		ls_Query += ls_Name + ", "
	End If
	ls_Colname[li_col] = ls_Name
	ls_Coltype[li_col] = ls_Type
Next
ls_Query +=   "FROM 'LDAP://" + ls_DNSDomain + "' "
ls_Query +=  "WHERE " + as_where

try
	// Run the query
	adoCommand.CommandText = ls_Query
	adoRecordset = adoCommand.Execute
	// Enumerate the resulting recordset
	Do Until adoRecordset.EOF
		// Copy values from recordset to datastore
		ll_nextrow = this.InsertRow(0)
		For li_col = 1 To li_max
			ls_Name = ls_Colname[li_col]
			choose case ls_Coltype[li_col]
				case "char("
					// string value
					ls_Value = String(adoRecordset.Fields(ls_Name).Value)
					this.SetItem(ll_nextrow, ls_Name, ls_Value)
				case "numbe"
					// numeric value
					ll_Value = Long(adoRecordset.Fields(ls_Name).Value)
					this.SetItem(ll_nextrow, ls_Name, ll_Value)
				case "datet"
					// datetime value
					ls_Value = String(adoRecordset.Fields(ls_Name).Value)
					ls_Date = Left(ls_Value, Pos(ls_Value, " ") - 1)
					ls_Time = Mid(ls_Value, Pos(ls_Value, " ") + 1)
					ldt_Value = DateTime(Date(ls_Date), Time(ls_Time))
					this.SetItem(ll_nextrow, ls_Name, ldt_Value)
			end choose
		Next
		// Move to the next record in the recordset
		adoRecordset.MoveNext
	Loop
	// Close the connection
	adoRecordset.Close
catch ( oleruntimeerror orte )
	MessageBox("OLERuntimeError", orte.Text)
end try

// Close the connection
adoConnection.Close

// Apply any filter or sort
this.Filter()
this.Sort()

Return this.RowCount()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/powerscript-in-wordpress-highlighten/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Powerbuilder will rock your world!</title>
		<link>http://www.devbar.de/index.php/2010/05/powerbuilder-will-rock-your-world/</link>
		<comments>http://www.devbar.de/index.php/2010/05/powerbuilder-will-rock-your-world/#comments</comments>
		<pubDate>Sun, 02 May 2010 19:25:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=37</guid>
		<description><![CDATA[
Juchu! Am 21. April war es tatsächlich soweit. Im geschlossenen Sybase-Downloadbereich konnte man die finale Version von Powerbuilder 12 herunterladen. Für alle nicht permanenten Sybasekunden wie mich, kam ein paar Tage später die Trial-Version.
Die dickste Änderung in der neuen Version ist die vollständige Integration von Powerbuilder in die Visual Studio Shell. Powerbuilderanwendungen laufen vollständig (100% [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://devbar.de/wp-content/uploads/2010/04/pb12-launch-web-banner.jpg"><img class="alignleft size-full wp-image-23 reflection" title="pb12-launch-web-banner" src="http://devbar.de/wp-content/uploads/2010/04/pb12-launch-web-banner.jpg" alt="" width="433" height="108" /></a></p>
<p>Juchu! Am 21. April war es tatsächlich soweit. Im geschlossenen Sybase-Downloadbereich konnte man die finale Version von Powerbuilder 12 herunterladen. Für alle nicht permanenten Sybasekunden wie mich, kam ein paar Tage später die Trial-Version.</p>
<p>Die dickste Änderung in der neuen Version ist die vollständige Integration von Powerbuilder in die Visual Studio Shell. Powerbuilderanwendungen laufen vollständig (100% fullmanaged) in .NET. Das Entwickleln von nativen Win32-Anwendungen ist nur noch mit der zwar mitgeleiferten, aber zur 11.5 kaum weiterentwickelten, Powerbuilder &#8220;Classic&#8221; möglich.</p>
<p>Gerade für mich als .NETer ist es natürlich reizvoll jetzt endlich sowohl Powerbuilder als auch C# in einer Entwicklungsumgebung zu sehen (wie oft habe ich mit Intellisense in PB herbeigewünscht). Allerdings haben mich Beta und CTP was Stabilität und Geschwindigkeit angeht eher enttäuscht.</p>
<p>Ich werde mich die nächsten Tage ransetzen und mal ein bischen programmieren. Ergebnisse werde ich euch natürlich wissen lassen.</p>
<p> <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Links:</p>
<ul>
<li><a href="http://response.sybase.com/forms/PB12Eval">Download Powerbuilder 12 Trial</a></li>
<li><a href="http://de.wikipedia.org/wiki/PowerBuilder">Wiki-Artikel zu Powerbuilder</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/powerbuilder-will-rock-your-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

