Español
Foro

Diálogo "zerstört" después de Druckbefehl

 

thb
¡Hola,
Yo möchte gerne de uno Eingabemaske heraus una Druck starten (Datenbankanwendung). Nach el Ausdruck se el Anwender weitere Eingaben en el Maske hacer puede.
Zuerst Tuve Problemas con el zweiten Página uno mehrseitigen Ausdruckes, hier ha me Foro weitergeholfen, Yo muss el Befehl Usefont benutzen. Ausdruck klappt ahora.
Aaaaber: mein Diálogo (el sí en el Hintergrund wartet) se plötzlich no mehr con el Systemfont (?) dargestellt, para Teil verändert se el Diálogo inmediatamente o. el Veränderung beginnt en el Moment, wo I, con ratón encima el Element fahre. No sólo, dass lo hässlich aussieht, el Systemfont es auch breiter, así dass el Texto para Teil no mehr a lesen es.
Yo habe el problema tiempos de mi Programa y Datenbank gelöst, así dass lo una überschaubaren Ver código fuente son:
DECLARE DLG&, DIALOGENDE%,TEXT1&,EDIT1&,BUTTON1&
DEF GETSYSCOLOR(1) !"USER32","GetSysColor"

PROC DIALOG

    DLG&=CREATE("DIÁLOGO",%HWND,"Neues Fenster",22,20,281,182)
    USEFONT "MS Sans Serif",13,0,0,0,0
    SETDIALOGFONT 1
    TEXT1& =@CREATE("TEXT",DLG&,"Irgendein Text",0023,0022,0070,0020)
    EDIT1& =@CREATE("EDIT",DLG&,"Irgendwas",0115,0021,0120,0020)
    BUTTON1& =@CREATE("BUTTON",DLG&,"Testdruck",0026,0082,0208,0030)
    SETFOCUS(DLG&)
    DIALOGENDE%=0

    WHILENOT DIALOGENDE%

        WAITINPUT

        If %KEY=2

            DIALOGENDE%= 1

        ELSEIF CLICKED(EDIT1&)'EDIT

        ELSEIF CLICKED(BUTTON1&)'BUTTON

            UseFont Arial,0,0,0,0,0'Druck en Arial sin Textauszeichnung
            StartPrint "*Testausdruck"

            If %Printing

                MoveTo 34, 34
                LineTo 34 + 343, 34
                LineTo 34 + 343, 34 + 343
                LineTo 34, 34 + 343
                LineTo 34, 34
                EndPrint

            EndIf

        ENDIF

    ENDWHILE

    DESTROYWINDOW(DLG&)

ENDPROC

SET("AUTOPAINT",2)
'Das folgende Ventana principal es sólo para Testen:
WINDOWTITLE "DUMMY HAUPTFENSTER"
WINDOWSTYLE 63
WINDOW (%maxx-300),10-280,80
CLS RGB(0,0,0)
Color 10,0
PRINT "Bitte aufs Systemmenükreuz clic "
DIALOG'Diálogo aufrufen!

Wenn Yo nun el Button klicke, se el Button en uno otro Schriftart dargestellt. Der Effekt tritt auch en, si yo el Druck abbreche. Verschiebe Yo, el Windows-eigenen Diálogo "Druckereinrichtung", entonces voluntad todos Elemente en mi Ventana en el Systemfont dargestellt (y z.B. el Texto es no mehr vollständig a lesen).
Gibt lo una Möglichkeit, dieses Comportamiento a unterbinden? Tal vez auch sin, todos Elemente en el Ventana neu a redactar?
Thomas
 
17.04.2012  
 




RGH
¡Hola,

en solchen Fällen debería uno no USEFONT benutzen, en el Font uno Fensters oder Dialoges a conjunto. Der Befehl es sólo sinnvoll, si uno para todos Ventana y el Druck el selben Font nutzen möchte. Yo verwende USEFONT sólo todavía para el Druckausgabe y el Edición en el Ventana con DrawText.

Um el Font para una Ventana/Diálogo/Dialogelement gezielt a conjunto, verwende @CREATE("FONT",....), en una Font-Handle a erzeugen y SETFONT, en dieses Handle gezielt una Ventana etc. zuzuweisen o. SETDIALOGFONT con el Handle como Parámetro, en ihn allen más Dialogen o. Dialogelementen zuzuweisen.

Merke:
1. USEFONT sólo para el Druckausgabe oder Edición en el Ventana con DrawText uso!
2. SETDIALOGFONT sólo una Fonthandle benutzen, y niemals con 1.

Saludo
Roland
 
XProfan X2
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
17.04.2012  
 




Jörg
Sellmeyer
Am Besten Usted setzt después de el Erstellen des Hauptfensters el Programmschriftart con:

fest. Es el Standardschriftart, el el User eingestellt ha. Dafür muß con
 $H windows.ph

el Headerdatei eingebunden voluntad. Das ha todavía el Vorteil, dass Usted kein Fonthandle al Programmende löschen mußt.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
17.04.2012  
 




thb
Perfekt. Gracias!
Thomas
 
17.04.2012  
 



Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

7.740 Views

Untitledvor 0 min.
H.Brill06.06.2021
HofK20.07.2016
Pauli21.08.2013
mein02.06.2013
Más...

Themeninformationen

Dieses Thema ha 3 subscriber:

thb (2x)
Jörg Sellmeyer (1x)
RGH (1x)


Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie