Newbie Question : OCX & pb 6.5

Hi all,

I've just finish my first ActiveX Component (a simple toolbar), with vb 6.0,
but it seems that I've missed something...
I can "import" my ocx in pb 6.5, I can run the application etc... but...
I can't call ocx's methods and properties...

Here is my piece of code :
ole_toolbar is my ocx....(hu... the OLE container)
ole_toolbar.AddItem("Some texte for the caption of the item")
or
ole_toolbar.BkColor = RGB(some values...)

pb doesn't recognize AddItem function and BkColor Property...
Why...?

thx you,
Cedric Menec


0
Cedric
12/15/1999 5:57:16 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

3 Replies
378 Views

Similar Articles

[PageSpeed] 2

Try:

ole_toolbar.OBJECT.AddItem("Some texte for the caption of the item")

-Dave

On Wed, 15 Dec 1999 17:57:16 -0000,
 in powersoft.public.powerbuilder.ole-ocx-activex
Cedric Menec <none> wrote: 
>Hi all,
>
>I've just finish my first ActiveX Component (a simple toolbar), with vb 6.0,
>but it seems that I've missed something...
>I can "import" my ocx in pb 6.5, I can run the application etc... but...
>I can't call ocx's methods and properties...
>
>Here is my piece of code :
>ole_toolbar is my ocx....(hu... the OLE container)
>ole_toolbar.AddItem("Some texte for the caption of the item")
>or
>ole_toolbar.BkColor = RGB(some values...)
>
>pb doesn't recognize AddItem function and BkColor Property...
>Why...?
>
>thx you,
>Cedric Menec
>
>
0
David
12/15/1999 8:13:26 PM
Try:

ole_toolbar.Object.AddItem("Some texte for the caption of the item")

Note the use of the 'Object' qualifier.

---
pbm_hopethishelps,
Roy Kiesler [TeamSybase]
Sybase Developer Network (SDN) - http://www.sybase.com/sdn




On Wed, 15 Dec 1999 17:57:16 -0000,
 in powersoft.public.powerbuilder.ole-ocx-activex
Cedric Menec <none> wrote: 
>Hi all,
>
>I've just finish my first ActiveX Component (a simple toolbar), with vb 6.0,
>but it seems that I've missed something...
>I can "import" my ocx in pb 6.5, I can run the application etc... but...
>I can't call ocx's methods and properties...
>
>Here is my piece of code :
>ole_toolbar is my ocx....(hu... the OLE container)
>ole_toolbar.AddItem("Some texte for the caption of the item")
>or
>ole_toolbar.BkColor = RGB(some values...)
>
>pb doesn't recognize AddItem function and BkColor Property...
>Why...?
>
>thx you,
>Cedric Menec
>
>
0
Roy
12/15/1999 9:00:23 PM
hi,

Bingo !!!
Great it compile...
thx you all ;)

Cedric Menec <none> a �crit dans le message :
oe6zX2xR$GA.287@forums.sybase.com...
> Hi all,
>
> I've just finish my first ActiveX Component (a simple toolbar), with vb
6.0,
> but it seems that I've missed something...
> I can "import" my ocx in pb 6.5, I can run the application etc... but...
> I can't call ocx's methods and properties...
>
> Here is my piece of code :
> ole_toolbar is my ocx....(hu... the OLE container)
> ole_toolbar.AddItem("Some texte for the caption of the item")
> or
> ole_toolbar.BkColor = RGB(some values...)
>
> pb doesn't recognize AddItem function and BkColor Property...
> Why...?
>
> thx you,
> Cedric Menec
>
>


0
Cedric
12/16/1999 10:00:58 AM
Reply:

Similar Artilces:

Delphi 5 OCX and PB 6.5
Hi I have created a Delphi 5 ActiveX that manage a series of BMP images. I inserted it in PB 6.5 (using the tips posted here, i.e., getting a native pointer, etc.). It worked fine... for a while. But now I'm having a little trouble with the following description: Within the ActiveX inserted in PB 6.5: 1.- I construct an image (a BMP) for printing it. 2.- I use the delphi printer object to put a title over the image. 3.- I print it and everything is OK. The title and the image appear. 4.- Here is the trouble. I print it again and just the title appear. I don�t know why the ...

