RICHEDITBOX in Panel-Window (Virtual Height)

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

Hello to all,

I have a little problem and I´m shure someone of you had the same one and perhaps solved it. For better showing, I send a screenshot of my app.
Commission.jpg
Commission.jpg (86.65 KiB) Viewed 5075 times
You see a panel-window (virtual height) containing an image, labels, controls etc. In the middle of these controls is a RichEditBox of which you can only see the upper half. When I jump from one control to the next I finally enter the RichEditBox. And now follows the problem. My panel-window (virtual-height) moves down and I see the bottom of the RichEditBox in the middle of the panel-window. But I want to see the top and not the bottom of the RichEditBox. Therefore I thought, that the function

SetScrollPos(GetFormHandle("Form_81") , SB_VERT , 370 , .T.)

would solve my problem. Now the slider of the panel-window´s VScrollBox moves to the desired position but the window moves to the wrong, deeper position. When I click on the slider, the window moves up to the right position. How can I achieve that the window follows automatically my desired position of the slider ?

Thanks in advance
Karl
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by andyglezl »

"Form_81" is the Main Window or Panel Window ?
Andrés González López
Desde Guadalajara, Jalisco. México.
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

Hi Andy,

thanks for looking at my problem. Form_81 is the panel-window (with the logo etc). Form_80 (with the big number in it) is a modal-window of the app´s main-window

Regards
Karl
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by serge_girard »

Karl,

Can you please provide the formcode? Very hard to see what's going on.

Serge
There's nothing you can do that can't be done...
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

Hi Serge,

following the whole code of this module. The window definition from line 39 - 95. The position of the VScroll-Slider from line 1157 - 1160 called by line 539 (On Gotfocus).

Regards Karl

Code: Select all

*******************************************************************************
* Programm "auf_aend_win_neu.prg" = Auftrag ändern
* begonnen am: 28.03.2017
* verändert am: 
********************************************************************************
#include <hmg.ch>

SET NAVIGATION EXTENDED

#define SB_VERT	1

PRIVATE mname1   := "", ;
        mname2   := "", ;
        mvorname := "", ;
        mstrasse := "", ;
        mplz     := "", ;
        mort     := "", ;
        mtelefon := "", ;
        maufdat  := "", ;
        mkalkdat := "", ;
        mrenr    := "", ;
        mredat   := "", ;
        mkz_art  := "", ;
        mnotiz   := "", ;
        acomnr   := "", ;
        mlfdnr   := 0, ;
        z_rec    := 0, ;
        x_rec    := 0, ;
        meld_1   := '  Achtung ! Blanko-Auftrag', ;
        meld_2   := 'Adresse oder Auftragsdatum fehlen !', ;
        meld_3   := 'Auftragsnummer ungültig !', ;
        gefunden := .F., ;
        mken1    := "", ;
        mken2    := "", ;
        mken3    := "", ;
        aufHandle, aFilename, dFilename
aFilename := 'c:\CARFA\vorlagen\Auftragslayout.rtf'

DEFINE WINDOW Form_80 ;
    AT 0,0 ;
    WIDTH 842 ;
    HEIGHT 616 ;
    TITLE 'Aufträge bearbeiten' ;
    MODAL ;
    NOSIZE ;
    NOSYSMENU ;
    BACKCOLOR {198,252,188}
    
DEFINE TOOLBAR toolbar_1 BUTTONSIZE 280,33 FONT "Arial" SIZE 10 RIGHTTEXT BORDER
    BUTTON button_1 CAPTION 'Schließen' PICTURE "Butclose" ACTION win80close()
    BUTTON button_2 CAPTION 'Drucken' PICTURE "Butprint" ACTION AuftragDruck()    
    BUTTON button_3 CAPTION 'Speichern' PICTURE "Butsave" ACTION altAufSpeich()
END TOOLBAR

DEFINE STATUSBAR FONT "Arial" SIZE 9 BOLD
    STATUSITEM ""
    STATUSITEM WIDTH 300
    STATUSITEM WIDTH 300
END STATUSBAR

@  60,250 Label label_1 OF Form_80 ;
          VALUE "Auftragsnummer" ;
          HEIGHT 20 ;
          WIDTH 150 ;
          BACKCOLOR {198,252,188} ;          
          FONT 'Arial' SIZE 12

@  50,385 TEXTBOX Text_1 OF Form_80 ;
          HEIGHT 34 ;
          WIDTH 90 ;
          FONT 'Arial' SIZE 20 ;
          VALUE '' ;
          NUMERIC ;
          MAXLENGTH 5 ;
          ON ENTER AufSuch()

@  83,5   FRAME frame_1 OF Form_80 ;
          WIDTH 826 ;
          HEIGHT 472

DEFINE WINDOW Form_81 ;
AT 90,10 ;
WIDTH 816 ;
HEIGHT 460 ;
VIRTUAL HEIGHT 1152 ;
PANEL ;
BACKCOLOR {255,255,255}
END WINDOW

Form_80.Button_2.ENABLED := .F.
Form_80.Button_3.ENABLED := .F.
END WINDOW
CENTER WINDOW Form_80
ACTIVATE WINDOW Form_80
RETURN
*****************************   Ende Hauptfenster   ****************************

****************************   Beginn Auftragssuche   **************************
FUNCTION AufSuch
Form_80.STATUSBAR.ITEM(1) := meld_1
Form_80.STATUSBAR.ITEM(2) := meld_2
SELECT ad
SET ORDER TO 1
SELECT av
SET ORDER TO 1
acomnr := Form_80.Text_1.VALUE
SEEK acomnr
IF FOUND() .AND. acomnr >= 1
  x_rec := RECNO()
  gefunden := .T.
  SET RELATION TO lfdnr INTO ad
  SET RELATION TO kz_art INTO gr
  Form_80.STATUSBAR.ITEM(3) := ""
  dFilename := 'c:\CARFA\Auftrag\' + LTRIM(STR(comnr, 5)) + '.rtf'

IF .NOT. FILE(dFilename)
  COPY FILE &aFilename TO &dFilename
  aufHandle := FOPEN(dFilename, 2 + 64)
  FCLOSE(aufHandle)
ELSE
  aufHandle := FOPEN(dFilename, 2 + 64)
  FCLOSE(aufHandle)
ENDIF
  
  AuftragsFormular2()
  Form_81.REDRAW
  Form_80.Text_1.ENABLED := .F.
  Form_81.SETFOCUS  
  BlankoPruef2()
  Form_80.Button_2.ENABLED := .T.
  Form_80.Button_3.ENABLED := .T.  
ELSE
  Form_80.STATUSBAR.ITEM(3) := meld_3
  Form_80.Text_1.SETFOCUS
ENDIF
RETURN NIL
****************************   Ende Auftragssuche   ****************************

***********************   Beginn Auftrags Formular   ***************************
FUNCTION AuftragsFormular2

@   0,0   IMAGE image_1 OF Form_81 ;
          PICTURE 'versauf' ;
          ADJUSTIMAGE

@ 98,75   LABEL Label_43 OF Form_81 ;
          VALUE 'Auftrag' ;
          HEIGHT 25 ;
          WIDTH 80 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 16 BOLD
          
@ 102,157 LABEL Label_44 OF Form_81 ;
          VALUE 'Nr.' ;
          HEIGHT 22 ;
          WIDTH 20 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 12 BOLD
          
@ 13,414  LABEL Label_45 OF Form_81 ;
          VALUE 'I  T  L  -  Fahrzeugbau  GmbH' + CHR(13) + ;
                'Industriestraße 19,   89081  Ulm' ;
          HEIGHT 45 ;
          WIDTH 300 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 12 BOLD
          
@ 152,75  LABEL Label_24 OF Form_81 ;
          VALUE LTRIM(ad->vorname) + ' ' + ad->name1 ;
          HEIGHT 18 ;
          WIDTH 320 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 9 ;
          NOPREFIX

@ 182,75  LABEL Label_25 OF Form_81 ;
          VALUE ad->name2 ;
          HEIGHT 18 ;
          WIDTH 320 ;
          BACKCOLOR {255,255,255} ;                    
          FONT 'Arial' SIZE 9 ;
          NOPREFIX

@ 242,75  LABEL Label_27 OF Form_81 ;
          VALUE ad->strasse ;
          HEIGHT 18 ;
          WIDTH 310 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 9

@ 272,75  LABEL Label_28 OF Form_81 ;
          VALUE ad->plz ;
          HEIGHT 18 ;
          WIDTH 50 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 9

@ 272,130 LABEL Label_29 OF Form_81 ;
          VALUE ad->ort ;
          HEIGHT 18 ;
          WIDTH 265 ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 9
          
@  97,193 LABEL Label_1 OF Form_81 ;
          VALUE STR(acomnr, 5) ;          
          WIDTH 65 ;
          HEIGHT 25 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 16 BOLD

@  73,420 BUTTON Button_1 OF Form_81 ;
          CAPTION 'Kennzeichen' ;
          ON CLICK KennzSuche() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          NOTABSTOP ;
          MULTILINE

@  85,420 TEXTBOX text_4 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 40 ;
          VALUE ken1 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK 'AAA' ;
	  ON CHANGE {||THIS.VALUE := HMG_UPPER(THIS.VALUE)}

@  85,464 LABEL Label_23 OF Form_81 ;
          VALUE '---' ;          
          WIDTH 10 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
	  
@  85,477 TEXTBOX text_5 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 33 ;
          VALUE ken2 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK 'AA' ;
	  ON CHANGE {||THIS.VALUE := HMG_UPPER(THIS.VALUE)}

@  85,510 TEXTBOX text_6 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 37 ;
          VALUE ken3 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '9999'
          
@  73,595 BUTTON Button_2 OF Form_81 ;
          CAPTION 'Fahrg.-Nr.' ;
          ON CLICK FgNrSuche2() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          NOTABSTOP ;
          MULTILINE

@  85,595 TEXTBOX text_11 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 165 ;
          VALUE ALLTRIM(fgnr) ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '!!!!!!!!!!!!!!!!!'
          
@ 103,420 LABEL Label_32 OF Form_81 ;
          VALUE 'Fahrgestell-' ;
          WIDTH 50 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 115,420 LABEL Label_33 OF Form_81 ;
          VALUE 'Hersteller' ;
          WIDTH 50 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 106,479 COMBOBOX Text_12 OF Form_81 ;
          DISPLAYEDIT ;
          FONT 'Arial' SIZE 8 ;
          HEIGHT 200 ;
          VALUE 1 ;
          ITEMS {fgherst, 'MERCEDES','MAN','VOLVO','SCANIA','IVECO','I T L', 'MÜLLER', 'SCHMITZ', 'ACKERMANN', 'SCHWARZMÜLLER',  'KÖGEL', 'VW','ZIKUN'} ;
          WIDTH 105
          
@ 103,595 LABEL Label_3 OF Form_81 ;
          VALUE 'Fahrg.-Typ' ;          
          WIDTH 50 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 115,595 TEXTBOX Text_13 OF Form_81 ;
          VALUE LTRIM(fgtyp) ;
          WIDTH 165 ;
          HEIGHT 14 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
          
@ 133,420 LABEL Label_34 OF Form_81 ;
          VALUE 'Aufbau-' ;
          WIDTH 50 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 145,420 LABEL Label_35 OF Form_81 ;
          VALUE 'Hersteller' ;
          WIDTH 50 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 137,479 COMBOBOX Text_10 OF Form_81 ;
          DISPLAYEDIT ;
          FONT 'Arial' SIZE 8 ;
          HEIGHT 200 ;
          VALUE 1 ;
          ITEMS {aufbherst, 'I T L','GROSS','ORTEN','BÖSE','DAIMLER-BENZ', 'MAN', 'VOLVO', 'SCANIA', 'IVECO', 'VW', 'EWERS','STARK','MILDNER','ZIKUN'} ;
          WIDTH 105

