PureDispHelper UserLib - Update with Includefile for Unicode

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Amundo
Enthusiast
Enthusiast
Posts: 200
Joined: Thu Feb 16, 2006 1:41 am
Location: New Zealand

Post by Amundo »

Thanks very much for this, ts-soft. I was wondering whether someone had done anything with this lib (I looked at it for FreeBasic, but never got into it fully). This will help for my WMI project.

Thanks again!
Win10, PB6.x, okayish CPU, onboard video card, fuzzy monitor (or is that my eyesight?)
"When the facts change, I change my mind" - John Maynard Keynes
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Update Version 1.1

Added an extra lib to support ocx-gadgets

Syntax:

Code: Select all

object = OCX_CreateGadget(Gadget.l, x.l, y.l, widht, height.l, ProgID.s)
This function isn't in the helpfile, but there 2 examples added, using is easy!

I hope it works with all OCX

STrainbowBar.ocx in action:
Image
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Interesting. Thanks.

The two ActiveX examples are playing merry buggery with my firewall!

Are they using a browser control as a container?
I may look like a mule, but I'm not a complete ass.
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

OMG thats the funky shit!

thanks this can be very very usefull :!:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

srod wrote: Are they using a browser control as a container?
The using an PB_Container, but a call of AtlAxCreateControl is required.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

That'll be it then! :)

Many thanks to yourself + kiffi. Absolutely awesome work.
I may look like a mule, but I'm not a complete ass.
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

Is it possible to catch the events of an ActiveX ?
I'm trying to use the ActiveX of CodeJock (www.codejock.com)
Thanks.

Code: Select all

XIncludeFile "..\Register_Unregister_ActiveX.pb"

EnableExplicit