OCX and PB 8 (vs PB 6.5)
We have developped an application with PB 6.5 which included some OCX (DynaZip, Imaging and another dedicated to secure payment with visa card). It worked fine under PB 6.5 whatever the OS we were using (95, 98, Me, NT). We've migrated under PB 8.5 and now we get errors trying to access external functions of OCX. With the dynazip OCX, the behaviour is nearly correct but arguments seem to always be passed by value (and no more by reference). With the OCX dedicated to secure payment, we get error accessing external function. With the Imaging OCX, we get error accessing external func...

Crystal Reports 8.5 && PB 6.5.1 && SQLServer 2K
I am trying to incorporate Crystal Reports(8.5) into my PowerBuilder App(PB 6.5.1) but i getting an error(599) ... i am also using SQLServer 2000 for my database ... I am doing API calls to the CRPE.DLL file. My Question are : 1.) Fisrt off which all files(dlls) would i have to include in my releases so that i can have this feature work smoothly without any problems on other client machine that do nothave the Crystal Reports software intalled . 2.) Do i have to specify the Datasource though pb codes ... i was told that once i have specified one through my System DSN that the app w...

PB 6.5 & ASE 11.5
Recently granted SA role to several logins (ASE 11.5) and now a question arises: When I execute the following statement as one of the SA role logins select * from foo where foo_id = 'XXX'; I see the data in the data manipulation grid, BUT cannot change the data. If I execute this next statement as the SA role login select * from dbo.foo where foo_id = 'XXX'; I see the the data in the data manipulation grid AND can also change the data as well as save the change back to the database. If I execute the original statement as SA, then I can m...

Problem w/ PB 6.5 & 7.0, Excel, OLE & GetData()
We have experienced a problem relating to PB 6.5, OLE and Excel 97 (SR-1). Specifically, the problem is a limitation in the number of rows of Excel Spreadsheet that gets passed when the GetData() method is called on OLE control. It appears that no matter what is in the Excel Spreadsheet (varied number or columns, Print Header/Footer or not, etc.) the limitation is the number of rows that can be returned (only 48 rows). We have done several tests trying to find out what is causing the limitation and what workarounds are possible. We tried hiding or deleting column (Comments). We tr...

Problem w/ PB 6.5 & 7.0, Excel, OLE & GetData()
We have experienced a problem relating to PB 6.5, OLE and Excel 97 (SR-1). Specifically, the problem is a limitation in the number of rows of Excel Spreadsheet that gets passed when the GetData() method is called on OLE control. It appears that no matter what is in the Excel Spreadsheet (varied number or columns, Print Header/Footer or not, etc.) the limitation is the number of rows that can be returned (only 48 rows). We have done several tests trying to find out what is causing the limitation and what workarounds are possible. We tried hiding or deleting column (Comments). We tr...

PB 6.5 , OLAP and OCX
Hi, I want to give a drilldown functionality in the app. I am using Microsoft Horizontalflexgrid and ado. I am connecting to the ado and want to assign the recordset created to the horizontal flexgrid. There are couple of questions:- 1. How do I check whether the ADO has created a recordset or not in PB 6.5 ? 2. "ole_hflexgrid.object.rowset = nvado.recordset", this statement is giving me a error accessing external object property rowset. What am I doing wrong ? ( the full code is given below) 3. This is the strangest of all. I tried going thru the mshflx98.chm...

OCX Web and PB 6.5
Hi PB People: We are using the OCX Web browser for view html files, and we want to send a Word document that is stored in a database to the OCX Web browser, we recovered this document with the sentence SELECTBLOB document FROM DocWord; and we stored the binary object in a BLOB variable. After, we generated a temporary Word file with the data of this variable and show it in the Web browser with the Navigate(url) sentence ole_web.Object.Navigate("C:\temp\document.doc") We want to make the same without having to generate the document temporary, directly sending the informatio...

PB 6.5 & MS SQL 6.5
This is probably an MS SQL issue but I figured it was worth presenting here for some possible insight. Any help is greatly appreciated. - I have two tables: BATCH & EMPLOYER_GROUP - BATCH is a child of EMPLOYER_GROUP - EMPLOYER_GROUP_ID is the primary key column in EMPLOYER_GROUP and a foreign key column in BATCH - The EMPLOYER_GROUP_ID column in BATCH may be null - There is current only one record in BATCH. The EMPLOYER_GROUP_ID column is null in that record. The following SELECT does not (in my opinion) work correctly: SELECT * FROM BATCH, EMPLOYER_GROUP ...

