More ActiveX

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
User avatar
MigSoft
Posts: 74
Joined: Sat Aug 02, 2008 5:51 am
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL, FireBird
Location: Santiago - Chile
Contact:

More ActiveX

Post by MigSoft »

Code: Select all

/*
   Este ejemplo requiere que tengas instalado el OCX de RMChart
   puedes descargarlo de http://www.rmchart.com/
   Adaptado para HMG por MigSoft 2008 <fugaz_cl/at/yahoo.es>
*/

#include "minigui.ch"
#include "RMChart.ch"
#include "hbclass.ch"

Static oChart

FUNCTION Main()

   Define Window Start At 0,0 Width 600 Height 450         ;
          Title "Demo RMChart - Adapted by MigSoft for HMG" Main ;
          ON Size Adjust() ON Maximize Adjust()

          @ 0,0 ACTIVEX ActiveX1 Width start.Width - 7 ;
          Height start.Height - 35 PROGID "RMChart.RMChartX"

   // Object oChart
   oChart := Start.ActiveX1.Object

   oChart:Reset()
   oChart:RMCBackColor   := Bisque
   oChart:RMCStyle       := RMC_CTRLSTYLE3DLIGHT
   oChart:RMCWidth       := 600
   oChart:RMCHeight      := 450
   oChart:RMCBgImage     := ""
   oChart:Font           := "Tahoma"

   // Add Region 1
   oChart:AddRegion()

     With object oChart:Region( 1 )

         :Left   := 5
         :Top    := 10
         :Width  := -5
         :Height := -5
         :Footer := "http://www.sourceforge/projects/minigui"

         // Add caption to region 1
         :AddCaption()

         With object :Caption()
             :Titel       := "Saldos por Banco año 2008"
             :BackColor   := Bisque
             :TextColor   := Black
             :FontSize    := 11
             :Bold        := .T.
         End

         // Add grid to region 1
         :AddGrid()

         With object :Grid
             :BackColor   := Cornsilk
             :AsGradient  := .F.
             :BicolorMode := RMC_BICOLOR_NONE
             :Left        := 0
             :Top         := 0
             :Width       := 0
             :Height      := 0
         End

         // Add data axis to region 1
         :AddDataAxis()

         With object :DataAxis( 1 )
             :Alignment      := RMC_DATAAXISLEFT
             :MinValue       := 0
             :MaxValue       := 50000
             :TickCount      := 11
             :Fontsize       := 8
             :TextColor      := Black
             :LineColor      := Black
             :LineStyle      := RMC_LINESTYLESOLID
             :DecimalDigits  := 0
             :AxisUnit       := " $"
             :AxisText       := "Miles de Dólares\9b"
         End

         // Add label axis to region 1
         :AddLabelAxis()

         With object :LabelAxis
             :AxisCount     := 1
             :TickCount     := 6
             :Alignment     := RMC_LABELAXISBOTTOM
             :Fontsize      := 8
             :TextColor     := Black
             :TextAlignment := RMC_TEXTCENTER
             :LineColor     := Black
             :LineStyle     := RMC_LINESTYLESOLID
             :AxisText      := "Primer semestre"
             :LabelString   := "Enero*Febrero*Marzo*Abril*Mayo*Junio"
         End

         // Add legend to region 1
         :AddLegend()

         With object :Legend
             :Alignment           := RMC_LEGEND_CUSTOM_UL
             :BackColor           := LightYellow
             :Style               := RMC_LEGENDRECT
             :TextColor           := Blue
             :Fontsize            := 8
             :Bold                := .F.
             :LegendString        := "Citibank*Boston*BBVA*Santander"
         End

         // Add Series 1 to region 1
         :AddBarSeries()

         With object :BarSeries(1)
             :SeriesType          := RMC_BARSTACKED
             :SeriesStyle         := RMC_COLUMN_FLAT
             :Lucent              := .F.
             :Color               := DarkBlue
             :Horizontal          := .F.
             :WhichDataAxis       := 1
             :ValueLabelOn        := RMC_VLABEL_NONE
             :PointsPerColumn     := 1
             :HatchMode           := RMC_HATCHBRUSH_OFF
             :DataString          := "10000*10000*16000*12000*20000*10000"
         End

         // Add Series 2 to region 1
         :AddBarSeries()

         With object :BarSeries(2)
             :SeriesType          := RMC_BARSTACKED
             :SeriesStyle         := RMC_COLUMN_FLAT
             :Lucent              := .F.
             :Color               := DarkGreen
             :Horizontal          := .F.
             :WhichDataAxis       := 1
             :ValueLabelOn        := RMC_VLABEL_NONE
             :PointsPerColumn     := 1
             :HatchMode           := RMC_HATCHBRUSH_OFF
             :DataString          := "5000*7000*4000*15000*10000*10000"
         End

         // Add Series 3 to region 1
         :AddBarSeries()

         With object :BarSeries(3)
             :SeriesType          := RMC_BARSTACKED
             :SeriesStyle         := RMC_COLUMN_FLAT
             :Lucent              := .F.
             :Color               := Maroon
             :Horizontal          := .F.
             :WhichDataAxis       := 1
             :ValueLabelOn        := RMC_VLABEL_NONE
             :PointsPerColumn     := 1
             :HatchMode           := RMC_HATCHBRUSH_OFF
             :DataString          := "10000*3000*12000*10000*5000*20000"
         End

         // Add Series 4 to region 1
         :AddBarSeries()

         With object :BarSeries(4)
             :SeriesType          := RMC_BARSTACKED
             :SeriesStyle         := RMC_COLUMN_FLAT
             :Lucent              := .F.
             :Color               := DarkGoldenrod
             :Horizontal          := .F.
             :WhichDataAxis       := 1
             :ValueLabelOn        := RMC_VLABEL_NONE
             :PointsPerColumn     := 1
             :HatchMode           := RMC_HATCHBRUSH_OFF
             :DataString          := "5000*9000*12000*6000*10000*5000"
         End

     End

     oChart:Draw( .T. )

   End window

   Center window start
   Activate window start

