MonthCalendar

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

martingz
Posts: 395
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico

Re: MonthCalendar

Post by martingz »

No te preocupes Pablo, espero que sea de ayuda para ti y el resto del grupo

saludos
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MonthCalendar

Post by Pablo César »

martingz wrote:No te preocupes Pablo, espero que sea de ayuda para ti y el resto del grupo
Ohhh si há sido muy útil, primero cuando mencionaste sobre hacerlo con Grids y luego tu código con los cambios de colores. Estoy todavia preparando un ejemplo genérico que irá servir para estas circunstancias.

Lo que queria aclarar que el MonthCalendar tiene tamaño distintos en XP y en Win7. Por eso es bueno tratarlo con holgura para que funcionen bien en ambos SO.
En Win7
En Win7
Screen1.PNG (66.23 KiB) Viewed 5284 times
En WinXP
En WinXP
Screen2.PNG (45.19 KiB) Viewed 5284 times
Quedó mayor, pero puede ser exibido en ambos casos.

Sobre tambien comenté en este tópico.

Luego que termine, iré postar el código para feriados. ;)

Gracias Martin por tu valiosa atención :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: MonthCalendar

Post by andyglezl »

Hola Pablo Cesar

Para XP yo le reduje una cantidad de la que tengo en Win7, y lo manejé así:
-------------------------------------------------------------------------
For XP I cut him a number of which I have on Win7, and I handled it well:

Code: Select all

#define VerOS               SUBSTR( OS(), 9, 2 )     // "Windows 7" "Windows XP"
    .
    .
    IF VerOS == "XP"
        Form_Main.Calendario.Height:=( Form_Main.Calendario.Height * 2 )- 12
        ...
    ENDIF
No he manejado lo de colores aleatorios que quieres. :(
-----------------------------------------------------
I have not handled the random colors you want. :(
Attachments
calend.jpg
calend.jpg (43.43 KiB) Viewed 5279 times
Andrés González López
Desde Guadalajara, Jalisco. México.
martingz
Posts: 395
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico

Re: MonthCalendar

Post by martingz »

Pablo , Andy que buenos diseños felicidades , espero que pronto podamos ver el ejemplo de Pablo

saludos
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MonthCalendar

Post by Pablo César »

andyglezl wrote:Para XP yo le reduje una cantidad de la que tengo en Win7, y lo manejé así:

For XP I cut him a number of which I have on Win7, and I handled it well:

Code: Select all

#define VerOS               SUBSTR( OS(), 9, 2 )     // "Windows 7" "Windows XP"
    .
    .
    IF VerOS == "XP"
        Form_Main.Calendario.Height:=( Form_Main.Calendario.Height * 2 )- 12
        ...
    ENDIF
No he manejado lo de colores aleatorios que quieres. :(
Gracias Andrés por tu interés en ayudarme. Este ajuste, como dije, ya lo tengo implementado. Sobre los colores ya lo tengo, gracias a lo que Martin pasó. Viste como pude aprovechar tu idea de imagen como muestra una agenda y su abrazadera aglutinante (clamp binder) que coloqué ? Gracias a tu idea ;)
martingz wrote:Pablo , Andy que buenos diseños felicidades , espero que pronto podamos ver el ejemplo de Pablo
Gracias Martin, semana que viene creo terminar...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MonthCalendar

Post by Pablo César »

Se pasó mucho tiempo desde entonces, pero es porque encontré muchas limitaciones que pude contornarlas gracias a la ayuda de Dr. Soto y en hacer funciones alteradas dentro de mi código fuente.

No sé como irá se comportar el calendário en los diferentes idiomas.

Espero que gusten. :)

Cualquier cambio o mejora me gustaria que lo comentaran.

---

I spent much time since then, but because I found that I could overcome many limitations with the help of Dr. Soto and implemented with altered functions within my source code.

Do not know how the calendar will behave in different languages.

I hope you like. :)

Any change or improvement you would like to receive yours comments.
Screen.PNG
Screen.PNG (42.49 KiB) Viewed 5231 times
Screen1.PNG
Screen1.PNG (35.99 KiB) Viewed 5231 times
Attachments
Calendar(Source files).rar
(59.69 KiB) Downloaded 386 times
Calendar(Executable file).rar
(890.46 KiB) Downloaded 545 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: MonthCalendar

Post by Javier Tovar »

Gracias por compartir PabloCésar :D

Saludos
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: MonthCalendar

Post by fchirico »

Pablo, excelente aplicación!

Gracias por compartirla.

Te hago dos comentarios:

1) Reporte de Error:
En la rutina de "Non-Working-Day" si existen fechas definidas en "Regular Holidays", son mostradas como pintadas pero para todos los años, es
decir si vas cambiando de año arrastra esas fechas mostrándolas coloreadas en todos los años.

2) Sugerencia:
En la rutina de "Non-Working-Day" si existen fechas definidas en "Regular Holidays", las mostraría de otro color a las definidas a "Non-Working-Day" solo para que a la vista quede claro que se ingresaron por rutinas diferentes.

----------------------------------------------

Paul, great app!

Thanks for sharing.

I make two comments:

1) Error Report:
In the routine of "Non-Working-Day" if dates defined in "Regular Holidays" you exist, they are displayed as painted but for all years is
say if you are changing from year showing them drag these dates colored in all years.

2) Tip
In the routine of "Non-Working-Day" if dates defined in "Regular Holidays" exist, show a different color to the defined "Non-Working-Day" just to sight it clear that it entered through routines different.
Saludos, Fernando Chirico.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MonthCalendar

Post by Pablo César »

Javier Tovar wrote:Gracias por compartir PabloCésar :D
Gracias tambien por tu interés. :) Si te fijas el código hay várias funciones (que iré listar) que trabajan de forma exclusivas para esa aplicación.

Image
Javier Tovar wrote:Thanks for sharing PabloCésar :D
Thanks for your interest too. :) If you look at the source code there are several functions (I will make mention in list) working exclusive form for this application.

Image
fchirico wrote:1) Reporte de Error:
En la rutina de "Non-Working-Day" si existen fechas definidas en "Regular Holidays", son mostradas como pintadas pero para todos los años, es decir si vas cambiando de año arrastra esas fechas mostrándolas coloreadas en todos los años.
Hola Fernando, muchas gracias por tus indicaciones e interés. En esta observacion, el aplicativo trabaja justamente de acuerdo y propositacional, no es error. En mi opinion es importante que para todos los años traiga del FixeDays.dbf todos los dias feriados que son fijos. Hay feriados nacionales e internacionales que siempre caen en el mismo dia del año. Por eso existe esa opcion "Regular Holidays" para ingresar y hacerla vale en todos los años. Porque serian feriados fijos. Si caso alguno de esos dias deba ser considerado como dia comun, es solo desmarcarlo, pero creo que al principio deberia atender como feriado fijo.
2) Sugerencia:
En la rutina de "Non-Working-Day" si existen fechas definidas en "Regular Holidays", las mostraría de otro color a las definidas a "Non-Working-Day" solo para que a la vista quede claro que se ingresaron por rutinas diferentes.
Si entiendo el propósito y seria viable. Me gustó la idea, gracias. :)

Image
1) Error Report:
In the routine of "Non-Working-Day" if dates is defined in "Regular Holidays", It is displayed as painted but for all years when is changing year showing with same dates colored too.
Hi Fernando, thank you very much for your interest and indications. In this observation, the application works just in agree and propositacional is no mistake. In my opinion it is important to bring fixed holidays for all years from FixeDays.dbf because these holidays are with days fixed at year (not change the day). There are national and international holidays that always fall on the same day of the year. It is for that reason, exists the option "Regular Holidays" to input and make it holiday fexed for every year. If in any case of those days should be considered as common day, user just can uncheck it, but I think the principle should serve as a fixed holiday.
2) My Tip
In the routine of "Non-Working-Day" if dates defined in "Regular Holidays", show with a different color to be defined in "Non-Working-Day" just to sight it clear that it was entered through different routines.
If I understand the purpose and be viable. I liked the idea, thanks. :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MonthCalendar

Post by Pablo César »

At "Non-Working-Day" module:

1. There is a way to include day of week as not workable too. Just clicking on grid header (Sunday, Saturday...) and will change color and could be saved.

2. Disabled keys ( LEFT, RIGHT, UP and DOWN ), to avoid navigation by keyboard keys.

3. Differentiated components size and positions for WinXp and Win7.

4. Displayed in different language for day of week, months thru Harbour functions: AMonths() and ADays().

5. Changed navigation cell colors. This it was to hide highlighted cursor at grid. It was not posible to disable and the only way is to put on same color other cells.

6. Applied aesthetic features as: BackColor of frame, DrawEdge for each calendar with many options (Edges: ROUNDED, RAISED, SUNKEN, BUMP, ETCHED in LEFT, TOP, RIGHT, BOTTOM, RECTANGLE, DIAGONAL made it in SOFT or FLAT)

7. Save option and switchable button when any changing occurs. Messages alerting user for pending to save.

8. GetControlCoords. Generic option to Get coordinates from each component and with adjustable option.

9. AKill. Generic function to eliminate any element of an array.

10. ListView_SetCurSel. Handleable function for moving for grid.

11. AEquals. Generic function to compare two arrays.

12. SetColorCel. Function to change cell colors in grids.

13. _HMG_DOGRIDREFRESH2. Specific function to make Refresh in grid without removing Cell colors.

14. Used _GridEx_SetColumnControl internal function to change ColumnDYNAMICFORECOLOR. Serves as a reference and example and use.

15. _DefineGrid2. Specific function for exeption option of ScrollBars at Grids. Allows and cut off ScrollBars in Grids. This is very useful when your grid is fixed sizes with no append records or need to display only fixed lines of grids. It is not usuable when needs to navigate (UP and Down) in the grid. Calendar is good example for this, fixed lines (6 weeks are displayed).

At "Regular Holidays" module:

16. OpenDbf, LockDbf, LockRecord, UnLockDbf and AddRecord. Functions handling and processing for networking for DBFs sharing.

17. Another example of Grid with Rowsource (direct editing to DBF) and functions validations and edit control (edition, deletion and retrieval of records).

Days non workable days are registered:

- For days of week (Sundays, Saturdays...) at DayOWeek.mem
- For fixed day at year of holidays, at FixeDays.dbf
- For holidays at year per year at "Year"+yyyy".dbf" (example: Year2013.dbf)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply