Author | Topic: GUI Windows in VIO Mode | |
---|---|---|
Saul | GUI Windows in VIO Mode on Wed, 04 Oct 2006 07:15:08 +0200 | |
Rodd Graham | Re: GUI Windows in VIO Mode on Wed, 04 Oct 2006 01:06:48 -0500 Saul, When you want to use XBP's, you need to change your link from CONSOLE to WINDOWS (or VIO to PM). Dont worry, your VIO application will continue to run in PM. What will change is that the CRT window will now be a graphic window rather than an character window. Xbase++ will emulate the CRT using windows graphics. Note: You will not be able to use full-screen mode (ALT-ENTER) since the window is no longer character. Rodd "Saul" <Saul3@web.de> wrote in message news:2a3d7a3a$48ff3074$11ebc9@news.alaska-software.com... Hello, I changed my programm code from clipper to xbase++ 1.90. I have change all my code to run the programms in a VIO Modus with CRT screens. They work all fine. Now I start to change some parts to the GUI Modus. I open a Window with xbpbrowse as decirbed in the help file. It works fine, but I cant leave the window. What have I to do to leave the windwos and the browse modus to go on my VIO screen programm? The example says nothing about that. Is there somewhere a smal and easy to understand complete programm, where I can learn the object oriented programm style? I can see all the examples, but don t know how to assemble all of this. Thanks Wolfgang xbpbrowse() example: #include "Appevent.ch" #include "Common.ch" #pragma Library( "XppUi2.lib" ) PROCEDURE AppSys Desktop bleibt Anwendungsfenster RETURN PROCEDURE Main LOCAL nEvent, mp1, mp2, oXbp, oBrowse, cField, i USE Customer NEW Dialogfenster versteckt erzeugen oXbp := GuiStdDialog( "Standard GUI Browser for DBF" ) Browser im Fenster erzeugen oBrowse := GuiBrowseDb( oXbp:drawingArea ) Spalten fr alle Felder anfgen FOR i:=1 TO FCount() cField := FieldName( i ) oBrowse:addColumn( FieldBlock(cField), , cField ) NEXT Der Browser fllt nach :resize() immer das Fenster aus oXbp:drawingArea:resize := {|mp1,mp2,obj| obj:childList()[1]:setSize(mp2) } oXbp:show() oBrowse:show() SetAppFocus( oBrowse ) DO WHILE nEvent <> xbeP_Close nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN ****************************************************************** * GUI Browser mit Navigations-Codeblcken fr DBF erzeugen ****************************************************************** FUNCTION GuiBrowseDB( oParent, aPos, aSize ) LOCAL oBrowse oBrowse := XbpBrowse():new( oParent,, aPos, aSize ):create() Navigationscodeblcke fr den Browser oBrowse:skipBlock := {|n| DbSkipper(n) } oBrowse:goTopBlock := {| | DbGoTop() } oBrowse:goBottomBlock := {| | DbGoBottom() } oBrowse:phyPosBlock := {| | Recno() } Navigationscodeblcke fr den vertikalen Scrollbar oBrowse:posBlock := {| | DbPosition() } oBrowse:goPosBlock := {|n| DbGoPosition(n) } oBrowse:lastPosBlock := {| | 100 } oBrowse:firstPosBlock := {| | 0 } RETURN oBrowse ****************************************************************** * Standard Dialogfenster versteckt erzeugen ****************************************************************** FUNCTION GuiStdDialog( cTitle ) LOCAL oDlg DEFAULT cTitle TO "Standard Dialog Window" oDlg := XbpDialog():new( ,,{10,10}, {600,400},, .F. ) oDlg:icon := 1 oDlg:taskList := .T. oDlg:title := cTitle oDlg:create() oDlg:drawingArea:setFontCompoundName( "8.Helv" ) RETURN oDlg | |
Saul | Re: GUI Windows in VIO Mode on Sun, 08 Oct 2006 17:05:30 +0200 Hello Rodd, my project.xpj lokks as followed. What do I have to change to get the VIO Mode? Project - Definition - File created by PBUILD Version 1.90.331 Date: 07.10.2006 Time: 20:09:12 [PROJECT] COMPILE = xpp COMPILE_FLAGS = /q DEBUG = no GUI = yes LINKER = alink LINK_FLAGS = RC_COMPILE = arc RC_FLAGS = /v PROJECT.XPJ "Rodd Graham" <rgraham@grahamautomation.com> schrieb im Newsbeitrag news:199f43c0$4960e08d$11ec4e@news.alaska-software.com... > Saul, > > When you want to use XBP's, you need to change your link from CONSOLE to > WINDOWS (or VIO to PM). > > Dont worry, your VIO application will continue to run in PM. What will > change is that the CRT window will now be a graphic window rather than an > character window. Xbase++ will emulate the CRT using windows graphics. > > Note: You will not be able to use full-screen mode (ALT-ENTER) since the > window is no longer character. > > Rodd > > "Saul" <Saul3@web.de> wrote in message > news:2a3d7a3a$48ff3074$11ebc9@news.alaska-software.com... > Hello, > I changed my programm code from clipper to xbase++ 1.90. I have change all > my code to run the programms in a VIO Modus with CRT screens. They work > all fine. Now I start to change some parts to the GUI Modus. I open a > Window with xbpbrowse as decirbed in the help file. It works fine, but I > cant leave the window. > What have I to do to leave the windwos and the browse modus to go on my > VIO screen programm? The example says nothing about that. > Is there somewhere a smal and easy to understand complete programm, where > I can learn the object oriented programm style? I can see all the > examples, but don t know how to assemble all of this. > Thanks > Wolfgang > xbpbrowse() example: > > #include "Appevent.ch" > #include "Common.ch" > #pragma Library( "XppUi2.lib" ) > PROCEDURE AppSys > Desktop bleibt Anwendungsfenster > RETURN > > PROCEDURE Main > LOCAL nEvent, mp1, mp2, oXbp, oBrowse, cField, i > USE Customer NEW > Dialogfenster versteckt erzeugen > oXbp := GuiStdDialog( "Standard GUI Browser for DBF" ) > Browser im Fenster erzeugen > oBrowse := GuiBrowseDb( oXbp:drawingArea ) > Spalten fr alle Felder anfgen > FOR i:=1 TO FCount() > cField := FieldName( i ) > oBrowse:addColumn( FieldBlock(cField), , cField ) > NEXT > Der Browser fllt nach :resize() immer das Fenster aus > oXbp:drawingArea:resize := {|mp1,mp2,obj| > obj:childList()[1]:setSize(mp2) } > oXbp:show() > oBrowse:show() > SetAppFocus( oBrowse ) > DO WHILE nEvent <> xbeP_Close > nEvent := AppEvent( @mp1, @mp2, @oXbp ) > oXbp:handleEvent( nEvent, mp1, mp2 ) > ENDDO > RETURN > > ****************************************************************** > * GUI Browser mit Navigations-Codeblcken fr DBF erzeugen > ****************************************************************** > FUNCTION GuiBrowseDB( oParent, aPos, aSize ) > LOCAL oBrowse > oBrowse := XbpBrowse():new( oParent,, aPos, aSize ):create() > Navigationscodeblcke fr den Browser > oBrowse:skipBlock := {|n| DbSkipper(n) } > oBrowse:goTopBlock := {| | DbGoTop() } > oBrowse:goBottomBlock := {| | DbGoBottom() } > oBrowse:phyPosBlock := {| | Recno() } > Navigationscodeblcke fr den vertikalen Scrollbar > oBrowse:posBlock := {| | DbPosition() } > oBrowse:goPosBlock := {|n| DbGoPosition(n) } > oBrowse:lastPosBlock := {| | 100 } > oBrowse:firstPosBlock := {| | 0 } > RETURN oBrowse > ****************************************************************** > * Standard Dialogfenster versteckt erzeugen > ****************************************************************** > FUNCTION GuiStdDialog( cTitle ) > LOCAL oDlg > DEFAULT cTitle TO "Standard Dialog Window" > oDlg := XbpDialog():new( ,,{10,10}, {600,400},, .F. ) > oDlg:icon := 1 > oDlg:taskList := .T. > oDlg:title := cTitle > oDlg:create() > oDlg:drawingArea:setFontCompoundName( "8.Helv" ) > RETURN oDlg > | |
Rodd Graham | Re: GUI Windows in VIO Mode on Mon, 09 Oct 2006 17:05:48 -0500 Saul, I do not use PBuild, but I would think that: GUI = yes would mean WINDOWS/PM GUI = no would mean CONSOLE Someone who uses PBuild should confirm or look at the documentation on PBuild. Rodd "Saul" <Saul3@web.de> wrote in message news:7b8f761$8ca7fb3$15b86c@news.alaska-software.com... > Hello Rodd, > my project.xpj lokks as followed. What do I have to change to get the VIO > Mode? > > > Project - Definition - File created by PBUILD Version 1.90.331 > Date: 07.10.2006 Time: 20:09:12 > > [PROJECT] > COMPILE = xpp > COMPILE_FLAGS = /q > DEBUG = no > GUI = yes > LINKER = alink > LINK_FLAGS = > RC_COMPILE = arc > RC_FLAGS = /v > PROJECT.XPJ > > "Rodd Graham" <rgraham@grahamautomation.com> schrieb im Newsbeitrag > news:199f43c0$4960e08d$11ec4e@news.alaska-software.com... >> Saul, >> >> When you want to use XBP's, you need to change your link from CONSOLE to >> WINDOWS (or VIO to PM). >> >> Dont worry, your VIO application will continue to run in PM. What will >> change is that the CRT window will now be a graphic window rather than an >> character window. Xbase++ will emulate the CRT using windows graphics. >> >> Note: You will not be able to use full-screen mode (ALT-ENTER) since the >> window is no longer character. >> >> Rodd >> >> "Saul" <Saul3@web.de> wrote in message >> news:2a3d7a3a$48ff3074$11ebc9@news.alaska-software.com... >> Hello, >> I changed my programm code from clipper to xbase++ 1.90. I have change >> all my code to run the programms in a VIO Modus with CRT screens. They >> work all fine. Now I start to change some parts to the GUI Modus. I open >> a Window with xbpbrowse as decirbed in the help file. It works fine, but >> I cant leave the window. >> What have I to do to leave the windwos and the browse modus to go on my >> VIO screen programm? The example says nothing about that. >> Is there somewhere a smal and easy to understand complete programm, where >> I can learn the object oriented programm style? I can see all the >> examples, but don t know how to assemble all of this. >> Thanks >> Wolfgang >> xbpbrowse() example: >> >> #include "Appevent.ch" >> #include "Common.ch" >> #pragma Library( "XppUi2.lib" ) >> PROCEDURE AppSys >> Desktop bleibt Anwendungsfenster >> RETURN >> >> PROCEDURE Main >> LOCAL nEvent, mp1, mp2, oXbp, oBrowse, cField, i >> USE Customer NEW >> Dialogfenster versteckt erzeugen >> oXbp := GuiStdDialog( "Standard GUI Browser for DBF" ) >> Browser im Fenster erzeugen >> oBrowse := GuiBrowseDb( oXbp:drawingArea ) >> Spalten fr alle Felder anfgen >> FOR i:=1 TO FCount() >> cField := FieldName( i ) >> oBrowse:addColumn( FieldBlock(cField), , cField ) >> NEXT >> Der Browser fllt nach :resize() immer das Fenster aus >> oXbp:drawingArea:resize := {|mp1,mp2,obj| >> obj:childList()[1]:setSize(mp2) } >> oXbp:show() >> oBrowse:show() >> SetAppFocus( oBrowse ) >> DO WHILE nEvent <> xbeP_Close >> nEvent := AppEvent( @mp1, @mp2, @oXbp ) >> oXbp:handleEvent( nEvent, mp1, mp2 ) >> ENDDO >> RETURN >> >> ****************************************************************** >> * GUI Browser mit Navigations-Codeblcken fr DBF erzeugen >> ****************************************************************** >> FUNCTION GuiBrowseDB( oParent, aPos, aSize ) >> LOCAL oBrowse >> oBrowse := XbpBrowse():new( oParent,, aPos, aSize ):create() >> Navigationscodeblcke fr den Browser >> oBrowse:skipBlock := {|n| DbSkipper(n) } >> oBrowse:goTopBlock := {| | DbGoTop() } >> oBrowse:goBottomBlock := {| | DbGoBottom() } >> oBrowse:phyPosBlock := {| | Recno() } >> Navigationscodeblcke fr den vertikalen Scrollbar >> oBrowse:posBlock := {| | DbPosition() } >> oBrowse:goPosBlock := {|n| DbGoPosition(n) } >> oBrowse:lastPosBlock := {| | 100 } >> oBrowse:firstPosBlock := {| | 0 } >> RETURN oBrowse >> ****************************************************************** >> * Standard Dialogfenster versteckt erzeugen >> ****************************************************************** >> FUNCTION GuiStdDialog( cTitle ) >> LOCAL oDlg >> DEFAULT cTitle TO "Standard Dialog Window" >> oDlg := XbpDialog():new( ,,{10,10}, {600,400},, .F. ) >> oDlg:icon := 1 >> oDlg:taskList := .T. >> oDlg:title := cTitle >> oDlg:create() >> oDlg:drawingArea:setFontCompoundName( "8.Helv" ) >> RETURN oDlg >> > > | |
James Loughner | Re: GUI Windows in VIO Mode on Mon, 09 Oct 2006 21:45:40 -0400 Correct It is complex to use GUI windows and CRT windows together look at SetInputFocus() and SetDisplayFocus() I believe these are needed to move between the different style of windows Jim Rodd Graham wrote: > Saul, > > I do not use PBuild, but I would think that: > > GUI = yes would mean WINDOWS/PM > GUI = no would mean CONSOLE > > Someone who uses PBuild should confirm or look at the documentation on > PBuild. > > Rodd > > "Saul" <Saul3@web.de> wrote in message > news:7b8f761$8ca7fb3$15b86c@news.alaska-software.com... >> Hello Rodd, >> my project.xpj lokks as followed. What do I have to change to get the VIO >> Mode? >> >> >> Project - Definition - File created by PBUILD Version 1.90.331 >> Date: 07.10.2006 Time: 20:09:12 >> >> [PROJECT] >> COMPILE = xpp >> COMPILE_FLAGS = /q >> DEBUG = no >> GUI = yes >> LINKER = alink >> LINK_FLAGS = >> RC_COMPILE = arc >> RC_FLAGS = /v >> PROJECT.XPJ >> >> "Rodd Graham" <rgraham@grahamautomation.com> schrieb im Newsbeitrag >> news:199f43c0$4960e08d$11ec4e@news.alaska-software.com... >>> Saul, >>> >>> When you want to use XBP's, you need to change your link from CONSOLE to >>> WINDOWS (or VIO to PM). >>> >>> Dont worry, your VIO application will continue to run in PM. What will >>> change is that the CRT window will now be a graphic window rather than an >>> character window. Xbase++ will emulate the CRT using windows graphics. >>> >>> Note: You will not be able to use full-screen mode (ALT-ENTER) since the >>> window is no longer character. >>> >>> Rodd >>> >>> "Saul" <Saul3@web.de> wrote in message >>> news:2a3d7a3a$48ff3074$11ebc9@news.alaska-software.com... >>> Hello, >>> I changed my programm code from clipper to xbase++ 1.90. I have change >>> all my code to run the programms in a VIO Modus with CRT screens. They >>> work all fine. Now I start to change some parts to the GUI Modus. I open >>> a Window with xbpbrowse as decirbed in the help file. It works fine, but >>> I can´t leave the window. >>> What have I to do to leave the windwos and the browse modus to go on my >>> VIO screen programm? The example says nothing about that. >>> Is there somewhere a smal and easy to understand complete programm, where >>> I can learn the object oriented programm style? I can see all the >>> examples, but don´ t know how to assemble all of this. >>> Thanks >>> Wolfgang >>> xbpbrowse() example: >>> >>> #include "Appevent.ch" >>> #include "Common.ch" >>> #pragma Library( "XppUi2.lib" ) >>> PROCEDURE AppSys >>> Desktop bleibt Anwendungsfenster >>> RETURN >>> >>> PROCEDURE Main >>> LOCAL nEvent, mp1, mp2, oXbp, oBrowse, cField, i >>> USE Customer NEW >>> Dialogfenster versteckt erzeugen >>> oXbp := GuiStdDialog( "Standard GUI Browser for DBF" ) >>> Browser im Fenster erzeugen >>> oBrowse := GuiBrowseDb( oXbp:drawingArea ) >>> Spalten für alle Felder anfügen >>> FOR i:=1 TO FCount() >>> cField := FieldName( i ) >>> oBrowse:addColumn( FieldBlock(cField), , cField ) >>> NEXT >>> Der Browser füllt nach :resize() immer das Fenster aus >>> oXbp:drawingArea:resize := {|mp1,mp2,obj| >>> obj:childList()[1]:setSize(mp2) } >>> oXbp:show() >>> oBrowse:show() >>> SetAppFocus( oBrowse ) >>> DO WHILE nEvent <> xbeP_Close >>> nEvent := AppEvent( @mp1, @mp2, @oXbp ) >>> oXbp:handleEvent( nEvent, mp1, mp2 ) >>> ENDDO >>> RETURN >>> >>> ****************************************************************** >>> * GUI Browser mit Navigations-Codeblöcken für DBF erzeugen >>> ****************************************************************** >>> FUNCTION GuiBrowseDB( oParent, aPos, aSize ) >>> LOCAL oBrowse >>> oBrowse := XbpBrowse():new( oParent,, aPos, aSize ):create() >>> Navigationscodeblöcke für den Browser >>> oBrowse:skipBlock := {|n| DbSkipper(n) } >>> oBrowse:goTopBlock := {| | DbGoTop() } >>> oBrowse:goBottomBlock := {| | DbGoBottom() } >>> oBrowse:phyPosBlock := {| | Recno() } >>> Navigationscodeblöcke für den vertikalen Scrollbar >>> oBrowse:posBlock := {| | DbPosition() } >>> oBrowse:goPosBlock := {|n| DbGoPosition(n) } >>> oBrowse:lastPosBlock := {| | 100 } >>> oBrowse:firstPosBlock := {| | 0 } >>> RETURN oBrowse >>> ****************************************************************** >>> * Standard Dialogfenster versteckt erzeugen >>> ****************************************************************** >>> FUNCTION GuiStdDialog( cTitle ) >>> LOCAL oDlg >>> DEFAULT cTitle TO "Standard Dialog Window" >>> oDlg := XbpDialog():new( ,,{10,10}, {600,400},, .F. ) >>> oDlg:icon := 1 >>> oDlg:taskList := .T. >>> oDlg:title := cTitle >>> oDlg:create() >>> oDlg:drawingArea:setFontCompoundName( "8.Helv" ) >>> RETURN oDlg >>> >> > > |