donderdag 29 mei 2008

New Computer

I've just received and configured my new computer. I've decided to stick with XP 32 bit, because of the good quality and good experiences of that program. Vista and/or 64 bit Windows still have issues concerning Visual Studio 2008 and installing Visual Studio 2005 might be worse. It's just choosing between the pros and the cons of each side: 64 bit Vista vs 32 bit XP. 32 bit XP is the winner.

The following essentials have been installed:

1) Security and essential system software:
a. AVG Antivirus Free 8
b. Windows Defender
c. Internet Explorer 7
d. Auslogics Registry Defragment
e. Sysinternal's Page Defrag
f. Ccleaner
g. Acronis True Image 11 Home
h. update to sp3 for XP

2) Office:
a. OpenOffice.org 2.4 (good drawing program included)
b. MS Office 2007 Home and Student
c. MS Office 2007 Access

3) Development:
a. MS Visual Studio 2008 Professional
b. MS SQL Express 2005

4) Virtuialization:
a. Virtual PC 2007sp1


Because I've already two licensed copies of XP Pro I'll transfer both into virtual machines created by Virtual PC. One license of XP has already been transferred to such a virtual machine and there is still one license to do. Both XP instances get the same essentials except "Acronis Trua Image" because I create backups of the virtual PC directories.

Instance 1:

a. OpenOffice.org (yes, it has a nice drawing program I really need)
b. Office 2000 (except Outlook)
c. Visual Studio 2008 Express (just for doing some nice experiments)
d. Visual Studio 6 (yep, it's very old, but can be practical)

Instance 2:

a. OpenOffice.org (the nice vector drawing program! Bitmap painters are toys.. ;-)
b. Visual Studio 2005 Standard (for doing some heavier experiments)
c. Turbo Delphi Explorer (I'd like to experiment with Object Pascal and Lazarus still isn't out of Beta :-( )

vrijdag 2 mei 2008

Add-in libraries

I'm experimenting with add-ins to work like a library for VBA projects. This looks like a COM DLL written in Visual Basic.

Create a normal spreadsheet and write classes and or modules in it. This normal spreadsheet is just for testing and debugging. If there are no more bugs, you can remove everything on the worksheet. Unfortunately even this will be a library, it is required that there is at least 1 worksheet available. After this you can save your work as an add-in. So do so.
Now it is time to activate the add-in as a regular add-in like Analysis toolpack. Now you can create a normal spreadsheet and go to the VBA editor and add a reference to that add-in.

Enjoy!

maandag 14 april 2008

Some wishes for Office and Visual Studio

If, but only if you have a licensed copy of Office (Excel, Word, Outlook) AND a licensed copy of Visual Studio Professional and up, you can create your own add-in libraries or you can extend your documents and templates using managed code at the expense of VBA or you can create a mixture from both worlds if you want to save that nicely-working VBA module!

I'd like to see such programmability for Access projects (.accdb databases or .adp projects) and I'd like to see the following:

1. There's a FREE Access 2007 runtime version just in order to run Access databases like applications. I'd like to see a FREE Excel 2007 runtime that can only run the underlying VBA code and only edit cells that are normal editable cells. Like the Access 2007 runtime the menus should be very very crippled just in order to execute that .xls spreadsheet as an application.
2. I'd like to be able to use an Access database or an Excel spreadsheet as a program library INSIDE my VB.NET program WITHOUT the need to 'load and execute' the whole whopping Access or Excel executable and its depending libraries. The .mdb (.accdb) or the .xls should be able to get treated like a normal .dll library.
3. I'd like to be able to re-use Office components in my own software. This should only be possible if the following is met: licensed version of Office AND a licensed version of Visual Studio.NET Professional just in order to bypass the necessity of 'loading and executing' the whole whopping Office application.

Think about an extended DAO/ADO.NET engine for Access databases that adds VBA possibilities to your database in order to create user-defined functions or a VBA version of stored-procedures to make the database more intelligent.
Think about an Excel Spreadsheet engine the cousin of Jet's database engine which is able to create full fledged .xls spreadsheets programmatically.
Think about a grid component for the sake of opening an Excel spreadsheet for data-entry or querying data resulted from calculation by formulas.
Deploying the application to customers should then be royalty-free and there should be some other licensing thoughts.

maandag 7 april 2008

Why VBA can be a P.I.T.A.

I'm maintaining an Excel spreadsheet also for Office 97 because of my work doesn't have the newest Excel. I'm also running that old Office 97 on a VMWare image running Windows'98 as the program. Reason to do is to ensure compatibility of older systems. I was busy with creating macros responding to clicks on userform buttons on the worksheet itself. I saved the bits 'n bytes and I ran the code, but the older code got used instead of the newly typed corrections. Using the debugger had lead Excel to a grinding halt: an invalid page fault occurred in the VBA32.DLL. I felt bad, since I've thought that I've ruined my project. I didn't panic or got ballistic, but I tried the "ruined" project on my other VMWare images running XP Pro sp2. Yes, I've two images: one running Office 2000 and the other Office 2007. Both Offices managed to convert a "ruined" project into a healthy one. I can debug and now the macros are using the corrected code. Then I've tried the "repaired" project back on the Windows 98/Office 97 image and now the problems were gone! It looks like that opening a potentially ruined Excel macro project can be repaired by using an Excel with higher version than the version in which bad things happen like errors in VBA32.DLL.

The best thing is acquiring both Office 2007 and Visual Studio 2008 and converting the VBA project into a managed one. But how you you do this:

1. Open Excel 2007 by clicking the project
2. Open the VBA window
3. Check the Object Inspector and export EVERYTHING to .bas or .cls files which are plain text files.
4. Close Excel
5. Open Visual Studio Professional
6. Create an empty Excel project and select your project
7. Create class-modules from your .cls files. They got suffixed .vb
8. Create module-modules from your .bas files. They got suffixed .vb
9. Correct all errors and please replace the clumsy ON ERROR instructions with TRY instructions and
your code will be very pleasant to read and to maintain!
10. If everything compiles well, you can try to run it.

Now you've got a managed .DLL that will never fail you!

woensdag 19 maart 2008

Another interesting small SQL engine

Whilst VistaDB is a nephew of SQL Server thanks to T-SQL syntax compatibility, so has Oracle a little nephew (SQL Persistent Stored Modules compatible syntax) called Advantage DB server version 9. You can grab a (trial) copy at http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=12 but you might have to register before you can download anything. When I have time, I'll give this engine a nice try. I try the local server, since it doesn't expire. I still dislike software time-bombs..

zaterdag 15 maart 2008

Interesting move concerning Mono on Linux

MonoDevelop an open-sourced IDE for creating software using Mono has gone gold. Sounds interesting! It is more stable than before, but there are some caveats:

1. The documentation is far from complete!
2. To be able to create applications graphically is darn nice, but the GTK# implementation of Windows.Form namespace requires an awkward approach: I can't simply drop components on my form, but I have to create a layout before doing anything and I'm still waiting for a normal Visual Studio compatible layout manager.
3. Monodevelop and GTK are partly written in unmanaged C++. There are layouts present but I don't like all of them, since I can't control HOW I want to place the controls on my form.
I want to control the size and the position of the components, so I don't need those silly layout-managers. If I don't use such a layout, the component gets the size of the complete form and that's very undesired. Monodevelop calls this a feature, but I call it a design-flaw.

So be warned and be patient about testing Mono. It's going better with it, but I'm not very content yet.

The reason that I also blog about MonoDevelop is the fact that I'd like to run my desktop applications anywhere and it shouldn't matter whether the OS is Windows, Linux, MacOS or Solaris! Platform neutrality is my heart's wish!

donderdag 13 maart 2008

I'm faced with one problem

I'm faced with one problem, since I cannot find a way to upload small project zip files to this blog. I've to find a way to solve this problem. There are some requirements to be met to be able to use them:

1. Excel 2007 must be installed including .NET programmability
2. Visual Studio 2008 Professional or higher must be installed
3. A copy of VistaDB must be present. I prefer the Express Edition, but the normal edition is also perfect! Avoid using the trial version, because of its time-bomb function after 30 days.

I'm against time-bomb function in trial or evaluation software for several reasons:

1. The can be circumvented by clever power-programmers
2. There are better ways to distinguish between a licensed version or an evaluation copy

Are there examples? Yes there are:

a. Microsoft deploys non-expiring Express Editions of Visual Studio. There are limitations (add-ins inpossible), but evaluators can evaluate the product as their hearts' content and enjoy programming.
b. CodeGear/Borland deploys non-expiring Explorer Editions of the Turbo series of Delphi, C++ Builder. There are even more limitations compared with MS's Visual Studio Express, but the user can enjoy using the package!
c. Other vendors display 'nag-screens' with the statement that deploying is prohibited or they make a water-mark into the resulting executables or libraries. As long as the evaluator doesn't deploy anything, he or she is legally using the product for evaluating purposes.
d. Some deploy special Community or Free Editions with some limitations or none at all, but using the software under this license is forbidden for commercial usage.
e. A light-version of a piece of software only runs while the IDE is active or a nag-screen gets displayed.

By using these ways of deployment and (evaluation)licensing I think that counterfeiting will diminish. Time-bombing looks like the cause of counterfeiting and cracking.