@ 133,595 BUTTON Button_3 OF Form_81 ;
          CAPTION 'Aufbau-Nr.' ;
          ON CLICK AufbNrSuche2() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          NOTABSTOP ;
          MULTILINE

@ 146,595 TEXTBOX Text_7 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 70 ;
          VALUE aufbnr ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '99999999'
          
@ 133,682 BUTTON Button_4 OF Form_81 ;
          CAPTION 'Aufbau-KZ' ;
          ON CLICK ke_su4() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          NOTABSTOP ;
          MULTILINE

@ 146,682 LABEL Label_30 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 25 ;
          VALUE kz_art ;
          BACKCOLOR {255,255,255} ;          
          FONT 'Arial' SIZE 8
          
@ 163,420 LABEL Label_5 OF Form_81 ;
          VALUE 'Aufbau-Art' ;          
          WIDTH 120 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 177,420 LABEL Label_31 OF Form_81 ;
          VALUE gr->art ;          
          WIDTH 300 ;
          HEIGHT 14 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8

@ 193,420 LABEL Label_6 OF Form_81 ;
          VALUE 'Bestell-Nr.' ;          
          WIDTH 53 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 206,420 TEXTBOX Text_14 OF Form_81 ;
          VALUE bestnr ;
          WIDTH 90 ;
          HEIGHT 14 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '!!!!!!!!'
          
@ 193,595 LABEL Label_7 OF Form_81 ;
          VALUE 'Best.-Datum' ;          
          WIDTH 55 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 206,595 TEXTBOX text_15 OF Form_81 ;
          VALUE bestdat ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE

@ 223,420 LABEL Label_8 OF Form_81 ;
          VALUE 'Rechnung-Nr.' ;          
          WIDTH 58 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 236,420 TEXTBOX Text_23 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 35 ;
          FONT 'Arial' SIZE 8 ;
          VALUE renr ;
          NUMERIC ;
          MAXLENGTH 4

@ 223,595 LABEL Label_9 OF Form_81 ;
          VALUE 'Rechn.-Datum' ;          
          WIDTH 63 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 236,595 TEXTBOX text_24 OF Form_81 ;
          VALUE redat ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE

@ 254,420 BUTTON Button_5 OF Form_81 ;
          CAPTION 'Kunden-Nr.' ;
          ON CLICK addr_6() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          NOTABSTOP ;
          MULTILINE

@ 267,420 TEXTBOX text_2 OF Form_81 ;
          HEIGHT 14 ;
          WIDTH 42 ;
          VALUE lfdnr ;
          FONT 'Arial' SIZE 8 ;
          NUMERIC ;
          MAXLENGTH 5 ;
          ON ENTER addr_7()
          
@ 254,595 LABEL Label_10 OF Form_81 ;
          VALUE 'Kunden-Telefon' ;          
          WIDTH 80 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 267,595 LABEL Label_36 OF Form_81 ;
          VALUE ad->telefon ;          
          WIDTH 130 ;
          HEIGHT 14 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8
          
@ 284,420 LABEL Label_11 OF Form_81 ;
          VALUE 'Eingang' ;          
          WIDTH 40 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 297,420 TEXTBOX text_16 OF Form_81 ;
          VALUE eingang ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE
          
@ 284,523 LABEL Label_12 OF Form_81 ;
          VALUE 'Uhrzeit' ;          
          WIDTH 35 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 297,523 TEXTBOX text_18 OF Form_81 ;
          VALUE eingtime ;
          HEIGHT 14 ;
          WIDTH 40 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '99:99'
          
@ 284,595 LABEL Label_13 OF Form_81 ;
          VALUE 'Ausgang' ;          
          WIDTH 40 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 297,595 TEXTBOX text_26 OF Form_81 ;
          VALUE ausgang ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE
          
@ 284,694 LABEL Label_41 OF Form_81 ;
          VALUE 'Uhrzeit' ;          
          WIDTH 35 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 297,694 TEXTBOX text_27 OF Form_81 ;
          VALUE ausgtime ;
          HEIGHT 14 ;
          WIDTH 40 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '99:99'
          
@ 330,72  LABEL Label_15 OF Form_81 ;
          VALUE 'A  u  s  z  u  f  ü  h  r  e  n  d  e    A  r  b  e  i  t  e  n' ;          
          WIDTH 690 ;
          HEIGHT 12 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7 BOLD ;
          CENTERALIGN
          
@ 355,72  BUTTON Button_6 OF Form_81 ;
          CAPTION 'Text schreiben' ;
          ON CLICK AufText2() ;
          WIDTH 70 ;
          HEIGHT 12 ;
          FONT 'Arial' SIZE 7 ;
          MULTILINE
          
@ 370,72  RICHEDITBOX Edit_1 OF Form_81 ;
          WIDTH 695 ;
          HEIGHT 460 ;
          VALUE '' ;
          FONT 'Times New Roman' SIZE 12 ;
          ON GOTFOCUS {||Form_81.Edit_1.RTFLoadFile(dFilename, .F., 4), changekey3()} ;
          ON LOSTFOCUS {||Form_81.Edit_1.RTFSaveFile(dFilename, .F., 4), oldkey3()} ;          
          NOHSCROLL ;
          NOTABSTOP

@ 854,84  LABEL Label_37 OF Form_81 ;
          VALUE 'Termin' ;          
          WIDTH 80 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 854,153 LABEL Label_38 OF Form_81 ;
          VALUE 'Uhrzeit' ;          
          WIDTH 80 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 865,84  TEXTBOX text_20 OF Form_81 ;
          VALUE termin ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE

