clarion

CLARION Date Conversion C# + DATE ADD/SUBTRACT

你离开我真会死。 提交于 2020-01-13 09:27:07
问题 *(This is for ISV database so I am kind of reverse engineering this and cannot change) ... How can I do the following date to int (visa/versa) conversion in C# ... So Say the Date is: 5/17/2012 it gets converted to int 77207 in the database. At first I thought this was a Julian date however it does not appear to be the case. I was fooling around with the method from Julian Date Question however this does not match up. var date = ConvertToJulian(Convert.ToDateTime("5/17/2012")); Console

Convert from tps to csv

强颜欢笑 提交于 2019-12-31 04:17:11
问题 I am writing a program based on an SQL database to take the base of a Clarion 16 bit program which is soon to be non functional. However, I need to get their old records and the program does not offer much as far as export, and TopScan is like 600 dollars for a year. Is there any way for me to convert the .tps files they have to .csv? Before you start spitting out ideas here's what I've tried: Data Management Center (only lets me do the first 20 and also like 600 dollars) tpsUtil (returns

Programmatically set button text

[亡魂溺海] 提交于 2019-12-24 12:24:16
问题 How do you programmatically set the button text in Clarion? Obviously I can use the designer interface to set the default text on a control, but I want to be able to change the display text in the code. Is there a way to do that? I've tried things like the following, but nothing has worked or even compiled: ?Button1:Text = 'Test' 回答1: You can programmatically set the text of a button in Clarion using PROP:text : ?Button1{PROP:Text} = 'Test' I figured this out based on some research from

.NET DLL needs to receive a Clarion callback procedure and then all it passing three ints?

旧巷老猫 提交于 2019-12-21 20:38:12
问题 I'm writing a C# .NET DLL for a Clarion (Clarion is C++ like programming language) program. I call into the C# .NET DLL just fine, all is working great. However, I need that C# .NET DLL to receive a Clarion Procedure for callback purposes and then be able to call that procedure passing three int parameters. The Clarion Procedure looks like this (a Clarion long is a C# int): MyCallBack procedure(long p1, long p2, long p3) ... Data ... code ... Code ... How do I pass the abvoe procedure to the

Hide cmd window from Clarion

烈酒焚心 提交于 2019-12-12 23:32:41
问题 Is there a way to hide a cmd window in Clarion 8? I run xcopy to copy files defined in fields an application so it looks something like this: Run('Xcopy '&Clip(Loc:Pathfrom)&' '&loc:Pathto') i.e. Run(' C:\Temp\Temp.tps c:\Bakup\') . Maybe there is a cmd or Clarion command not to show the black window but only do the copying? 回答1: No. Using the Clarion RUN() function with a console application like xcopy.exe , it isn't possible to hide the command line interface window using the documented

Conditionally set OLE definition

眉间皱痕 提交于 2019-12-11 13:44:24
问题 In Clarion, I'm looking to set the definition for an OLE dynamically in a window. Right now, this is how I define two OLE objects in a window: Window WINDOW('Test ActiveX Window'), AT(,,431,92), FONT('MS Sans Serif', 8,, FONT:regular), COLOR(COLOR:White), CENTER, ALRT(F2Key), TIMER(10), GRAY OLE, AT(10,3,11,7), USE(?MyOLE1), HIDE, CREATE('MyActiveX.MyActiveXCtrl.1'), COMPATIBILITY(021H) END OLE, AT(30,3,11,7), USE(?MyOLE2), HIDE, CREATE('SomeOtherActiveX.SomeOtherActiveXCtrl.1'),

How to extract data from a .tps topscan Clarion file?

坚强是说给别人听的谎言 提交于 2019-12-11 06:52:11
问题 I have to make a MySQL database from a Clarion database. The tables are .tps files. I don't know how to do it, for now I only found applications that work with .dat files. 回答1: I made an open-source bulk tps-to-csv conversion utility. Its based on reverse engineering the TPS file format, so make sure you double check the results. The source (Java) can be found is available on github. 回答2: If you have a copy of Clarion, you should have the topscan.exe utility. It has an export feature. 来源:

.NET DLL needs to receive a Clarion callback procedure and then all it passing three ints?

冷暖自知 提交于 2019-12-04 12:38:51
I'm writing a C# .NET DLL for a Clarion (Clarion is C++ like programming language) program. I call into the C# .NET DLL just fine, all is working great. However, I need that C# .NET DLL to receive a Clarion Procedure for callback purposes and then be able to call that procedure passing three int parameters. The Clarion Procedure looks like this (a Clarion long is a C# int): MyCallBack procedure(long p1, long p2, long p3) ... Data ... code ... Code ... How do I pass the abvoe procedure to the C# .NET DLL and how does the C# .NET DLL call that procedure passing three int parameters? Thanks in

How to count each digit in a range of integers?

倖福魔咒の 提交于 2019-12-03 00:16:36
问题 Imagine you sell those metallic digits used to number houses, locker doors, hotel rooms, etc. You need to find how many of each digit to ship when your customer needs to number doors/houses: 1 to 100 51 to 300 1 to 2,000 with zeros to the left The obvious solution is to do a loop from the first to the last number, convert the counter to a string with or without zeros to the left, extract each digit and use it as an index to increment an array of 10 integers. I wonder if there is a better way

How to count each digit in a range of integers?

十年热恋 提交于 2019-12-02 14:01:09
Imagine you sell those metallic digits used to number houses, locker doors, hotel rooms, etc. You need to find how many of each digit to ship when your customer needs to number doors/houses: 1 to 100 51 to 300 1 to 2,000 with zeros to the left The obvious solution is to do a loop from the first to the last number, convert the counter to a string with or without zeros to the left, extract each digit and use it as an index to increment an array of 10 integers. I wonder if there is a better way to solve this, without having to loop through the entire integers range. Solutions in any language or