dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘C#’

permalink image comments image
Sunday, 21 June '09: Creating an MSI Uninstall Program Shortcut

As a general rule, Microsoft expect you to uninstall MSI applications from the Add/Remove Programs tool in the Control Panel.

Sometimes however, its nice to add a Start->Programs Menu – ‘Uninstall Shortcut’ to facilitate this action, for user convenience.

The following post details adding such a shortcut to a simple MSI build in Visual Studio 2008.

Browse to the MSI project folder (using Windows Explorer), right click and select New->Shortcut from the context menu. In the Create Shortcut Wizard dialog that pops up type ‘%windir%\system32\msiexec.exe -x {prodCode} ‘ as the location of the shortcut, where prodCode is the Product Code of the MSI package.

create_shortcut_uninstallerproduct_code_uninstaller

This Product Code can be identified from the Project Properties of the MSI Project in Visual Studio. Also, provide a proper name for the shortcut Read..

Tags: , , , ,
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
Saturday, 2 August '08: Caligari have Released trueSpace 7.6 for Free

With my ongoing conversion to OSX I am now in need of a new 3D solution that will enable me to develop for both Unity3D and XNA (still cannot leave the MS grip), thus my initial thoughts are of Blender.

However whilst browsing some XNA resources I discovered that the guys over at Caligari have Released trueSpace 7.6 for Free download. All you have to do is register for an account, then download the software.

trueSpace7.6 is a fully-featured 3D authoring package that will let you model, texture, light, animate and render 3D content. As well as traditional images and movies, you can also make 3D content for online shared spaces, and for Virtual Earth.

An entirely re-written X format exporter lets you save your trueSpace creations to load into game engines such as XNA to develop games for Windows or the Xbox 360.

A real-time scene with several lighting set-ups (by Marcel Barthel).

trueSpace also supports import from a wide variety of formats, letting you take existing objects and use them in Virtual Earth. Read..

Tags: , , , , , ,
permalink image comments image
Tuesday, 3 June '08: WiimoteLib v1.4

In an effort to put out more frequent builds with fewer changes, Brian peek has released WiimoteLib v1.4 to CodePlex. This release contains the single most requested feature: multiple Wiimote support.

The original Coding4Fun article has also been updated with some details on how to use multiple Wiimotes, as has the WiimoteTest application included with the distribution.

Changes

  • Multiple Wiimotes supported!
  • Slight change to ExtensionType enum for better extension detection
  • Decided I didn’t like the dependency on System.Drawing for the 2D point so am now using my own Point structs. Sorry…
  • WiimoteTest app updated to show multiple Wiimotes working

SOURCE: Brian Peek

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