@ 865,153 TEXTBOX text_21 OF Form_81 ;
          VALUE termtime ;
          HEIGHT 14 ;
          WIDTH 40 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK '99:99'
          
@ 855,230 LABEL Label_16 OF Form_81 ;
          VALUE 'Bemerkungen' ;          
          WIDTH 62 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 880,84  LABEL Label_39 OF Form_81 ;
          VALUE 'Notiz' ;          
          WIDTH 80 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 893,84  TEXTBOX Text_22 OF Form_81 ;
          VALUE notiz ;
          HEIGHT 14 ;
          WIDTH 60 ;
          FONT 'Arial' SIZE 8 ;
          INPUTMASK 'AAAAA' ;
	  ON CHANGE {||THIS.VALUE := HMG_UPPER(THIS.VALUE)}
          
@ 910,84  LABEL Label_40 OF Form_81 ;
          VALUE 'Kalkulationsdatum' ;          
          WIDTH 130 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
          
@ 923,84  TEXTBOX text_25 OF Form_81 ;
          VALUE kalkdat ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE
          
@ 868,230 TEXTBOX Text_28 OF Form_81 ;
          WIDTH 500 ;
          HEIGHT 16 ;
          VALUE LTRIM(bemerk_1) ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8 ;
          MAXLENGTH 75          
          
@ 886,230 TEXTBOX Text_29 OF Form_81 ;
          WIDTH 500 ;
          HEIGHT 16 ;
          VALUE LTRIM(bemerk_2) ;          
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 8 ;
          MAXLENGTH 75
          
@ 953,77  LABEL Label_17 OF Form_81 ;
          VALUE 'Ich bin berechtigt, den Auftrag zu erteilen und ermächtige sie hiermit, die oben' + CHR(13) +;
                'beschriebenen Arbeiten mit den nötigen Ersatzteilen auszuführen.' + CHR(13) +;
                'Ich habe Kenntnis von den allgemeinen Lieferungs- und Zahlungsbedingungen' + CHR(13) +;
                'genommen und erkenne diese an.' + CHR(13) + ;
                'Reparaturen ausnahmslos nur gegen sofortige Abrechnung und Barzahlung.' ;
          WIDTH 333 ;
          HEIGHT 61 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@ 953,461 LABEL Label_18 OF Form_81 ;
          VALUE 'In Ordnung befunden und abgenommen' ;          
          WIDTH 175 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@1063,77  LABEL Label_19 OF Form_81 ;
          VALUE 'Datum' ;          
          WIDTH 35 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@1043,80  TEXTBOX text_8 OF Form_81 ;
          VALUE aufdat ;
          HEIGHT 14 ;
          WIDTH 66 ;
          FONT 'Arial' SIZE 8 ;
          DATE ;
          ON LOSTFOCUS BlankoPruef2()
          
@1063,198 LABEL Label_20 OF Form_81 ;
          VALUE 'Unterschrift' ;          
          WIDTH 55 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@1062,461 LABEL Label_21 OF Form_81 ;
          VALUE 'Datum' ;          
          WIDTH 35 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7

@1062,600 LABEL Label_22 OF Form_81 ;
          VALUE 'Unterschrift' ;          
          WIDTH 55 ;
          HEIGHT 11 ;
          BACKCOLOR {255,255,255} ;
          FONT 'Arial' SIZE 7
Form_81.Edit_1.RTFLoadFile(dFilename, .F., 4)
RETURN NIL
*************************   Ende Auftrags Formular   ***************************

************************   Beginn Blanko-Auftrag   *****************************
FUNCTION BlankoAuf2
Form_80.STATUSBAR.ITEM(1) := meld_1
Form_80.STATUSBAR.ITEM(2) := meld_2  
RETURN NIL

FUNCTION NoBlankoAuf2
Form_80.STATUSBAR.ITEM(1) := ''
Form_80.STATUSBAR.ITEM(2) := ''
RETURN NIL

FUNCTION BlankoPruef2
IF Form_81.Text_2.VALUE >= 1 .AND. Form_81.Text_8.VALUE != CTOD('  .  .    ')
  NoBlankoAuf2()
ELSE
  BlankoAuf2()
ENDIF    
RETURN NIL
************************   Ende Blanko-Auftrag   *******************************

*************************   Beginn Adress-Findung   ****************************
FUNCTION addr_6
ad_win_neu()
SELECT ad
SET ORDER TO 1
GOTO z_rec
show_ad2()
IF Form_81.Text_2.VALUE != 0 .AND. Form_81.Text_8.VALUE != CTOD('  .  .    ')
  NoBlankoAuf2()
ENDIF
RETURN Nil

FUNCTION addr_7
mlfdnr := Form_81.Text_2.VALUE
IF mlfdnr > 0
  SELECT ad
  SET ORDER TO 1
  seek mlfdnr
  IF FOUND()
    show_ad2()
    IF Form_81.Text_2.VALUE != 0 .AND. Form_81.Text_8.VALUE != CTOD('  .  .    ')
      NoBlankoAuf2()
    ENDIF    
  ELSE
    Form_81.Text_16.SETFOCUS
    show_no_ad2()
    BlankoAuf2()
  ENDIF
ELSE
  Form_81.Text_16.SETFOCUS
  show_no_ad2()
  BlankoAuf2()
ENDIF
RETURN Nil

FUNCTION show_ad2
mlfdnr   := lfdnr
mname1   := name1
mname2   := name2
mvorname := vorname
mstrasse := strasse
mplz     := plz
mort     := ort
mtelefon := telefon
Form_81.Text_2.VALUE   := mlfdnr
Form_81.Label_24.VALUE := LTRIM(mvorname) + ' ' + mname1
Form_81.Label_25.VALUE := mname2
Form_81.Label_27.VALUE := mstrasse
Form_81.Label_28.VALUE := mplz
Form_81.Label_29.VALUE := mort
Form_81.Label_36.VALUE := mtelefon
RETURN Nil

