The future depends on us. It is up to us to the future of Clarion.
Will this programming language to live long and happy life or dies in oblivion depends on us. If you have to say, do it here in this blog. Welcome!

Read More

CFC Toolbar And Resizing

There are some moments about resizing of the toolbar’s buttons.

By and large the system itself decides what size to set for the button. That is why I set the style TBSTYLE_AUTOSIZE by default. You can find it at the method CFCToolbar.AddButton. This flag specifies that the toolbar control should not assign the standard width to the button. Instead, the button’s width will be calculated based on the width of the text plus the image of the button (MSDN).

The height of the button depends on the height of other buttons. For example, if you have a WHOLEDROPDOWN-button or DROPDOWN-button (with arrow) the height will be increased. Also you can not create a buttons with a different height.

The method CFCToolbar.AutoSize resizes the toolbar control but not the buttons.

Any toolbar lays on the rebar-control if you use a CFC template. The height of the toolbar depends on the height of rebar. That means that the method CFCToolbar.SetButtonSize does not do anything.

So, I have made a conclusion that you can not set the button size. The size defines automatically by the system.

Maybe it is only my problem. I spent many time to solve it. But I have no results. And I’ve decide that there is not so important that I can not control the size. The system usually does it better.

Tags: | No Comments »

Category: General

MS SQL Field Box 2.4 released

I’ve updated MS SQL Field Box. I’ve added the ability to view relationships between tables and ability to execute sp_spaceused procedure.

Tags: | No Comments »

Category: SQL, Utilites

EasyListView Version 1.00

Ingasoft company just released new product EasyListView. As I understand from review it is a wrapper for .NET listbox. That means that you can forget about the old styled Clarion listboxes. The .NET listbox looks amazing :) In any case, you should pay attention to it.

easylstview

Tags: | No Comments »

No Records Available 2

Today I have told with my friend about a class which was written yesterday (see the post below). He have reminded me about ABC Free template which can save and restore listbox format. That’s why I changed the class so little :)
I’ve added a new method which restores the format. You need to restore format before “ABC Free” template. You can see the code of method below:

CFCNoRecordsAvailableClass.RestoreLBFormat PROCEDURE
 CODE
 IF LEN(CLIP(SELF.SavedFormat))
    SELF.ListBoxFeq{PROP:From} = SELF.Q
    SELF.ListBoxFeq{PROP:Format} = CLIP(SELF.SavedFormat)
    SELF.ListBoxFeq{PROP:Disable} = SELF.SavedDisableProp
    SELF.ListBoxFeq{PROP:LineHeight} = SELF.SavedLineHeight
 END

ABCFreeSaveLBFormat

Tags: | No Comments »

Category: Source code

No Records Available

I have seen the title “No records available” earlier. Some programs show it in an empty listbox. I have added this little feature in the MS SQL Field Box yesterday. You will see the next image if the table has no indexes:

noindexes

Today, I have decided to make a class. This class should be able to show that title in any listboxes. And I made it. It is a very simple class. The main goal consist in the next lines:

    IF NOT RECORDS(SELF.Q)
       SELF.SavedFormat = SELF.ListBoxFeq{PROP:Format}
       SELF.SavedLineHeight = SELF.ListBoxFeq{PROP:LineHeight}
       SELF.ListBoxFeq{PROP:From} = SELF.DisplayQueue
       SELF.ListBoxFeq{PROP:Format} = '1000C(2)@s255@'
       SELF.ListBoxFeq{PROP:Disable} = TRUE
       SELF.ListBoxFeq{PROP:LineHeight} = SELF.ListBoxFeq{PROP:Height}
    ELSE
       SELF.ListBoxFeq{PROP:From} = SELF.Q
       SELF.ListBoxFeq{PROP:Format} = CLIP(SELF.SavedFormat)
       SELF.ListBoxFeq{PROP:Disable} = FALSE
       SELF.ListBoxFeq{PROP:LineHeight} = SELF.SavedLineHeight
    END

All listboxes display a queue. If queue is empty I change the format of listbox. I specify the another queue for listbox (PROP:From). This queue consist of one column and contains only the one string record. This record contains the title “No records available”. Also I change the height of the listbox row. You can see how it will look below:

abc_browse

related_browses

related_browses01

If listbox’s queue is not empty I just restore previously saved properties.

There is a one question: How to define when the queue is empty? And there is a simple answer: use a timer. I use a WinAPI timer. That is why I need to subclass a listbox.

You need to use only two methods for one listbox. This is the Init and Kill. You need to pass two params to Init-method. This is the browse queue and listbox equate.

CFCNoRecordsAvailableClass.Init(Queue:Browse:1,?Browse:1)