PB 6.5 & MSSQL 6.5->7
I have several heavily used and widely distributed apps that use ODBC to connect to MSSQL 6.5. I would like to upgrade my database to MSSQL 7. Obviously, it would be great if I could just turn off the old server and plug in the new server (same name, ip address) and have the apps connect to it with their current setups. This doesn't seem very likely. What would you suggest as the best approach? Thanks for your suggestions. Jeremy You will have to have a test server to do this for the first time. Weather it will be smooth or not, it depends on three major factors: the ...

PB 6.5 crash with Sheridan OCX
I am using Sheridan's SSYear OCX control. It worked fine for me under PowerBuilder 5.004. But in PB 6.5 i get a GPF in PBVM60.DLL if I click between days too quickly. I've tried moving the click event's code to a user event and I've tried allocating space for the strings that the ole_calendar uses before their usage with no luck. My OLE DLLs are later than what is recommended. Any ideas? Thanks. I had (actually, I still have) problems with OCX controls and PB 6.5 executables too (see discussion: "PB 6.5 OCX Crashes in EXE") and someone recommended ...

How to use .ocx files in pb 6.5
Hi all, I'm kinda newbie and I have to attacht this bar-code scanner to my powerbuilder application. With mscomm32.ocx this has to work, but HOW? Can anyone PLEASE!!! help me!!??! Thnx in advance, Jona jona@home.nl Open a window and then from the window toolbar select 'OLE ' from the visual components list. This will open a dialog box. Go to third tab 'Insert Control' and selected your required ocx. If its not already registered then register it by the button 'Register New' Hope it helps Suhail Sarwar ...

Internet Explorer OCX in PB 6.5
Hi all, just started testing to use OLE objects in PB 6.5 trying to build an browser using Microsoft WebBrowser Object. When doing this in Visual Basic I have no problem accessing properties or functions of this control but when trying to do the simplest task of them all in PB I'm failing on ex. "Unknown function name: navigate". When using objectBrowser looking at the objects properties/functions and so on in PB it lists the functionname "navigate". I found an example on how to work with IE in PB 7. But I don't have this version of PB thats why I'm ask...

PB 6.5 OCX Crashes in EXE
I have build an application in Powerbuilder 6.5 that uses 2 OCX controls. One of them is the GanttOCX from AddSoft, the other one is home-made. Both OCX controls are working fine when running the appliction from within the PB 6.5 development environment, but if I run the executable and try to open the windows containing the controls the executable is crashing and causing a Access Violation. This happens with both the controls. Some Additional information: The OCX controls are created as a visual ole user object and this ole user object is placed on a window. If you have any ideas...

Web resources about - Newbie Question : OCX & pb 6.5 - sybase.ole-ocx-activex

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

Neil D'Costa and Chris Rogers question whether more could be done to honour memory of Phillip Hughes
Phillip Hughes' long-time coach and mentor has questioned whether cricket administrators are doing &quot;everything humanly possible&quot; to ...

Australia vs New Zealand third cricket Test: Michael Hussey questions Grant Baldwin call
Former Test star Michael Hussey has accused the Australian cricket team of being &quot;unprofessional&quot; for allowing their massage therapist ...

Question Of The Day: First-ever car ride?
Filed under: Automotive History The first time you were ever in a motor vehicle, what was it? Continue reading Question Of The Day: First-ever ...

Race is a "broad and protean" matter, presenting "rich, difficult questions," and "Any insistence otherwise ...
John McWhorter writes, in a WSJ piece, "Closed Minds on Campus" : The idea that only the naive or the immoral would question issues connected ...

Four new Laquan McDonald shooting videos raise more questions
Newly released videos from four additional police vehicles at the scene of the 2014 shooting of Laquan McDonald raise questions about how the ...

Ask Me Anything: Questions 1 & 2
I recently started a new feature where you can ask me anything by recording a video. Turns out that I got two closely related questions about ...

Want a job at Apple? Here are 10 of the toughest interview questions
We alternately praise and criticize the folks at Apple depending on whether they just created the iPhone or Apple Maps, but there’s no doubting ...

Rep. Mike Pompeo: 'My wife gave me an F' for my Benghazi questions to Clinton
Republican Congressman Mike Pompeo has been thinking long and hard about his rather odd "performance" during his House Select Committee's interrogation ...

The 5 New Questions That Will Determine If There's A Government Shutdown In 2 Weeks
Here we go again: There are less than 2 weeks left before the current continuing resolution expires at midnight December 11. If Congress and ...

Resources last updated: 11/29/2015 11:29:21 PM