FUNCTION show_no_ad2
Form_81.Text_2.VALUE   := ""
Form_81.Label_24.VALUE := ""
Form_81.Label_25.VALUE := ""
Form_81.Label_27.VALUE := ""
Form_81.Label_28.VALUE := ""
Form_81.Label_29.VALUE := ""
RETURN NIL
*************************   Ende Adress-Findung   ******************************

************************* Beginn Aufbau-Kennziffer   ***************************
PROCEDURE ke_su4
DEFINE WINDOW Form_82 ;
         AT 165,573 ;
         WIDTH 438;
         HEIGHT 460 ;
         TITLE 'Aufbau-Kennziffer suchen' ;
         MODAL ;         
         NOSIZE
         
SELECT gr
SET ORDER TO 1
@ 0,0 GRID grid_1 OF Form_82;
         WIDTH 422 ;
         HEIGHT 428 ;
         HEADERS {'K.Zif.', 'Bezeichnung'} ;
         WIDTHS {50, 350} ;
         FONT 'Arial' SIZE 10 ;
         ROWSOURCE 'gr' ;
         COLUMNFIELDS {'kz_art', 'art'} ;
         ON DBLCLICK kz_ueb4()
         
END WINDOW
ACTIVATE WINDOW Form_82
RETURN

PROCEDURE kz_ueb4
GOTO RECNO()
Form_81.Label_30.VALUE := kz_art
Form_81.Label_31.VALUE := art
Form_82.RELEASE
RETURN NIL
*************************  Ende Aufbau-Kennziffer   ****************************

***********************   Beginn Kennzeichen-Suche   ***************************
FUNCTION KennzSuche
PRIVATE trenn  := ' -  ', ;
        mken1  := ALLTRIM(Form_81.Text_4.VALUE), ;
        mken2  := ALLTRIM(Form_81.Text_5.VALUE), ;
        mken3  := LTRIM(Form_81.Text_6.VALUE)
SELECT av
SET ORDER TO 2
SET FILTER TO mken1$ken1 .AND. mken2$ken2 .AND. mken3$ken3

DEFINE WINDOW Form_82;
AT 0,0 ;
WIDTH 717 ;
HEIGHT 240 ;
TITLE 'Fahrzeug-Suche   ' ;
MODAL ;
NOSIZE ;
ON RELEASE OrdnungZurueck()

@   6,5   BROWSE Browse_1 OF Form_82 ;
          WIDTH 706 ;
          HEIGHT 183 ;
          HEADERS {'COM.', 'NAME', 'DATUM', 'KENNZEICHEN', 'AUFB. Nr.', 'FG. Nr.'} ;
          WIDTHS {50, 230, 80, 105, 70, 150} ;
   	  FONT 'Arial' SIZE 9 ;
   	  WORKAREA av ;
   	  FIELDS {'comnr', 'name1', 'aufdat', 'ken1 + trenn + ken2 + SPACE(1) + ken3', 'aufbnr', 'fgnr'} ;
   	  VALUE RECNO() ;
	  ON DBLCLICK {||z_rec := Form_82.Browse_1.VALUE, Form_82.RELEASE, Uebernahme()}
   	           
END WINDOW
CENTER WINDOW Form_82 IN Form_81
ACTIVATE WINDOW Form_82
RETURN NIL

FUNCTION OrdnungZurueck
SET FILTER TO
SET ORDER TO 1
RETURN NIL

FUNCTION Uebernahme
SET FILTER TO
SET ORDER TO 1
SET RELATION TO lfdnr INTO ad
SET RELATION TO kz_art INTO gr
GOTO z_rec
Form_81.Label_24.VALUE       := LTRIM(ad->vorname) + ' ' + ad->name1
Form_81.Label_25.VALUE       := ad->name2
Form_81.Label_27.VALUE       := ad->strasse
Form_81.Label_28.VALUE       := ad->plz
Form_81.Label_29.VALUE       := ad->ort
Form_81.Text_4.VALUE         := ken1
Form_81.Text_5.VALUE         := ken2
Form_81.Text_6.VALUE         := ken3
Form_81.Text_11.VALUE        := fgnr
Form_81.Text_12.DISPLAYVALUE := fgherst
Form_81.Text_13.VALUE        := fgtyp
Form_81.Text_10.DISPLAYVALUE := aufbherst
Form_81.Text_2.VALUE         := lfdnr
Form_81.Label_36.VALUE       := ad->telefon
Form_81.Text_7.VALUE         := aufbnr
RETURN NIL
**************************   Ende Kennzeichen-Suche   **************************

***********************   Beginn Aubaunr.-Suche   ******************************
FUNCTION AufbNrSuche2
PRIVATE trenn    := " -  ", ;
        maufbnr  := ALLTRIM(Form_81.Text_7.VALUE)
SELECT av
SET ORDER TO 2
SET FILTER TO maufbnr$aufbnr

DEFINE WINDOW Form_85;
AT 0,0 ;
WIDTH 717 ;
HEIGHT 240 ;
TITLE 'Fahrzeug-Suche' ;
MODAL ;
NOSIZE ;
ON RELEASE OrdnungZurueck()

DEFINE STATUSBAR FONT "Arial" SIZE 9 BOLD
    STATUSITEM "   Auswählen und Doppelclick = Übernahme in Auftrag"
END STATUSBAR