dhToggleExceptions(#True)

Define.l oRainbow1, i

If OpenWindow(0, #PB_Ignore, #PB_Ignore, 400, 375, "Calendar") And CreateGadgetList(WindowID(0))
 
  oRainbow1 = OCX_CreateGadget(1, 5, 5, 390, 370, "Codejock.CalendarControl.11.1.0")
 
  dhPutValue(oRainbow1, "ViewType = %d", 2)       
  While WaitWindowEvent() ! 16 : Wend
 
  CloseWindow(0)

  If oRainbow1 : dhReleaseObject(oRainbow1) : EndIf
EndIf

LuckyLuke
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Post by Kiffi »

@Thomas: Image

@all:
here is a quick conversion of a vb-sourcecode to display the fabulous
RMChart-Control.

Code: Select all

EnableExplicit

#RMC_DATAAXISLEFT=1
#RMC_LINESTYLEDOT=2
#RMC_LABELAXISBOTTOM=8
#RMC_TEXTCENTER=0
#RMC_LINESTYLENONE=6
#RMC_BARSINGLE=1
#RMC_BAR_FLAT_GRADIENT2=3
#RMC_HATCHBRUSH_OFF=0
#RMC_BICOLOR_LABELAXIS=2
#RMC_CTRLSTYLEFLAT=0

Define.l oRMChart

dhToggleExceptions(#True)

If OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 450, "RMChart") And CreateGadgetList(WindowID(0))
  
  oRMChart = OCX_CreateGadget(1, 0, 0, 640, 450, "RMChart.RMChartX")
  
  Debug oRMChart
  
  If oRMChart
    
    ; '************** Design the chart **********************
    
    dhCallMethod(oRMChart, ".Reset")
    dhPutValue(oRMChart, ".Font = %s", @"Comic Sans MS")
    dhPutValue(oRMChart, ".RMCBackColor = %u", -984833) ; 'AliceBlue'
    dhPutValue(oRMChart, ".RMCStyle = %d", #RMC_CTRLSTYLEFLAT)
    dhPutValue(oRMChart, ".RMCWidth = %d", 640)
    dhPutValue(oRMChart, ".RMCHeight = %d", 450)
    
    ; ************** Add Region 1 *****************************
    
    dhCallMethod(oRMChart, ".AddRegion")
    
    dhPutValue(oRMChart, ".Region(%d).Left = %u", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).Top = %u", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).Width = %u", 1, -5)
    dhPutValue(oRMChart, ".Region(%d).Height = %u", 1, -5)
    dhPutValue(oRMChart, ".Region(%d).Footer = %s", 1, @"")
    
    ; ************** Add caption to region 1 *******************
    
    dhCallMethod(oRMChart, ".Region(%d).AddCaption", 1)
    
    dhPutValue(oRMChart, ".Region(%d).Caption.Titel = %s", 1, @"This is the chart's caption")
    dhPutValue(oRMChart, ".Region(%d).Caption.BackColor = %u", 1, -16776961) ; 'Blue'
    dhPutValue(oRMChart, ".Region(%d).Caption.TextColor = %u", 1, -256) ; 'Yellow'
    dhPutValue(oRMChart, ".Region(%d).Caption.FontSize = %d", 1, 11)
    dhPutValue(oRMChart, ".Region(%d).Caption.Bold = %b", 1, #True)
    
    ; ************** Add grid to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddGrid", 1)
    
    dhPutValue(oRMChart, ".Region(%d).Grid.BackColor = %u", 1, -657956) ; 'Beige'
    dhPutValue(oRMChart, ".Region(%d).Grid.AsGradient = %b", 1, #False)
    dhPutValue(oRMChart, ".Region(%d).Grid.BicolorMode = %d", 1, #RMC_BICOLOR_LABELAXIS)
    dhPutValue(oRMChart, ".Region(%d).Grid.Left = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Top = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Width = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Height = %d", 1, 0)
    
    ; ************** Add data axis to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddDataAxis", 1)
    
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).Alignment = %d", 1, 1, #RMC_DATAAXISLEFT)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).MinValue = %d", 1, 1, 0)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).MaxValue = %d", 1, 1, 100)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).TickCount = %d", 1, 1, 11)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).FontSize = %d", 1, 1, 8)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).TextColor = %u", 1, 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).LineColor = %u", 1, 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).LineStyle = %d", 1, 1, #RMC_LINESTYLEDOT)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).DecimalDigits = %d", 1, 1, 0)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).AxisUnit = %s", 1, 1, @"")
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).AxisText = %s", 1, 1, @"")
    
    ; ************** Add label axis to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddLabelAxis", 1)
    
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.AxisCount = %d", 1, 1)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TickCount = %d", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.Alignment = %d", 1, #RMC_LABELAXISBOTTOM)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.FontSize = %d", 1, 8)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TextColor = %u", 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TextAlignment = %d", 1, #RMC_TEXTCENTER)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LineColor = %u", 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LineStyle = %d", 1, #RMC_LINESTYLENONE)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LabelString = %s", 1, @"Label 1*Label 2*Label 3*Label 4*Label 5")
    
    ; ;************** Add Series 1 to region 1 *******************************
    ; 
    dhCallMethod(oRMChart, ".Region(%d).AddBarSeries", 1)
    
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).SeriesType = %d", 1, 1, #RMC_BARSINGLE)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).SeriesStyle = %d", 1, 1, #RMC_BAR_FLAT_GRADIENT2)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Lucent = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Color = %u", 1, 1, -10185235) ; 'CornflowerBlue'
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Horizontal = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).WhichDataAxis = %d", 1, 1, 1)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).ValueLabelOn = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).PointsPerColumn = %d", 1, 1, 1)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).HatchMode = %d", 1, 1, #RMC_HATCHBRUSH_OFF)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).DataString = %s", 1, 1, @"50*70*40*60*30")
    
    dhCallMethod(oRMChart, ".Draw")
    
  EndIf
  
  While WaitWindowEvent() ! 16 : Wend
  
  CloseWindow(0)
  
  If oRMChart : dhReleaseObject(oRMChart) : EndIf
  
EndIf
Image

The Chart (including an Help file which contains also all necessary
constants) can be downloaded here: http://www.rmchart.com/

Have fun!

Greetings ... Kiffi
Last edited by Kiffi on Tue Apr 24, 2007 11:05 pm, edited 1 time in total.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

LuckyLuke wrote:Is it possible to catch the events of an ActiveX ?
I think, you can't use events, only you can get the values with a timer.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Find & Replace a text in word...

Code: Select all

