Loading ...
Sorry, an error occurred while loading the content.

Re: Rapid q OCX question

Expand Messages
  • Walter
    ... Hi David, I know your include file, but I m need to print (and preview) from a QStrinGrid component. So I m looking for a way to generalize the printing
    Message 1 of 10 , Nov 16, 2012
    • 0 Attachment
      --- In rapidq@yahoogroups.com, "David" <burkleyd@...> wrote:
      >
      > --- In rapidq@yahoogroups.com, "Walter" <waltersamsa@> wrote:
      > >
      > > --- In rapidq@yahoogroups.com, "johnk20042001" <klaffky2825@> wrote:
      > > >
      > > > --- In rapidq@yahoogroups.com, "rapidq1990@" <rapidq1990@> wrote:
      > > > >
      > > > > i am running rapid q on windows 98
      > > > > i have a question
      > > > > how do i use active x ocx in Rapid-Q
      > > > > i got the info for the ocx
      > > > >
      > > > > cls 920DFF5F-2EE6-4867-93A5-7BCF15B0F1C2
      > > > > id=Activex2
      > > > > Filename="Activex1.ocx"
      > > > >
      > > > > How do i put the ocx into a rapid q window?
      > > > >
      > > > OCX is a pain. If you don't have good docs you probably can't use it.
      > > > here is a GUESS at how it works
      > > >
      > > > ' Make sure to register the .DLL or put in app folder
      > > > CREATE Form AS QFORM
      > > > Visible = 1
      > > > CREATE MyOCX AS QOLECONTAINER
      > > > Align = alClient
      > > > CreateObject("ActiveX.2")
      > > > END CREATE
      > > > Visible = 0
      > > > END CREATE
      > > > Form.ShowModal
      > > > MyOCX.Free
      > > >
      > > >
      > > > 'also try this
      > > >
      > > > $ESCAPECHARS ON
      > > > DIM Object AS QOLEOBJECT
      > > >
      > > > Object.CreateObject("{920DFF5F-2EE6-4867-93A5-7BCF15B0F1C2}")
      > > > 'Object.Invoke("AppShow") ' you need the docs for these commands
      > > > 'or Object.AppShow
      > > > SLEEP 5
      > > >
      > > > Object.Free
      > > >
      > >
      > >
      > > Hi all
      > > I've an OCX colled ErezPP1LTR.ocx. There is an example in VB6 for its use.
      > > I've found in a file .vbp a line with this code:
      > > Object={125CCC07-2422-4F98-B342-3F3942780D16}#1.0#0; ErezPP1LTR.ocx
      > >
      > > It's possible to use the above information for use it in RQ?
      > > I've already tried to substitute them in the example above but I have an error: interface not registered. I used a setup program to install ocx and all the examples, so I hope the control is properly installed
      > >
      > > Walter
      > >
      >
      > Hi Walter,
      >
      > I Googled ErezPP1LTR and it says it's a Print Preview activex control.
      >
      > If you're needing print preview capabilities in a program you're creating... you could (if you wanted to)... use the Include file I created that has Print Preview capabilities.
      >
      > You'll find the include file on my website.
      > (<http://burkleyd.ulmb.com/>)
      > Click the "RQ Demos 2" button and then scroll down to "QPrint".
      > (there's also a usage demo)
      >
      > Hope this is a viable alternative.
      > David
      >

      Hi David,
      I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.

      Walter
    • johnk20042001
      ... IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is
      Message 2 of 10 , Nov 28, 2012
      • 0 Attachment
        >
        > Hi David,
        > I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.
        >
        > Walter
        >

        IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is use a screen shot of the QStringGrid and then use the .CopyRect or .Draw part of QPrinter. That is, you get a BMP of the QStringGrid, stretch it with a QIMAGE then send that to QPrinter (or David's component).

        A screen shot is easily done through Screen.CaptureToBMP() in RapidQ2.inc. Feed the QStringGrid coordinates to the Screen.CaptureToBMP().

        Good luck 007
      • Walter
        ... Hi johnk20042001, I thank you for your answer. I dont t try this approach because I don t know how to put all non-visible cols and rows into the bmp. I
        Message 3 of 10 , Nov 30, 2012
        • 0 Attachment
          --- In rapidq@yahoogroups.com, "johnk20042001" <klaffky2825@...> wrote:
          >
          > >
          > > Hi David,
          > > I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.
          > >
          > > Walter
          > >
          >
          > IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is use a screen shot of the QStringGrid and then use the .CopyRect or .Draw part of QPrinter. That is, you get a BMP of the QStringGrid, stretch it with a QIMAGE then send that to QPrinter (or David's component).
          >
          > A screen shot is easily done through Screen.CaptureToBMP() in RapidQ2.inc. Feed the QStringGrid coordinates to the Screen.CaptureToBMP().
          >
          > Good luck 007
          >
          Hi johnk20042001, I thank you for your answer.
          I dont't try this approach because I don't know how to put all non-visible cols and rows into the bmp.
          I mean, if I have 2000 rows, on the printer side probably I have a lot of pages, so how could i split the screen shot into this pages?
          This was the question that stop me to choose this path.
          Any help is welcome

          Walter
        • David
          ... One possible solution might be to store the QStringGrid in a QMemoryStream and then move it into a hidden QRichEdit. Once the data is in a QRichEdit...
          Message 4 of 10 , Nov 30, 2012
          • 0 Attachment
            --- In rapidq@yahoogroups.com, "Walter" <waltersamsa@...> wrote:
            >
            > --- In rapidq@yahoogroups.com, "johnk20042001" <klaffky2825@> wrote:
            > >
            > > >
            > > > Hi David,
            > > > I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.
            > > >
            > > > Walter
            > > >
            > >
            > > IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is use a screen shot of the QStringGrid and then use the .CopyRect or .Draw part of QPrinter. That is, you get a BMP of the QStringGrid, stretch it with a QIMAGE then send that to QPrinter (or David's component).
            > >
            > > A screen shot is easily done through Screen.CaptureToBMP() in RapidQ2.inc. Feed the QStringGrid coordinates to the Screen.CaptureToBMP().
            > >
            > > Good luck 007
            > >
            > Hi johnk20042001, I thank you for your answer.
            > I dont't try this approach because I don't know how to put all non-visible cols and rows into the bmp.
            > I mean, if I have 2000 rows, on the printer side probably I have a lot of pages, so how could i split the screen shot into this pages?
            > This was the question that stop me to choose this path.
            > Any help is welcome
            >
            > Walter
            >
            One possible solution might be to store the QStringGrid in a QMemoryStream and then move it into a hidden QRichEdit. Once the data is in a QRichEdit... you'll be able to use my QPrint include file.

            The biggest problem I'm seeing with this solution is... it will take alot of work to get the data (to be put into the QRichEdit) to look exactly like it does in the QStringGrid.

            I'm thinking it can be done... but... it's going to take alot of trial and error before it comes out the way it's suppose to.

            David

            P.S. The OCX you mentioned probably would not work with the RapidQ StringGrid. Our QStringGrid is "literally" a one of a kind component (compared to similar components in other programming languages).
          • old bob
            Message 5 of 10 , Dec 1, 2012
            • 0 Attachment



              From: David <burkleyd@...>
              To: rapidq@yahoogroups.com
              Sent: Friday, November 30, 2012 10:57 PM
              Subject: [rapidq] Re: Rapid q OCX question

              --- In rapidq@yahoogroups.com, "Walter" <waltersamsa@...> wrote:
              >
              > --- In rapidq@yahoogroups.com, "johnk20042001" <klaffky2825@> wrote:
              > >
              > > >
              > > > Hi David,
              > > > I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.
              > > >
              > > > Walter
              > > >
              > >
              > > IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is use a screen shot of the QStringGrid and then use the .CopyRect or .Draw part of QPrinter. That is, you get a BMP of the QStringGrid, stretch it with a QIMAGE then send that to QPrinter (or David's component).
              > >
              > > A screen shot is easily done through Screen.CaptureToBMP() in RapidQ2.inc. Feed the QStringGrid coordinates to the Screen.CaptureToBMP().
              > >
              > > Good luck 007
              > >
              > Hi johnk20042001, I thank you for your answer.
              > I dont't try this approach because I don't know how to put all non-visible cols and rows into the bmp.
              > I mean, if I have 2000 rows, on the printer side probably I have a lot of pages, so how could i split the screen shot into this pages?
              > This was the question that stop me to choose this path.
              > Any help is welcome
              >
              > Walter
              >
              One possible solution might be to store the QStringGrid in a QMemoryStream and then move it into a hidden QRichEdit. Once the data is in a QRichEdit... you'll be able to use my QPrint include file.

              The biggest problem I'm seeing with this solution is... it will take alot of work to get the data (to be put into the QRichEdit) to look exactly like it does in the QStringGrid.

              I'm thinking it can be done... but... it's going to take alot of trial and error before it comes out the way it's suppose to.

              David

              P.S. The OCX you mentioned probably would not work with the RapidQ StringGrid. Our QStringGrid is "literally" a one of a kind component (compared to similar components in other programming languages).




              I did this same thing using the QRichEdit scheme and it wasn't nearly as much trouble as I had expected it to me. I used an equal spaced font to keep the vertical fields aligned. I used my program only for myself, so formatting the QRichedit display to be compatible with other than my own printer was not a consideration.

              I did output to my printer (years back) using device independent output from a register directly to the printer. It worked fine then; however, I doubt the Windows (pretend) DOS using the Command program will permit using functions that "DOS can do better". I used control (form feed) to output the printer buffer to the paper. Even if it works for my station today, I would question how useful this method would be for another user with a different station.

              old bob
              --.-


              ------------------------------------

              Yahoo! Groups Links

              <*> To visit your group on the web, go to:
                  http://groups.yahoo.com/group/rapidq/

              <*> Your email settings:
                  Individual Email | Traditional

              <*> To change settings online go to:
                  http://groups.yahoo.com/group/rapidq/join
                  (Yahoo! ID required)

              <*> To change settings via email:
                  rapidq-digest@yahoogroups.com
                  rapidq-fullfeatured@yahoogroups.com

              <*> To unsubscribe from this group, send an email to:
                  rapidq-unsubscribe@yahoogroups.com

              <*> Your use of Yahoo! Groups is subject to:
                  http://docs.yahoo.com/info/terms/



            • Walter
              ... Thanks to all for the help. In the coming day I ll try your hint, if I can make it work, I ll let you know Walter
              Message 6 of 10 , Dec 1, 2012
              • 0 Attachment
                --- In rapidq@yahoogroups.com, old bob <bbferrier@...> wrote:
                >
                >
                >
                >
                >
                >
                > >________________________________
                > > From: David <burkleyd@...>
                > >To: rapidq@yahoogroups.com
                > >Sent: Friday, November 30, 2012 10:57 PM
                > >Subject: [rapidq] Re: Rapid q OCX question
                > >
                > >--- In rapidq@yahoogroups.com, "Walter" <waltersamsa@> wrote:
                > >>
                > >> --- In rapidq@yahoogroups.com, "johnk20042001" <klaffky2825@> wrote:
                > >> >
                > >> > >
                > >> > > Hi David,
                > >> > > I know your include file, but I'm need to print (and preview) from a QStrinGrid component. So I'm looking for a way to generalize the printing from this component (like excel does). I've already have a skeleton to count the horizontal and vertical pages to print, draw the lines and write text, but I have't found a way to preserve all changes made in all dialog boxes you could open. It's quite difficult to me to explain what I mean so, if you are interested, I try to explaint it better also with examples.
                > >> > >
                > >> > > Walter
                > >> > >
                > >> >
                > >> > IMHO, solutions in RQ are best approached by using native RQ components before an old OCX. I am not sure of all requirements here but one thing to do is use a screen shot of the QStringGrid and then use the .CopyRect or .Draw part of QPrinter. That is, you get a BMP of the QStringGrid, stretch it with a QIMAGE then send that to QPrinter (or David's component).
                > >> >
                > >> > A screen shot is easily done through Screen.CaptureToBMP() in RapidQ2.inc. Feed the QStringGrid coordinates to the Screen.CaptureToBMP().
                > >> >
                > >> > Good luck 007
                > >> >
                > >> Hi johnk20042001, I thank you for your answer.
                > >> I dont't try this approach because I don't know how to put all non-visible cols and rows into the bmp.
                > >> I mean, if I have 2000 rows, on the printer side probably I have a lot of pages, so how could i split the screen shot into this pages?
                > >> This was the question that stop me to choose this path.
                > >> Any help is welcome
                > >>
                > >> Walter
                > >>
                > >One possible solution might be to store the QStringGrid in a QMemoryStream and then move it into a hidden QRichEdit. Once the data is in a QRichEdit... you'll be able to use my QPrint include file.
                > >
                > >The biggest problem I'm seeing with this solution is... it will take alot of work to get the data (to be put into the QRichEdit) to look exactly like it does in the QStringGrid.
                > >
                > >I'm thinking it can be done... but... it's going to take alot of trial and error before it comes out the way it's suppose to.
                > >
                > >David
                > >
                > >P.S. The OCX you mentioned probably would not work with the RapidQ StringGrid. Our QStringGrid is "literally" a one of a kind component (compared to similar components in other programming languages).
                > >
                > >
                > >
                > >
                > >I did this same thing using the QRichEdit scheme and it wasn't nearly as much trouble as I had expected it to me. I used an equal spaced font to keep the vertical fields aligned. I used my program only for myself, so formatting the QRichedit display to be compatible with other than my own printer was not a consideration.
                > >
                > >I did output to my printer (years back) using device independent output from a register directly to the printer. It worked fine then; however, I doubt the Windows (pretend) DOS using the Command program will permit using functions that "DOS can do better". I used control (form feed) to output the printer buffer to the paper. Even if it works for my station today, I would question how useful this method would be for another user with a different station.
                > >
                > >old bob
                > >--.-
                > >
                > >
                > >------------------------------------
                > >
                > >Yahoo! Groups Links
                > >
                > >
                > >
                > >
                > >
                > >
                >

                Thanks to all for the help.
                In the coming day I'll try your hint,
                if I can make it work, I'll let you know

                Walter
              Your message has been successfully submitted and would be delivered to recipients shortly.