RETURN Nil

Procedure Adjust()
   start.ActiveX1.Width  := iif( start.Width  -  7 < 50, 50, start.Width  -  7 )
   start.ActiveX1.Height := iif( Start.height - 35 < 50, 50, start.height - 35 )
Return(Nil)
Attachments
migActiveX.zip
(8.02 KiB) Downloaded 833 times
Last edited by MigSoft on Sat Aug 23, 2008 1:43 pm, edited 1 time in total.
Regards,

MigSoft.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: More ActiveX

Post by Rathinagiri »

It looks amazing! :)

Thanks a LOT.

To make this sample work, you have to install RMChart Active X (Freeware) & Gdiplus.dll in your system.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: More ActiveX

Post by Roberto Lopez »

MigSoft wrote:

Code: Select all

/*
   Este ejemplo requiere que tengas instalado el OCX de RMChart
   puedes descargarlo de http://www.rmchart.com/
   Adaptado para HMG por MigSoft 2008 <fugaz_cl/at/yahoo.es>
*/
[/quote]

WOW! 

Thanks!!!

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: More ActiveX

Post by esgici »

GREAT ! Thanks MigSoft

There isn't a "Easy Report" . OCX ?

Saludos

--

esgici
Viva INTERNATIONAL HMG :D
User avatar
MigSoft
Posts: 74
Joined: Sat Aug 02, 2008 5:51 am
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL, FireBird
Location: Santiago - Chile
Contact:

Re: More ActiveX

Post by MigSoft »

Hello,

It is one of the many doors that open to professional reports, taking into account that it is a tool of third.

More information on http://www.rmchart.com/rmc/axhelp/basic.htm

Regards,

MigSoft
Regards,

MigSoft.
Post Reply