@   6,5   BROWSE Browse_1 OF Form_85 ;
          WIDTH 706 ;
          HEIGHT 183 ;
          HEADERS {'COM.', 'NAME', 'DATUM', 'KENNZEICHEN', 'AUFB. Nr.', 'FG. Nr.'} ;
          WIDTHS {50, 230, 80, 105, 70, 150} ;
   	  FONT 'Arial' SIZE 9 ;
   	  WORKAREA av ;
   	  FIELDS {'comnr', 'name1', 'aufdat', 'ken1 + trenn + ken2 + SPACE(1) + ken3', 'aufbnr', 'fgnr'} ;
   	  VALUE RECNO() ;
	  ON DBLCLICK {||z_rec := Form_85.Browse_1.VALUE, Form_85.RELEASE, Uebernahme()}
   	           
END WINDOW
CENTER WINDOW Form_85 IN Form_81
ACTIVATE WINDOW Form_85
RETURN NIL
***********************   Ende Aubaunr.-Suche   ********************************

*****************************   Beginn FG Nr.-Suche   **************************
FUNCTION FgNrSuche2
PRIVATE trenn    := " -  ", ;
        mfgnr    := ALLTRIM(Form_81.Text_11.VALUE)
SELECT av
SET ORDER TO 2
SET FILTER TO mfgnr$fgnr

DEFINE WINDOW Form_87;
AT 0,0 ;
WIDTH 717 ;
HEIGHT 240 ;
TITLE 'Fahrzeug-Suche' ;
MODAL ;
NOSIZE ;
ON RELEASE OrdnungZurueck()

DEFINE STATUSBAR FONT "Arial" SIZE 9 BOLD
    STATUSITEM "   Auswählen und Doppelclick = Übernahme in Auftrag"
END STATUSBAR

@   6,5   BROWSE Browse_1 OF Form_87 ;
          WIDTH 706 ;
          HEIGHT 183 ;
          HEADERS {'COM.', 'NAME', 'DATUM', 'KENNZEICHEN', 'AUFB. Nr.', 'FG. Nr.'} ;
          WIDTHS {50, 230, 80, 105, 70, 150} ;
   	  FONT 'Arial' SIZE 9 ;
   	  WORKAREA av ;
   	  FIELDS {'comnr', 'name1', 'aufdat', 'ken1 + trenn + ken2 + SPACE(1) + ken3', 'aufbnr', 'fgnr'} ;
   	  VALUE RECNO() ;
	  ON DBLCLICK {||z_rec := Form_87.Browse_1.VALUE, Form_87.RELEASE, Uebernahme()}
   	           
END WINDOW
CENTER WINDOW Form_87 IN Form_81
ACTIVATE WINDOW Form_87
RETURN NIL
*****************************   Ende FG Nr.-Suche   ****************************

************************   Beginn Auftragstext schreiben   *********************
FUNCTION AufText2
aufHandle := FOPEN(dFilename, 2 + 64)
FCLOSE(aufHandle)
EXECUTE FILE "WINWORD.EXE" PARAMETERS "/a /q /t &dFilename"
Form_81.Edit_1.SETFOCUS
RETURN NIL
************************   Ende Auftragstext schreiben   ***********************

**********************   Beginn Auftrags Formular schließen   ******************  
FUNCTION win80close
IF gefunden = .T.
  IF lResponse := MsgYesNo('    Auftrag samt Text abgespeichert ???', 'Auftrag schließen')
    FCLOSE(aufHandle)
    Form_80.RELEASE
  ENDIF
ELSE
  Form_80.RELEASE
ENDIF
RETURN NIL
**********************   Ende Auftrags Formular schließen   ********************

************************   Beginn Altauftrag abspeichern   *********************
FUNCTION altAufSpeich
SELECT av
SET ORDER TO 1
GOTO x_rec
IF .NOT. REC_LOCK(3)
  spermeld_win_2()
  RETURN
ENDIF
REPLACE name1     WITH ad->name1,                    ;
        aufdat    WITH Form_81.Text_8.VALUE,         ;
        kalkdat   WITH Form_81.Text_25.VALUE,        ;
        redat     WITH Form_81.Text_24.VALUE,        ;
        notiz     WITH Form_81.Text_22.VALUE,        ;
        kz_art    WITH VAL(Form_81.Label_30.VALUE),  ;
        renr      WITH Form_81.Text_23.VALUE,        ;
        lfdnr     WITH Form_81.Text_2.VALUE,         ;
        ken1      WITH Form_81.Text_4.VALUE,         ;
        ken2      WITH Form_81.Text_5.VALUE,         ;
        ken3      WITH LTRIM(Form_81.Text_6.VALUE),  ;
        fgnr      WITH Form_81.Text_11.VALUE,        ;
        fgherst   WITH Form_81.Text_12.DISPLAYVALUE, ;
        fgtyp     WITH Form_81.Text_13.VALUE,        ;
        aufbherst WITH Form_81.Text_10.DISPLAYVALUE, ;
        aufbnr    WITH LTRIM(Form_81.Text_7.VALUE),  ;
        aufbart   WITH Form_81.Label_31.VALUE,       ;
        bestnr    WITH Form_81.Text_14.VALUE,        ;
        bestdat   WITH Form_81.Text_15.VALUE,        ;
        eingang   WITH Form_81.Text_16.VALUE,        ;
        eingtime  WITH Form_81.Text_18.VALUE,        ;
        ausgang   WITH Form_81.Text_26.VALUE,        ;
        ausgtime  WITH Form_81.Text_27.VALUE,        ;
        termin    WITH Form_81.Text_20.VALUE,        ;
        termtime  WITH Form_81.Text_21.VALUE,        ;
        bemerk_1  WITH Form_81.Text_28.VALUE,        ;
        bemerk_2  WITH Form_81.Text_29.VALUE        
COMMIT
UNLOCK
Form_81.Edit_1.RTFSaveFile(dFilename, .F., 4)
FCLOSE(aufHandle)
RETURN NIL
***********************   Ende Altauftrag abspeichern   ************************

*****************************   Beginn Auftrag-Druck   *************************
FUNCTION AuftragDruck
Private page      := 0, ;
        pages     := 0, ;
        lSuccess  := .F., ;
        pass      := 1

