Announcement

Collapse
No announcement yet.

small program to help get an idea

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • small program to help get an idea

    I am try to learn pb. I would like to see some very samll proram.
    If some one could post some thing like what I described here

    "I would like to see the code for a small program that take in a
    string of alpha data then by cliking a button you then send the
    text to a difernt window."

    this would give me a way to get a hand of this code. codeing for windows
    is new to me.

    thanks
    Joe

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

  • #2
    Joe,

    You want the text to be sent to a different window owned by this
    application or a different application entirely?

    Or do you want it to just display the text on the same window?



    ------------------
    -Greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

    Comment


    • #3
      I started posting some small programs, but in each case they were old and I didn't think it would be a good idea to teach you my bad habits LOL...

      I've learned a bit more professional coding style since, Sooooooooooooooooooooo....


      See the SAMPLES folder in your PBDLL install, just do file open-> Then click samples, then click DDT, and I believe helloDDT.BAS will help you get an idea.

      The help is a great help too, use it a LOT!

      And email any thing you get "Stuck" on, I don't have a lot of time for writing tons of code lately ( ) but I'd be happy to debug something..

      Scott



      ------------------
      Scott
      mailto:[email protected][email protected]</A>
      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        Code:
        #compile exe
        #dim all
        #register none
        #include "win32api.inc"
         
        %IDC_LABEL = 100
        %IDC_TEXT  = 101
         
        declare callback function DlgProc
         
        function pbmain
         
            local hDlg as long
         
            dialog new 0, "Example",,,115, 70, %DS_CENTER to hDlg
            control add label, hDlg, %IDC_LABEL, "Add Text:",5,5,100,14
            control add textbox, hDlg, %IDC_TEXT, "",5,15,100,14
            control add button, hDlg, %IDOK, "&OK",5,35,40,14
            control add button, hDlg, %IDCANCEL, "&Cancel",65,35,40,14
            dialog show modal hDlg call DlgProc
         
        end function
          
        callback function DlgProc
          
            local s as string
         
            select case cbMsg
            case %WM_INITDIALOG
            case %WM_COMMAND
                select case lowrd(cbwParam)
                case %IDOK
        	    control get text cbhndl, %IDC_TEXT to s			
        	    if s = "" then
          	        msgbox "There is no text!",,"Example"
        	    else
        		dialog end cbhndl
        		msgbox "The text is:" & $CR & s,,"Example"
        		msgbox "Thank You for using Example",,"Example"
         	    end if
        	case %IDCANCEL
        	    dialog end cbhndl
                end select
            end select
         
        end function
        ------------------


        [This message has been edited by Peter P Stephensen (edited August 28, 2000).]
        [email protected]
        www.dreammodel.dk

        Comment


        • #5
          Joe;

          To make life easier you can generate the basic skeleton for
          programs (the GUI part) by using our
          Freeware DDT Visual Designer.

          You can quickly get the feel for making DDT programs Visually
          with PB and its free.

          http://ezgui.com

          The download is on the Products page !


          [This message has been edited by Chris Boss (edited August 28, 2000).]
          Chris Boss
          Computer Workshop
          Developer of "EZGUI"
          http://cwsof.com
          http://twitter.com/EZGUIProGuy

          Comment


          • #6
            Peter,

            In the example code you gave above how could I be able to paste
            a string in the text box and be able to copy a string from the
            text box ?

            I haven't done any PBDLL programming and I thought the example
            code you gave is a good starting point for a program I want to
            write to encrypt strings. What I want to be able do is copy
            string from PB/IDE and paste into text box. The program will
            encrypt string with encrypting function and display the encrypted
            string in the text box. I can then copy that enctrypted string
            and paste in PB/IDE. This is to make strings in my program
            unreadable in the compiled EXE.

            I will appreciate your help and suggestions.

            Thanks.


            ------------------
            Gajanan Raje

            Comment


            • #7
              Peter,

              After searching through PB Forum, I found routines for copying
              data to clipboard and retrieving data from clipboard. I believe
              I should be able to accomplish what I want to do using these
              routines.

              I have been using PBCC along with Console Tools plus Graphix
              from Perfect Sync. Writing this small program will give me
              start for using PBDLL6.

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


              [This message has been edited by Gajanan Raje (edited September 05, 2000).]
              Gajanan Raje

              Comment

              Working...
              X