Page 16 of 39
Posted: Sun Oct 19, 2008 11:00 am
by srod
No that output seems fine.
Oh well whatever the problem is I don't think we'll ever get to the bottom of it!

Just put it down to 'one of those things!'!!!
**EDIT : can you point me towards one of those virtual drivers (I need a Vista version though). If I can get one of them to misbehave on my machine then I may be able to shed some light on it.
Posted: Sun Oct 19, 2008 2:05 pm
by Little John
srod wrote:Oh well whatever the problem is I don't think we'll ever get to the bottom of it!

Just put it down to 'one of those things!'!!!
Yes, I also think that this will be the best. Spending too much time with this probably isn't worth the effort.
srod wrote:**EDIT : can you point me towards one of those virtual drivers (I need a Vista version though). If I can get one of them to misbehave on my machine then I may be able to shed some light on it.
I've sent you a PM with the regarding information, so you can play with it ... erm ... I mean do some research.
Thank you so much for your efforts!!
Regards, Little John
Posted: Sat Nov 08, 2008 7:22 pm
by srod
ADO demo added. 8th Nov. 2008.
I have translated (and added to the COMate package) Kiffi's PureDispHelper example for creating and adding/retrieving records from/to an OLE DB source using ADO. Also included is Kiffi's 'ado constants' file which will be required.
This is the first time I have used ADO with PB and I have to say it is nice. I likes it!
I am going to create a simple wrapper around ADO to allow for easy access to the basic commands etc. Shouldn't take too long. The wrapper will of course use COMate.
See the nxSoftware site for the download.
Posted: Fri Nov 14, 2008 11:58 am
by graves
Hi, srod,
I've a problem with COMate type-modifiers on EXCEL
if I send this line:
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = '001' AS STRING")
EXCEL assigns a NUMERIC format to cell, but I need to assign a TEXT format to it.
There is some solution?
Posted: Fri Nov 14, 2008 12:39 pm
by srod
Well you are at the mercy of Excel there. You can either use some method/property or other to set the format of the cell or use an apostrophe!!! Any cell entry beginning with an apostrophe is formatted as text by Excel.
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = '$0027001'")
The $0027 escape sequence is used to insert the apostrophe.
Posted: Fri Nov 14, 2008 2:32 pm
by graves
Thanks, srod.
I've tried it and it runs.
With an apostrophe, Excel treats numbers like text. But it marks all cells with a little green triangle. (Excel 2003).

Posted: Fri Nov 14, 2008 2:39 pm
by srod
Yes that is a bit of a pain.
As I say the alternative is to format the cell as text by using the appropriate methods.
Posted: Fri Nov 14, 2008 2:45 pm
by srod
Here you are :
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = 001")
ExcelObject\SetProperty("Cells(1,1)\NumberFormat = '@'")
Or set a range of cells :
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = 001")
ExcelObject\SetProperty("Range('A1:B10')\NumberFormat = '@'")
etc.
Posted: Sat Nov 15, 2008 5:08 pm
by Nico
Hello,
In the example AnimatedGif. AniGif, how changed the background color?
Posted: Sat Nov 15, 2008 6:29 pm
by srod
Edit the .gif file!
If you want to color the container then you'll have to subclass it because the ATL library will already have done that, meaning that PB's coloring commands are being bypassed. I am unsure what will happen if you subclass an ATL control?
Posted: Sat Nov 15, 2008 7:42 pm
by Nico
OleView gives me this:
Code: Select all
HRESULT CopyTransImage();
[id(0x60030003)]
HRESULT LoadFile(
[in] BSTR FileName,
[in] VARIANT_BOOL DoNotStart);
[id(0x60030006)]
HRESULT StopAnimate(
[in] VARIANT_BOOL StopAtFirstFrame,
[in] VARIANT_BOOL StopAtOnce);
[id(0x60030007)]
HRESULT RestartAnimate();
[id(0x60030008)]
HRESULT NextFrame();
[id(0x68030001), propput]
HRESULT BackColor([in] OLE_COLOR rhs);
[id(0x68030000), propget]
HRESULT TimerStatus([out, retval] VARIANT_BOOL* );
[id(0x6003000c)]
HRESULT FinishCycleFast();
But I do not manage to use BackColor ?
Posted: Sat Nov 15, 2008 10:18 pm
by srod
Ah I see - sorry! My apologies.
Code: Select all
color = #Blue
GifObject\SetProperty("BackColor = " + Str(color))
Works fine here.
Posted: Sat Nov 15, 2008 10:25 pm
by Nico
Thanks Srod!
Posted: Sun Nov 16, 2008 9:32 am
by graves
srod wrote:Here you are :
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = 001")
ExcelObject\SetProperty("Cells(1,1)\NumberFormat = '@'")
Or set a range of cells :
Code: Select all
ExcelObject\SetProperty("Cells(1,1) = 001")
ExcelObject\SetProperty("Range('A1:B10')\NumberFormat = '@'")
etc.
Wow, It Runs!!!
Tanks, again
Posted: Sun Nov 16, 2008 11:01 am
by srod
graves wrote:
Wow, It Runs!!!
Of course it does my old mucka!