SELECT PRINTER DEFAULT TO lSuccess ORIENTATION PRINTER_ORIENT_PORTRAIT;
                                   PAPERSIZE PRINTER_PAPER_A4
IF lSuccess
  aSelRange := {0,-1}
  PrintPageCodeBlock := {||page += 1, @ 0,0 PRINT Auftragskopf()}
  RichEditBox_MyRTFPrint(Form_81.Edit_1.Handle, aSelRange, 13, 95, 10, 75, PrintPageCodeBlock)
  pages := page
  pass += 1
  page := 0
  SELECT PRINTER DIALOG TO lSuccess PREVIEW
  aSelRange := {0,-1}
  PrintPageCodeBlock := {||page += 1, @ 0,0 PRINT Auftragskopf()}
  RichEditBox_MyRTFPrint(Form_81.Edit_1.Handle, aSelRange, 13, 95, 10, 75, PrintPageCodeBlock)
ELSE
  MsgInfo('Drucker nicht bereit !')
ENDIF
RETURN NIL
************************    Ende AuftragsDruck   *******************************

*************************   Beginn RTFPrint changed   **************************
Function RichEditBox_MyRTFPrint ( hWndControl, aSelRange, nLeft, nTop, nRight, nBottom, PrintPageCodeBlock )

LOCAL nPageWidth, nPageHeight
LOCAL nNextChar := 0
LOCAL nTextLength := RichEditBox_GetTextLength ( hWndControl )

nPageWidth  := OpenPrinterGetPageWidth()    // in millimeters
nPageHeight := OpenPrinterGetPageHeight()   // in millimeters

nRight  := nPageWidth  - nRight
nBottom := nPageHeight - nBottom

// Convert millimeters in twips ( 1 inch = 25.4 mm = 1440 twips )
nLeft   := nLeft   * 1440 / 25.4
nTop    := nTop    * 1440 / 25.4
nRight  := nRight  * 1440 / 25.4
nBottom := nBottom * 1440 / 25.4

IF aSelRange [2] == -1 .OR. aSelRange [2] > nTextLength
  aSelRange [2] := nTextLength
ENDIF

START PRINTDOC
  DO WHILE nNextChar < nTextLength
    START PRINTPAGE
	EVAL ( PrintPageCodeBlock )
	nNextChar := RichEditBox_FormatRange ( hWndControl, OpenPrinterGetPageDC(), nLeft, nTop, nRight, nBottom, aSelRange )
	aSelRange [1] := nNextChar
	DO EVENTS
    END PRINTPAGE
  ENDDO
  pages := page
  IF pass = 1  
    ABORT PRINTDOC  
  ELSE  
    END PRINTDOC
  ENDIF
RETURN Nil
*************************   Ende RTFPrint changed   ****************************

*************************   Beginn Auftrags-Header   ***************************
PROCEDURE AuftragsKopf()
LOCAL  b_Font    := "Arial", ;
       b_Size    := 7, ;
       c_Font    := "Times New Roman", ;
       c_Size    := 12

@   0,0      PRINT IMAGE "VersAuf" ;
	     WIDTH 210 ;
	     HEIGHT 297
@  4,109     PRINT 'I T L - Fahrzeugbau GmbH' FONT b_Font BOLD SIZE 12
@  9,109     PRINT 'Industriestraße 19,  89081 Ulm' FONT b_Font BOLD SIZE 12
@  26.5,20   PRINT 'Auftrag' FONT b_Font BOLD SIZE 16
@  28,41     PRINT 'Nr.' FONT b_Font BOLD SIZE 12
@  27.5,50   PRINT comnr FONT b_Font BOLD SIZE 14	  
IF pages > 1                
  @  28,70   PRINT 'Seite ' + STR(page, 3) + '  von ' + STR(pages, 3) FONT c_Font SIZE c_Size
ELSE
  @  28,70   PRINT 'Seite  1  von  1' FONT c_Font SIZE c_Size      