dhToggleExceptions(#True)

Define.l oWord = dhCreateObject("Word.Application")

text.s="PureDispHelper Sample"+Chr(13)+Chr(10)
wdReplaceAll.l = 2

If oWord

  dhPutValue      (oWord, "Visible = %b", #True)
  
  dhCallMethod    (oWord, "Documents.Add")
  
  dhCallMethod    (oWord, "Selection.TypeText(%s)", @text)
  dhCallMethod    (oWord, "Selection.TypeText(%s)", @text)
  dhCallMethod    (oWord, "Selection.TypeText(%s)", @text)
  dhCallMethod    (oWord, "Selection.TypeText(%s)", @text)

  
  ;Find & Replace in Word
  dhCallMethod    (oWord,"Selection.Goto = %u",0,0,0)
  
  dhPutValue      (oWord,"Selection.Find.Forward = %b",#True)
  dhPutValue      (oWord,"Selection.Find.MatchWholeWord = %b",#True)
  dhPutValue      (oWord,"Selection.Find.Text = %s",@"Sample")
  dhPutValue      (oWord,"Selection.Find.Replacement.Text = %s",@"DONE")
  
  dhCallMethod    (oWord, "Selection.Find.Execute(%m,%m,%m,%m,%m,%m,%m,%m,%m,%m,%u)",wdReplaceAll)
  
  dhReleaseObject (oWord) : oWord = 0
  
EndIf
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Nice one. I'd managed to get the first instance of 'Sample' highlighted, but couldn't complete it.

Where did you get the information on the missing parameters?

**EDIT: found the info.

http://www.romanpress.com/cbooks/Word2_ ... eplace.htm
I may look like a mule, but I'm not a complete ass.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

ts-soft wrote:
LuckyLuke wrote:Is it possible to catch the events of an ActiveX ?
I think, you can't use events, only you can get the values with a timer.
I guess that for catching events you need to develope a COM object & register it.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Small Update:

Some OCX haven't a ProgID.s, so i have added an optional parameter for
CLISD.s

Syntax:

Code: Select all

Object = OCX_CreateGadget(Gadget, x, y, width, height, ProgID.s[, CLSID.s])
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Impressive!
--Kale

Image
User avatar
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Post by einander »

Ts-Soft and Kiffi : Thanks!!! Very good work.


Here is Kiffi's RMChart-Control example, with a new main loop to change bar sizes on real time.

Code: Select all

 
#RMC_DATAAXISLEFT=1
#RMC_LINESTYLEDOT=2
#RMC_LABELAXISBOTTOM=8
#RMC_TEXTCENTER=0
#RMC_LINESTYLENONE=6
#RMC_BARSINGLE=1
#RMC_BAR_FLAT_GRADIENT2=3
#RMC_HATCHBRUSH_OFF=0
#RMC_BICOLOR_LABELAXIS=2
#RMC_CTRLSTYLEFLAT=0

Define.l oRMChart

dhToggleExceptions(#True)
;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
hwnd= OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 450, "RMChart") 
StickyWindow(0,1)
CreateGadgetList(hwnd)
oRMChart = OCX_CreateGadget(1, 0, 0, 640, 450, "RMChart.RMChartX")
Debug oRMChart
    
If oRMChart
    ; '************** Design the chart **********************
    dhCallMethod(oRMChart, ".Reset")
    dhPutValue(oRMChart, ".Font = %s", @"Comic Sans MS")
    dhPutValue(oRMChart, ".RMCBackColor = %u", -984833) ; 'AliceBlue'
    dhPutValue(oRMChart, ".RMCStyle = %d", #RMC_CTRLSTYLEFLAT)
    dhPutValue(oRMChart, ".RMCWidth = %d", 640)
    dhPutValue(oRMChart, ".RMCHeight = %d", 450)
    
    ; ************** Add Region 1 *****************************
    
    dhCallMethod(oRMChart, ".AddRegion")
    
    dhPutValue(oRMChart, ".Region(%d).Left = %u", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).Top = %u", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).Width = %u", 1, -5)
    dhPutValue(oRMChart, ".Region(%d).Height = %u", 1, -5)
    dhPutValue(oRMChart, ".Region(%d).Footer = %s", 1, @"")
    
    ; ************** Add caption to region 1 *******************
    
    dhCallMethod(oRMChart, ".Region(%d).AddCaption", 1)
    
    dhPutValue(oRMChart, ".Region(%d).Caption.Titel = %s", 1, @"Press right button and move mouse")
    dhPutValue(oRMChart, ".Region(%d).Caption.BackColor = %u", 1, -16776961) ; 'Blue'
    dhPutValue(oRMChart, ".Region(%d).Caption.TextColor = %u", 1, -256) ; 'Yellow'
    dhPutValue(oRMChart, ".Region(%d).Caption.FontSize = %d", 1, 11)
    dhPutValue(oRMChart, ".Region(%d).Caption.Bold = %b", 1, #True)
    
    ; ************** Add grid to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddGrid", 1)
    
    dhPutValue(oRMChart, ".Region(%d).Grid.BackColor = %u", 1, -657956) ; 'Beige'
    dhPutValue(oRMChart, ".Region(%d).Grid.AsGradient = %b", 1, #False)
    dhPutValue(oRMChart, ".Region(%d).Grid.BicolorMode = %d", 1, #RMC_BICOLOR_LABELAXIS)
    dhPutValue(oRMChart, ".Region(%d).Grid.Left = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Top = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Width = %d", 1, 0)
    dhPutValue(oRMChart, ".Region(%d).Grid.Height = %d", 1, 0)
    
    ; ************** Add data axis to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddDataAxis", 1)
    
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).Alignment = %d", 1, 1, #RMC_DATAAXISLEFT)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).MinValue = %d", 1, 1, 0)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).MaxValue = %d", 1, 1, 100)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).TickCount = %d", 1, 1, 11)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).FontSize = %d", 1, 1, 8)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).TextColor = %u", 1, 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).LineColor = %u", 1, 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).LineStyle = %d", 1, 1, #RMC_LINESTYLEDOT)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).DecimalDigits = %d", 1, 1, 0)
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).AxisUnit = %s", 1, 1, @"")
    dhPutValue(oRMChart, ".Region(%d).DataAxis(%d).AxisText = %s", 1, 1, @"")
    
    ; ************** Add label axis to region 1 *****************************
    
    dhCallMethod(oRMChart, ".Region(%d).AddLabelAxis", 1)
    
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.AxisCount = %d", 1, 1)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TickCount = %d", 1, 5)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.Alignment = %d", 1, #RMC_LABELAXISBOTTOM)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.FontSize = %d", 1, 8)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TextColor = %u", 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.TextAlignment = %d", 1, #RMC_TEXTCENTER)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LineColor = %u", 1, -16777216) ;  'Black'
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LineStyle = %d", 1, #RMC_LINESTYLENONE)
    dhPutValue(oRMChart, ".Region(%d).LabelAxis.LabelString = %s", 1, @"Label 1*Label 2*Label 3*Label 4*Label 5")
    
    ; ;************** Add Series 1 to region 1 *******************************
    ;
    dhCallMethod(oRMChart, ".Region(%d).AddBarSeries", 1)
    
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).SeriesType = %d", 1, 1, #RMC_BARSINGLE)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).SeriesStyle = %d", 1, 1, #RMC_BAR_FLAT_GRADIENT2)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Lucent = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Color = %u", 1, 1, -10185235) ; 'CornflowerBlue'
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).Horizontal = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).WhichDataAxis = %d", 1, 1, 1)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).ValueLabelOn = %b", 1, 1, #False)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).PointsPerColumn = %d", 1, 1, 1)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).HatchMode = %d", 1, 1, #RMC_HATCHBRUSH_OFF)
    dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).DataString = %s", 1, 1, @"50*70*40*60*30")
    dhCallMethod(oRMChart, ".Draw")
EndIf

#SEP="*"
Repeat
    EV=WaitWindowEvent()  
    _DX=DesktopMouseX()
    _DY=DesktopMouseY()
    
    _MK=Abs(GetAsyncKeyState_(#VK_LBUTTON) +GetAsyncKeyState_(#VK_RBUTTON)*2+GetAsyncKeyState_(#VK_MBUTTON)*3)/$8000   
    If _MK=2
        A$=Str(_DX / 10)
        B$=Str(_DY / 10)
        c$=Str((_DX+_DY)/10)
        d$=Str((_DX+_DY)/7)
        e$=Str((_DX+_DY)/20)
        Value$=A$+#SEP+B$+#SEP+c$+#SEP+d$+#SEP+e$+#SEP
        dhPutValue(oRMChart, ".Region(%d).BarSeries(%d).DataString = %s", 1, 1, @Value$)
        dhCallMethod(oRMChart, ".Draw")
    EndIf
Until EV=#WM_CLOSE  
    
If oRMChart : dhReleaseObject(oRMChart) : EndIf
CloseWindow(0) 
End
Post Reply