You can change the default title ‘No records available’ to your own using SetWarningStr method.

I think that source code is clear :)

Download a source code (C6.3 application)

Please, register a dp_class.tpl template before open the demo application.
This code works at C7 too.

Tags: | No Comments »

Category: Source code

MS SQL Field Box 2.3 released

MS SQL Field Box 2.3 released. I added a popup menu. This items is usefull for me :)
mssqlfb23

Tags: | No Comments »

Category: SQL, Utilites

CFC Library 3.0

getontop
CFC Library 3.0 released. I’ve add some documentation and video :)
This is the first version which is released only by annual subscription. I have many ideas to improve the library. I will try to add new possibilities. It’s always nice to talk about plans :) But in fact I do not have so much time to develop the library. Therefore, this changes will not happen quickly.

ps
I made this screenshot from motleysoft.com.

Tags: | No Comments »

Category: General

New CFC Video And SnagIt

Today I have made the video. You can download it here.
I downloaded a new version of SnagIt. I was hoping that the new version will work better than the previous one. This is not so. Maybe the problem is in my old computer. It works well but it is too slow when the SnagIt works. And video has a small disturbance. Also, I do not know how to edit the video. SnagIt does not have any tool for this. Maybe I need an another tool but I like SnagIt for screen capturing and I like the small size of the video.

Tags: , , | No Comments »

Category: Clarion7, Utilites

Life goes on!

I thought that they just drink beer but I was wrong. They want to show what they have been cooking over the last few months. Aussie Devcon 2009 soon :)

Tags: , | No Comments »

Category: General

“MS SQL Field Box 2.2″ released

I’ve just updated the MS SQL Field Box. Now it supports schemes and MS SQL 2008.
MSFB is a tool that allows to view a database structure and populates tables or column names in T-SQL editor. MS SQL managers 2000 and 2005 does not have built-in IntelliSense component. 3rdParty components like SQL Prompt or SQL Assistant cost a money. MSFB is free. Of course, MSFB is not so handy as IntelliSense. It is an alternative way.

Tags: | No Comments »

Category: Clarion7

CFC Library Documentation

I just started to translate the CFC documentation. I think that I will translate the template documentation only. After that I will release a new version. I think that it will be fast. The remaining large part of the documentation will be translated gradually. I have an idea to add the demo video to some templates.

Although in reality, how to work with templates almost always clear. Settings in the templates say for themselves. I rarely read the documentation for the templates, and all so clear.

Tags: | No Comments »

Category: General

CFC Library Documentation

Today, I have finished the documentation of library on russian language. It includes about 300 html-pages. Now I need to translate it to english :)

Tags: | No Comments »

Category: General

Clarion Folk

There are some Clarion-blogs that are not updated for a long time. It is not so easy to publish something. Comments are also very important. And you have your own personal life of course. That is why some of blogs are dead.

I think that if I was an English speaking person that I would write more often.

Tags: | No Comments »

Category: General

MS SQL 2008: Indexed view

I have a two tables. The first table consists of one column. This is the date column. The second table contains a goods and a new sale price for that goods.
This is the history of price changing.

July, 1             July, 1
-------             -------
product_1           product_3 -> error!!!
product_2           product_4
product_3           product_5

That means that I can have a duplicate dates. But if I’ll have a duplicate goods for one date that it will be an error.

I have found the easy way to solve this problem. I’ve created a view:

CREATE VIEW dbo.vPriceChanges
WITH SCHEMABINDING
AS
SELECT
   PCD.GoodsID,
   PC.DateChangePrice
FROM
   dbo.PriceChangesDetail PCD
   JOIN dbo.PriceChanges PC ON PC.PriceChangeID = PCD.PriceChangeID

And I’ve created a unique index on that view:

CREATE UNIQUE CLUSTERED INDEX
UQ_vPriceChanges ON dbo.vPriceChanges
(GoodsID, DateChangePrice)

I will write later if I’ll have a problem with this decision :)

Tags: , | No Comments »

Category: SQL

Copying Data

I have a new task. I need to copy a data from remote office to main office. The data is the MS SQL database. What I need is just copy a database from one office to another.

And I can’t do it.

I can communicate between offices only by e-mail. This is the slow connection. I can download about 6 megabytes per one hour. The database have a 4 GB size. The full archived backup is about 500 MB. I need to receive the new data every day.

I know about a differential backup. But I need to restore a full backup before restoring a differential backup every time. That is why I think that the restoring will get all the server’s time after one month. There are 15 remote offices.

I thought that this is not so hard task. But now I don’t know how to solve it.

Tags: , | 7 Comments »

Category: SQL
Pages: Prev 1 2 3 4 5 6 7 8 9 10 ...113 114 115 Next