ENDIF
@  40,20     PRINT LTRIM(ad->vorname) + ' ' + ad->name1 FONT c_Font SIZE c_Size
@  48,20     PRINT ad->name2 FONT c_Font SIZE c_Size
@  64,20     PRINT ad->strasse FONT c_Font SIZE c_Size
@  72,20     PRINT ad->plz FONT c_Font SIZE c_Size
@  72,35     PRINT ad->ort FONT c_Font SIZE c_Size
@  19,112    PRINT 'Kennzeichen' FONT b_Font SIZE b_Size
@  22.5,112  PRINT ken1 + ' - ' + ken2 + ' ' + ken3 FONT c_Font SIZE c_Size
@  19,158    PRINT 'Fahrg.-Nr. (FIN)' FONT b_Font SIZE b_Size                
@  22.5,158  PRINT fgnr FONT c_Font SIZE c_Size
@  27,112    PRINT 'Fahrg.-Hersteller' FONT b_Font SIZE b_Size
@  30.5,112  PRINT fgherst FONT c_Font SIZE c_Size
@  27,158    PRINT 'Fahrg.-Typ' FONT b_Font SIZE b_Size                
@  30.5,158  PRINT SUBSTR(fgtyp, 1, 18) FONT c_Font SIZE c_Size
@  35,112    PRINT 'Aufbau-Hersteller' FONT b_Font SIZE b_Size
@  38.5,112  PRINT aufbherst FONT c_Font SIZE c_Size
@  35,158    PRINT 'Aufbau-Nr.' FONT b_Font SIZE b_Size                
@  38.5,158  PRINT aufbnr FONT c_Font SIZE c_Size
@  35,181    PRINT 'Aufbau-KZ' FONT b_Font SIZE b_Size                
@  38.5,181  PRINT kz_art FONT c_Font SIZE c_Size
@  43,112    PRINT 'Aufbau-Art' FONT b_Font SIZE b_Size
@  46.5,112  PRINT aufbart FONT c_Font SIZE c_Size
@  51,112    PRINT 'Bestell-Nr.' FONT b_Font SIZE b_Size
@  54.5,112  PRINT bestnr FONT c_Font SIZE c_Size
@  51,158    PRINT 'Best.-Datum' FONT b_Font SIZE b_Size
@  54.5,158  PRINT bestdat FONT c_Font SIZE c_Size
@  59,112    PRINT 'Rechnung-Nr.' FONT b_Font SIZE b_Size
@  62.5,112  PRINT renr FONT c_Font SIZE c_Size
@  59,158    PRINT 'Rechn.-Datum' FONT b_Font SIZE b_Size
@  62.5,158  PRINT redat FONT c_Font SIZE c_Size
@  67,112    PRINT 'Kunden-Nr.' FONT b_Font SIZE b_Size
@  70.5,112  PRINT lfdnr FONT c_Font SIZE c_Size
@  67,158    PRINT 'Kunden-Telefon' FONT b_Font SIZE b_Size
@  70.5,158  PRINT  ad->telefon FONT c_Font SIZE c_Size
@  75,112    PRINT 'Eingang' FONT b_Font SIZE b_Size
@  78.5,112  PRINT eingang FONT c_Font SIZE c_Size
@  75,139    PRINT 'Uhrzeit' FONT b_Font SIZE b_Size
@  78.5,139  PRINT eingtime FONT c_Font SIZE c_Size
@  75,158    PRINT 'Ausgang' FONT b_Font SIZE b_Size
@  78.5,158  PRINT ausgang FONT c_Font SIZE c_Size
@  75,184    PRINT 'Uhrzeit' FONT b_Font SIZE b_Size
@  78.5,184  PRINT ausgtime FONT c_Font SIZE c_Size
@  87,70     PRINT 'A   u   s   z   u   f   ü   h   r   e   n   d   e      A   r   b   e   i   t   e   n';
                   FONT b_Font BOLD SIZE b_Size
@  225.5,62  PRINT 'Bemerkungen' FONT b_Font SIZE b_Size
@  225.5,22  PRINT 'Termin' FONT b_Font SIZE b_Size
@  228.5,22  PRINT termin FONT c_Font SIZE c_Size
@  225.5,43  PRINT 'Uhrzeit' FONT b_Font SIZE b_Size
@  228.5,43  PRINT termtime FONT c_Font SIZE c_Size
@  233.5,22  PRINT 'Notiz' FONT b_Font SIZE b_Size
@  236.5,22  PRINT notiz FONT c_Font SIZE c_Size
@  241.5,22  PRINT 'Kalkulationsdatum' FONT b_Font SIZE b_Size
@  244.5,22  PRINT  kalkdat FONT c_Font SIZE c_Size
@  251,20    PRINT 'Ich bin berechtigt, den Auftrag zu erteilen und ermächtige sie hiermit, die oben' FONT b_Font SIZE b_Size
@  254.25,20 PRINT 'beschriebenen Arbeiten mit den nötigen Ersatzteilen auszuführen.' FONT b_Font SIZE b_Size
@  257.50,20 PRINT 'Ich habe Kenntnis von den allgemeinen Lieferungs- und Zahlungsbedingungen' FONT b_Font SIZE b_Size
@  260.75,20 PRINT 'genommen und erkenne diese an.' FONT b_Font SIZE b_Size
@  264,20    PRINT 'Reparaturen ausnahmslos nur gegen sofortige Abrechnung und Barzahlung.' FONT b_Font SIZE b_Size
@  251,121   PRINT 'In Ordnung befunden und abgenommen:' FONT b_Font SIZE b_Size
@  276,20    PRINT  aufdat FONT c_Font SIZE c_Size
@  281,20    PRINT 'Datum' FONT b_Font SIZE b_Size
@  281,52    PRINT 'Unterschrift' FONT b_Font SIZE b_Size
@  228.5,62  PRINT bemerk_1 FONT c_Font SIZE c_Size
@  234,62    PRINT bemerk_2 FONT c_Font SIZE c_Size
RETURN NIL
******************************   Ende Auftrags-Header  *************************

******** Beginn change TAB into Ctrl+TAB and Vert.Pos of Panel-Window **********
FUNCTION changekey3
ON KEY TAB OF Form_80 ACTION HMG_PRESSKEY(17, 9)
SetScrollPos(GetFormHandle("Form_81") , SB_VERT , 370 , .T.)
RETURN Nil

FUNCTION oldkey3
RELEASE KEY TAB OF Form_80
RETURN Nil
********** Ende change TAB into Ctrl+TAB and Vert.Pos of PanelWindow ***********
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by serge_girard »

Karl,

Also layout of av.dbf,ad.dbf and gr.dbf plus functions ad_win_neu(), REC_LOCK() and spermeld_win_2.

I skipped those functions in order to get it compiled but then of course missing dbf's

Serge
There's nothing you can do that can't be done...
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

Serge, I did not think that you wanted to compile the program. I think I have to program a short template without data and only with a few controls and labels in the windows. For this I need a little time. I´ll come back...
Karl
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by serge_girard »

OK, no problem!

Serge
There's nothing you can do that can't be done...
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

serge_girard wrote: Mon May 15, 2017 10:35 am OK, no problem!

Serge
Hi Serge,
now a stripped down version of my program. When you are in the TEXTBOX (Commission-Number) click <ENTER>. Afterwards in the Panel-Window cklick into the RICHEDITBOX and you will see the undesired effect. If you cklick on the slider you will get the desired position.

Regards Karl
Attachments
Sample_1.rar
(1.23 MiB) Downloaded 254 times
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by serge_girard »

Hi Karl,

Sorry , but I can't get it working. I suppose it is within h_windows.prg. Maybe Claudio or somebody else knows a solution?

Serge
There's nothing you can do that can't be done...
Post Reply