[Gambas-user] Printing from a module

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Nov 15 16:46:47 CET 2012


I've got it running, I found Paint.DrawText instead of Paint.Text would 
do it...

Am 15.11.2012 15:30, schrieb Fabien Bodard:
> Why the printer is on your form ?
>
>
> In your module declare a new printer
>
> Drucker = new printer() as "Drucker"
>
> You must declare the printer where you use it.
>
> There is another way but i think this one is the most simpler. Andif i
> understand well you don't need the printer object on the form
>
>
>
> 2012/11/15 Tobias Boege <taboege at ...626...>
>
>> On Thu, 15 Nov 2012, Rolf-Werner Eilert wrote:
>>> Hi folks, I have a question:
>>>
>>> In FMain I have a Printer object (Printer icon) and a Button to click on
>>> for printing.
>>>
>>> The whole printing procedure should take place in a separate module to
>>> keep the lengthy code apart from FMain code.
>>>
>>> The Button_Click event calls druck.start in the module "druck". But my
>>> printing object "drucker" isn't known there.
>>>
>>> So, what must I write to switch from FMain to the printing module? How
>>> can the module know about my printer object?
>>>
>>> I have made public the forms, I have made public the Printer object. But
>>> still its name ("drucker") is unknown in the module.
>>
>> If you successfully made your control public, I don't know what could be
>> wrong but you can still do druck.start(drucker), i.e. give the object as
>> a parameter to the module. This would make the code even more generic ;-)
>>
>> (It _may_ be possible that you just have to use FMain.drucker but I don't
>> remember.)
>>
>> Regards,
>> Tobi
>>
>>
>> ------------------------------------------------------------------------------
>> Monitor your physical, virtual and cloud infrastructure from a single
>> web console. Get in-depth insight into apps, servers, databases, vmware,
>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
>> Pricing starts from $795 for 25 servers or applications!
>> http://p.sf.net/sfu/zoho_dev2dev_nov
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
>




More information about the User mailing list