VBNet Sample (Yes really)

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • doctormike
    Junior Member
    • Nov 2012
    • 55

    #31
    SSL Certificate query

    Thanks Dave. There seems to be some discussion about SSL certs in the following archive:

    http://forum.bdp.betfair.com/archive...hp/t-1926.html

    I might pursue this one a bit further, as all apps exploit this direct connection to the API, and BF seem to be suggesting that SSL is a good security idea for people using their own, like myself.

    Your login-keep alive-logout stuff was great. I know how long it can take to figure some of these things out. For example I had no idea about the Newtonsoft.json libraries.
    Mike

    Comment

    • NickyG
      Junior Member
      • Aug 2014
      • 6

      #32
      Davecon, thanks for the code, as others have said it's an excellent starting point.

      I have one problem though, I added a Windows Form to the project as I find it much easier developing this way and hope to end up with a working Windows application, but I can't find a way to switch it from CONSOLE mode to WINDOWS mode, is it even possible? Or will I have to copy it all to a new project?

      Comment

      • davecon
        Junior Member
        • Dec 2010
        • 86

        #33
        Originally posted by NickyG View Post
        Davecon, thanks for the code, as others have said it's an excellent starting point.

        I have one problem though, I added a Windows Form to the project as I find it much easier developing this way and hope to end up with a working Windows application, but I can't find a way to switch it from CONSOLE mode to WINDOWS mode, is it even possible? Or will I have to copy it all to a new project?
        Hi Nicky
        I have not started my own project yet but if I was you I would start a fresh Windows Form Project and just use the Classes etc
        If you have just added a new Form to the NG Console application - In the Solution Explorer
        Right Click on the Project name to get the Properties
        Change StartUp Object from SubMain to your Form Name and Application Type from Console Application to Windows Form Application
        Its a complicated code switch/copy/change that I could not personally be bothered with lol
        Like I say what I would do is start a New Form Project from Scratch and play around with them both at same time if this is what you are going to do (Use the Console )NG example
        Do this by (In Solution Explorer) -- Right Click on the Solution Name and Click Add New Project
        The New Project will be added to the Solution Explorer
        You will now be able to play around with/run and copy stuff between the 2 projects
        In Explorer Just Right Click on the Project Name and Click Set as StartUp Project to Run and Test as required
        Hope this helps
        Dave

        Comment

        • NickyG
          Junior Member
          • Aug 2014
          • 6

          #34
          Cheers Dave, I now have a working form.

          Comment

          • Mr Ed
            Junior Member
            • Aug 2014
            • 22

            #35
            Hi

            I have only just realised this migration was even happening. My programming is pretty basic, but I manage to do what I need.
            I have only just (yesterday) started using VB13 so have quite a bit to learn.

            When I run the BasicApp, I get no errors, but I cant see Form1. So I cant test anything out.
            Any ideas why this is?

            Thanks

            Comment

            • davecon
              Junior Member
              • Dec 2010
              • 86

              #36
              Hi Mr Ed
              If you are trying the NG sample it is a console application and has no form
              If you mean that basic App I did for Troy (Its not meant to be part of any app project)
              Do you see the form when you run it? Or do you mean when you want to work on it in Vb13 environment ?
              If you want to work on it - Double Click Form1 in the Solution Explorer
              And it will show in your tabs
              Let me know if this is what you mean
              If not please try to explain in more detail and I will try to help if it is not the above
              Cheers
              Dave

              Originally posted by Mr Ed View Post
              Hi

              I have only just realised this migration was even happening. My programming is pretty basic, but I manage to do what I need.
              I have only just (yesterday) started using VB13 so have quite a bit to learn.

              When I run the BasicApp, I get no errors, but I cant see Form1. So I cant test anything out.
              Any ideas why this is?

              Thanks

              Comment

              • Mr Ed
                Junior Member
                • Aug 2014
                • 22

                #37
                Hi

                I mean the basic app you did. I can see the form but when I click start it does not display the form - even though it is showing up on the windows taskbar at the bottom of my screen.

                I hope that makes sense?

                Thanks

                Comment

                • Mr Ed
                  Junior Member
                  • Aug 2014
                  • 22

                  #38
                  Actually I think it may be saying "cant find or open the PDB file"

                  I dont even know what that means!

                  Comment

                  • davecon
                    Junior Member
                    • Dec 2010
                    • 86

                    #39
                    Hi
                    Did you Unzip the Files and then Double Click the BasicApp.sin file?
                    You wont get all the files if you dont unzip and do it this way
                    It might not work anyway if you dont have NewtonSoft installed its an old thing that does not work on mine now either unless I do things to it - Which I'm not lol
                    Try under "Build" Menu -- Rebuild Solution
                    Cheers
                    Dave

                    How to Install Json on Studio Express 2013

                    On main Menu Go To Tools - NuGet Package Manager – Manage NuGet Packages for Solution

                    Click on Json.Net and Click Install

                    Dave


                    Originally posted by Mr Ed View Post
                    Actually I think it may be saying "cant find or open the PDB file"

                    I dont even know what that means!
                    Last edited by davecon; 21-08-2014, 03:34 PM.

                    Comment

                    • Mr Ed
                      Junior Member
                      • Aug 2014
                      • 22

                      #40
                      I do have it installed and did unzip.

                      I also tried rebuild

                      I'm baffled as my own apps work fine!

                      Comment

                      • davecon
                        Junior Member
                        • Dec 2010
                        • 86

                        #41
                        Hi Mr Ed
                        If I was you - Best way to stop horsing around would be

                        In Solution Explorer -- Right Click on the SOLUTION Name (Probably Solution BasicApp) and Select ADD and then Add New Project
                        Give the New Project a Name say "My Basic APP" and add the Project
                        You will now see your new project in Solution Explorer under the other dodgy one
                        Right Click on the New Project Name (My Basic App)in Solution Explorer then Click Set as StartUp Object
                        This will open the new blank Form when you run it
                        Now Copy/Paste stuff from Original One to the New One testing as you go
                        I dont work on any programming till the Winter I'm only in Today because its Pi~#**ing down so cant give you a new one lol
                        I will probably put a proper one on here when I start doing one myself
                        Cheers
                        Dave
                        PS What you can also do to make things easier is Delete Form1 from New My Basic App
                        Copy Form1 from basic App Paste into the new one My Basic App -- Comment out all the code and Run it
                        Then comment out the code as you go to find the errors

                        Originally posted by Mr Ed View Post
                        I do have it installed and did unzip.

                        I also tried rebuild

                        I'm baffled as my own apps work fine!
                        Last edited by davecon; 21-08-2014, 04:46 PM.

                        Comment

                        • Mr Ed
                          Junior Member
                          • Aug 2014
                          • 22

                          #42
                          sounds like a plan

                          Comment

                          • Mr Ed
                            Junior Member
                            • Aug 2014
                            • 22

                            #43
                            Sorted.
                            It was the Me.Top that was causing the issue.
                            I don't know why - maybe because I use two screens( but I am guessing)

                            I'm planning to use your working example as reference for when I sort mine out

                            Thanks for your help. Much appreciated.

                            Comment

                            • davecon
                              Junior Member
                              • Dec 2010
                              • 86

                              #44
                              No probs - Glad you got it sorted Mr Ed
                              Now perhaps you can go on and build something more Stable (Hee Haw)
                              Dave

                              Originally posted by Mr Ed View Post
                              Sorted.
                              It was the Me.Top that was causing the issue.
                              I don't know why - maybe because I use two screens( but I am guessing)

                              I'm planning to use your working example as reference for when I sort mine out

                              Thanks for your help. Much appreciated.

                              Comment

                              • Mr Ed
                                Junior Member
                                • Aug 2014
                                • 22

                                #45
                                Clever

                                Comment

                                Working...
                                X