Thursday, November 29, 2007

Build 172

SET BELL has been added to Guineu. SET BELL ON|OFF is supported as is SET BELL TO [filename]. Both work on the desktop and on mobile devices with sound support. Currently, the only limitation is that the WAV file must be an external file. Embedded files are not yet supported.

Build 171

The manual has been updated to reflect that GuineuIDE is now the preferred method to use Guineu. You can still use Guineu.EXE to directly run an FXP, if you wish. I think, though, that compiling a project with SCXes, VCXes and PRGs into a single EXE is closer to what most developers actually want to do. GuineuIDE only runs in Visual FoxPro 9.0 which is now checked when you start GuineuIDE. The Build menu itself remains enabled even if there's no project open.

Most changes in this build are internal stuff. For instance, I enhanced the way that variables are internally managed, fixed several issues that Code Analysis in VS.NET 2008 flagged, and the like.

Friday, November 16, 2007

Build 168

Fixed #47: Implemented the PageCount property for pageframes. Assigning a value now automatically creates the desired number of pages. Forms with pageframes can now be compiled with GuineuIDE.

Thursday, November 15, 2007

Build 167

ERASE and COPY FILE are two new commands in Guineu.

ERASE supports the RECYCLE clause to move files into the recycle bin. I haven't it tested on platforms other than Windows desktops yet. Guineu supports ERASE ?, as well as the undocumented ERASE "". Both let the user interactively choose a file.

COPY FILE copies files. SET SAFETY is not yet supported. If the destination file exists it is overwritten. There might be some scenarios that do not yet work the same as in VFP. COPY FILE in Guineu does not work on embedded files.

Build 166

I implemented various font properties: FontName, FontSize, FontBold, FontItalic, FontUnderline and FontStrikeThru. The properties are available in Form, Label, CommandButton, Checkbox, Combobox, Listbox, Page, Editbox and Textbox.

As a .NET application, Guineu uses GDI+ to display text. Therefore the precise dimensions of text might slightly differ from what you see in Microsoft Visual FoxPro™.

Tuesday, November 13, 2007

Build 165

This build contains all samples I've shown in the past weeks at Southwest Fox 2007 and the German DevCon 2007 in Frankfurt. Here's a brief overview on what has changed:

Guineu.sql.dll is a new runtime for Microsoft SQL Server 2005. It can be used to create stored procedures and functions for SQL Server with Guineu. The runtime supports only a subset of the other Guineu runtimes. In particular, it doesn't support any user interface controls such as forms, and the like. The classes work mostly, but you won't see anything. Because this still requires some manual work on the sources, the SQL runtime is not as far as the other two runtimes, yet. I'll work on making the required changes to generate the SQL runtime from the latest version automatically.

The new SQL runtime is used by the SQL 2005 Stored Procedure target that creates an assembly for SQL server and a SQL script to load the assembly into the database. If SQL Management Studio 2005 is installed on your computer, it's automatically launched when you build the project to let you deploy the new version of your library. Currently support for SQL has some limitations. Stored Procedures and Functions cannot receive any parameters and return only numeric or string values. Let me know if you need anything different.

To install stored procedures on SQL 2005 servers you need to perform some configuration. Please note that Guineu requires opening up SQL server 2005 quite a bit in order to run assemblies. You DBA might not like this, so make sure you check before writing too much code. Also, do not install Guineu on any production server. These steps are required to enable Guineu on a SQL server using Northwind as the sample database:

  1. Activate the CLR:

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'clr enabled', 1;
    GO
    RECONFIGURE;
    GO

  2. Change the compatibility level:

    use master
    go
    exec sp_dbcmptlevel 'northwind', 90
    go

  3. Enable full trust:

    ALTER DATABASE northwind SET TRUSTWORTHY ON

StoredProcedures is a sample project that demonstrates how you can use the context database engine to retrieve data from the database. Even though this code looks like it's going through ODBC it's actually accessing SQL server locally.

Deployment of mobile applications requires one more new DLL: OpenNETCF.dll. You must copy this DLL along with your mobile application and Guineu.compact.dll.

ActiveX Control is a new target in GuineuIDE. It compiles all visual classes stored in VCXes into ActiveX controls and creates a sample HTML page that loads this ActiveX control in Internet Explorer (or your preferred browser if it supports ActiveX controls). You can use these controls in other applications, as well. Right now, ActiveX support has some limitations, though:

  • You can only load one ActiveX control per process. If you have multiple controls currently you must use multiple projects and create multiple DLLs.
  • No methods are made available publically. You can add controls, but you can't access them from the outside.
  • There is a problem in hosting Guineu ActiveX controls inside Visual FoxPro forms.

ActiveX is a sample project that demonstrates a simple ActiveX control with a DBF file. Please note that all tables must be on the local machine that executes the ActiveX control.

Managed Library is similar to the ActiveX Control build target. However, it doesn't generate any COM InterOp code which makes the component only available to managed applications. You can use this library to add controls to a WinForm application, for instance. In the current release, Guineu Managed Libraries do not have designer support. That means, you need to create the control in code and add it to the Controls collection of the form. You can use the ActiveX sample project to create managed libraries, as well.

CompactDatabase is a new sample that demonstrates how you can access Microsoft SQL Server 2005 Compact Edition. This version of SQL server can be deployed by just copying some DLL files and the database file. You don't have to install any server or attach any database. The compact database file can be up to 4 GB in size. The engine runs on mobile devices and Windows desktops.


 

Saturday, November 3, 2007

Build 163

Console Application is a new build target in GuineuIDE. It's similar to Guineu.EXE. When you run a console application, Windows automatically opens a console window (DOS prompt). All output of ? and ?? is directed to this window. You can call the application from Explorer, the CMD prompt or a batch file. Output can be redirected to a file using the ">" operator or piped to a different application:

MyGuineuApp.EXE | MORE

A Guineu console application can create forms which are created as regular windows just like with the Managed Application (EXE) target. Guineu doesn't (yet) have a text based GUI like Microsoft FoxPro® DOS/Unix. When you execute a console application, the console waits for the application to terminate.