dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘Code’

permalink image comments image
Wednesday, 11 February '09: Creating a Transparent Control

Recently I have had to utilize transparent images within Panel(s) and PictureBox(s) for the wiindows app.

However it seems that neither will not do true transparency because each clears it’s background using the Windows Forms transparency scheme, thus resulting in the background color of any parent elements being rendered.

All is not lost however as you can create a custom transparent control to host your image fairly easily. First of all you need to create a new component class.

Once this has been done just modify the code to reflect the following: Read..

Tags: , , , ,
permalink image comments image
Thursday, 22 January '09: Data Execution Prevention Workaround

Here is a post I have been meaning to write for a while now as it was quite a big issue for me at one time:

DEP is short for Data Execution Prevention, a technology which exists to prevent the execution of code from memory pages marked as none executable. This is done to reduce the attack surface available to malicious software that is trying to hijack a process.

This is great you might say, and yes it is, however if your application interops with native binaries or exposes a plugin model to 3rd parties (shockwave ActiveX component in my case) you may say… aggggghhhh.

A Bit of Background

I first came across DEP when I decided to add  facility for direct communication between my wiindows application shockwave .dcr/swf  movies. In order to do this part of the application has a windows form with the relevant ActiveX controls embedded within it.

Fine so far and yes it was in VS2005, however upon my first Build in VS2008 the following error was triggered:

Unable to get the window handle for the 'AxShockwaveCtl' control. Windowless ActiveX controls are not supported

After a little Google time in reference to this error DEP reared its ugly head as a possible/likely cause. This is due to the C# compiler in Visual Studio 2008 and the .NET 3.5 Framework (csc.exe) now generating PE files with the NXCOMPAT bit set. Read..

Tags: , , , , ,
permalink image comments image
Friday, 18 January '08: QR Banner Graphics

Let me introduce you to my geeky side and also QR Code:

Although initially used for tracking parts in vehicle manufacturing, QR Codes are essentially 2D bar codes. I first came across them when I purchased my N95 and found the N95’s Barcode Scanner article over at Jason Bradbury’s blog.

If you got to this post by entering 010101010 into the search box then UBER KUDOS to you (your also a bit sad lol) otherwise you probably are wondering what the hell I am typing about so Ill explain.

Basically If you have a camera phone equipped with the correct reader software you can scan a QR Code produced image and obtain the data within, cool huh. Anyhoo take a look at the following image:

qr-code-demo.png

This image is a QR Generated barcode that states:

Hello and welcome to http://blog.dyadica.net. I hope you enjoy this little QR Code Demo. Read..

Tags: , , , , , , ,

poll tags

css | xhtml | dyadica.net © admin 2010 | powered: wordpress | fuel: ps-wii-elite | top | sign-up