How to define main window from template .FMG file ?

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

How to define main window from template .FMG file ?

Post by huangchenmin »

Dear Sir: :D
I would like to saperate those different kind of file such as .FMG、.PRG .......
It means that I will not write define window code in .prg instead of .FMG.
Following are steps I wish could be done.
1.define plenty of form as template in individual .fmg file.
2.Loading form from .fmg when necessary.
The benefit is share the same form definition with plenty of routine.

Could it possible? How should I do? :?:

Best Regard
:lol: chen min :lol:
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to define main window from template .FMG file ?

Post by Roberto Lopez »

huangchenmin wrote:Dear Sir: :D
I would like to saperate those different kind of file such as .FMG、.PRG .......
It means that I will not write define window code in .prg instead of .FMG.
Following are steps I wish could be done.
1.define plenty of form as template in individual .fmg file.
2.Loading form from .fmg when necessary.
The benefit is share the same form definition with plenty of routine.

Could it possible? How should I do? :?:

Best Regard
:lol: chen min :lol:
There is lots of samples showing that in \samples\external.windows.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to define main window from template .FMG file ?

Post by huangchenmin »

Roberto Lopez wrote:
huangchenmin wrote:Dear Sir: :D
I would like to saperate those different kind of file such as .FMG、.PRG .......
It means that I will not write define window code in .prg instead of .FMG.
Following are steps I wish could be done.
1.define plenty of form as template in individual .fmg file.
2.Loading form from .fmg when necessary.
The benefit is share the same form definition with plenty of routine.

Could it possible? How should I do? :?:

Best Regard
:lol: chen min :lol:
There is lots of samples showing that in \samples\external.windows.
Dear Roberto
Thank you very much.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to define main window from template .FMG file ?

Post by huangchenmin »

Roberto Lopez wrote:
huangchenmin wrote:Dear Sir: :D
I would like to saperate those different kind of file such as .FMG、.PRG .......
It means that I will not write define window code in .prg instead of .FMG.
Following are steps I wish could be done.
1.define plenty of form as template in individual .fmg file.
2.Loading form from .fmg when necessary.
The benefit is share the same form definition with plenty of routine.

Could it possible? How should I do? :?:

Best Regard
:lol: chen min :lol:
There is lots of samples showing that in \samples\external.windows.
Dear Roberto
I read couples of those samples. They load template with the name of fmg.
Could compiler tell different from each .prg that have same window name. It is a little bite similar to Polymorphism.Following are I desire to do.

There is a form template named a.fmg.
Is that possible to load a.fmg and give individual name.
How show I do to declar one of them as main form ?

Best Regards
chen min
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to define main window from template .FMG file ?

Post by huangchenmin »

huangchenmin wrote:
Roberto Lopez wrote:
huangchenmin wrote:Dear Sir: :D
I would like to saperate those different kind of file such as .FMG、.PRG .......
It means that I will not write define window code in .prg instead of .FMG.
Following are steps I wish could be done.
1.define plenty of form as template in individual .fmg file.
2.Loading form from .fmg when necessary.
The benefit is share the same form definition with plenty of routine.

Could it possible? How should I do? :?:

Best Regard
:lol: chen min :lol:
There is lots of samples showing that in \samples\external.windows.
Dear Roberto
I read couples of those samples. They load template with the name of fmg.
Could compiler tell different from each .prg that have same window name. It is a little bite similar to Polymorphism.Following are I desire to do.

There is a form template named a.fmg.
Is that possible to load a.fmg and give individual name.
How show I do to declar one of them as main form ?

Best Regards
chen min
Dear Roberto
I found『AS』clause in reference. I think that is what I need.
Thank you again.
Best Regards
chen min
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to define main window from template .FMG file ?

Post by Roberto Lopez »

huangchenmin wrote: Dear Roberto
I found『AS』clause in reference. I think that is what I need.
Thank you again.
Best Regards
chen min
Yes, it is.

You'll find an exact sample of that in: \samples\multi.instance.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to define main window from template .FMG file ?

Post by huangchenmin »

Roberto Lopez wrote:
huangchenmin wrote: Dear Roberto
I found『AS』clause in reference. I think that is what I need.
Thank you again.
Best Regards
chen min
Yes, it is.

You'll find an exact sample of that in: \samples\multi.instance.
Dear Roberto
After reading that sample, I realize how to load a form from template and assign it a new name. Is that possible to define Form_1 as main from template ?
Best Regards
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: How to define main window from template .FMG file ?

Post by Roberto Lopez »

huangchenmin wrote:
Roberto Lopez wrote:
huangchenmin wrote: Dear Roberto
I found『AS』clause in reference. I think that is what I need.
Thank you again.
Best Regards
chen min
Yes, it is.

You'll find an exact sample of that in: \samples\multi.instance.
Dear Roberto
After reading that sample, I realize how to load a form from template and assign it a new name. Is that possible to define Form_1 as main from template ?
Best Regards
Of course. All the IDE samples (\samples\external.windows) has its main window defined as a .fmg external file.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply