Results 1 to 24 of 24

Thread: VB Programming book

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    VB Programming book

    I hope I am not overstaying my welcome here, but I can't seem to find a book on basic VBasic programming.

    I've tried searching this forum, but not really finding the basics (!) I need.

    There are lots of books on how to set up screens, click boxes and all the rest, but I am dogged if I can find a
    book like the ones I have had for years on GW Basic, Turbo Basic, etc, which list commands, structure, that sort of thing.
    I've got all kinds of nice GUI screens set up, but when it comes to what to do when I click something, I'm lost, except
    maybe printing "Hello World!" (See, I told you I was old!)

    A little insight into serial comms would help, I have an app in which I must input and output to a serial port. Yes, the good old
    9 pin kind. I need to talk to a piece of hardware which uses the RS-232 9 Pin, and won't work properly with a USB-9pin adapter.
    Been talking to it with a GW Basic program for 20 years, but that's getting iffy.

    Thanks in advance,
    -- Doc

  2. #2

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB Programming book

    Since you can't easily obtain VB6 anymore you might want to look for a VB.Net boook instead.

  4. #4
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    Quote Originally Posted by drdumont View Post
    I need to talk to a piece of hardware which uses the RS-232 9 Pin, and won't work properly with a USB-9pin adapter.
    Been talking to it with a GW Basic program for 20 years, but that's getting iffy.

    Thanks in advance,
    -- Doc
    I can think of only one reason why a USB/RS232 adapter would fail to work with your hardware. If what you're communicating with uses the "Break" command it will fail to work with some adapters that don't support it. I have quite a few of them but only my old Belkin can't pass the Break. On the other hand, if you're saying that your GWBasic can't handle USB/RS232 converters that would not be a surprise, since it's a DOS program.

    Jan Alexson is probably the most recognized authority of all things Serial Port. Her books are packed with VB6/MSComm code.
    http://www.amazon.com/Serial-Port-Co.../dp/193144806X
    Last edited by CDRIVE; Feb 9th, 2014 at 11:30 PM.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    Re: VB Programming book

    Many THANKS for the responses. I guess I could skip VB6 altogether, I am totally ignorant of VB.net. Guess I will head for
    the Half Price Books nearby. Yeah, I'm old. and cheap, too!

    As to the Break command - You have hit the nail right on the head. My application calls for an old time ASCII BREAK command, which I
    have been implementing with an INP(x) and OUT, and a couple of PEEKs and POKEs. This trick was sent to me probably 20 years ago. As
    I remember at the time, I was using a "laptop" portable which had to be plugged in to run the orange plasma display. I seem to remember
    it came via a BBS to which I subscribed. Funny, to this day, my program says "REM Thanks to <author's name> for this!". I'll have to
    research that, as that Good Samaritan provided me with the key to the whole program.

    Does VB or VB.net support a BREAK command?

    Again, thanks for the kind replies.

    -- Doc
    www.dumont.tv

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: VB Programming book

    Guess I will head for
    the Half Price Books nearby. Yeah, I'm old. and cheap, too!
    Hey! there's no shame in that! I picked up a $80 worth of books on AJAX and Web2.0 for a mere $22 total at 1/2 Price Books... sadly, I had to move half way across the country to where there is no 1/2 Price Books store... *sniff* I miss it. It was a great treasure trove of cheap books.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: VB Programming book

    Search Google books for free books like this one



  8. #8
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: VB Programming book

    You may want to look at Amazon's used books if you're looking for something not totally new, and very current. I've seen VB6 books that originally cost around $120 offered for as little as $0.01 plus shipping! Of course I made the mistake not to order immediately, had to make arrangements and when I came back a few days later they were gone. So I ended up paying a lot more: $28.70 plus shipping... :-( But, while I was at it, I picked up some other books at $0.01, $0.89, and $2.89... :-) All used, but in very good condition.

  9. #9
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    Quote Originally Posted by drdumont View Post
    Does VB or VB.net support a BREAK command?

    Again, thanks for the kind replies.

    -- Doc
    www.dumont.tv
    Yes, the VB6 MSCommControl supports it and Picaxe uC's also need it to program them but it's not required to TX/RX from and to Picaxe chips. This is how I discovered that not all USB/RS232 converters support it back when Belkin made my model. Today, I think most do because the other four I have do.

    BTW, my first scope,. back in the early 60's, was a 40's vintage (I think 500KHz BW) Dumont. No trigger just a free running sweep gen with a Sync Input.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  10. #10

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    Re: VB Programming book

    Quote Originally Posted by 4x2y View Post
    Search Google books for free books like this one
    Thanks for the help. But either a drunken chicken stepped in ink and ran around my screen or the website is written using a Farsi character set.

    Found the book on Amazon for <$25.

  11. #11
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: VB Programming book

    The online documentation should do you pretty well, there is a huge amount of info there. I actually have the hard copy version of this for VB5 and it is huge. can't find them at the moment but I did find the older ones for VB-Dos Reference guide is ~500 pages and Programmers guide is ~650 pages.

    I think the ones for VB5 were ~1000 pages each, one for the language and one for the controls, all of which is in the online help.

  12. #12
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    Quote Originally Posted by drdumont View Post
    I have an app in which I must input and output to a serial port. Yes, the good old
    9 pin kind. I need to talk to a piece of hardware which uses the RS-232 9 Pin, and won't work properly with a USB-9pin adapter.
    Been talking to it with a GW Basic program for 20 years, but that's getting iffy.

    Thanks in advance,
    -- Doc
    I'm curious. Care to share what the hardware is?
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  13. #13

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    Re: VB Programming book

    Sure. It is a Chyron CODI television graphics generator. Thousands have been used for years at racetracks, airports, etc. It is essentially one channel of a Chyron Infinit! (tm), which was for years the defacto standard in broadcast television character generators. It can be talked to over a serial data link with incredibly easy almost English syntax. I use it once a year to generate the donor crawl for a benefit show I have done for 41 years. Also have used it to generate text, warnings, insert logos, all kinds of nifty stuff in my duties in broadcast tv facilities.
    The handler/controller I wrote for it 20 years ago in GW-Basic still works, but I'd like to spiff it up a little. Alas, the only way to halt a crawl before it is finished is to send the device an actual software ASCII BREAK, and the only way to do that other than with a pushbutton, a couple of reed relays and a power supply ( crude, but it worked most of the time, although it obviously would send garbage, as there was no timing ). The PEEK, POKE, and IN() and OUT() statements I used to generate the BREAK have served me well.
    I have to keep three old hayburner laptops up and running, using XP and the 9pin connector. Haven't been able to get the program to properly address the CODIs using a USB to 9 pin serial adapter.
    Why don't I just get a new character generator? Well, there are about 3,500 reasons, all of which have a portrait of George Washington affixed thereto.
    I guess I will one day be forced to part with said portraits, as the manufacturer no longer supports the unit, and I've only got a couple of cannibalizable units left. And if the airline loses my one working unit, I am up the old Unsanitary Tributary with no visible means of locomotion, as it were.
    Last edited by drdumont; Feb 16th, 2014 at 12:32 AM.

  14. #14
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: VB Programming book

    Have a look at the online help for the MSComm control or do a quick web search for some sample code.

    It really is not that complicated to do in VB, much easier than it was in GWBasic

  15. #15
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    I Googled it and found two of them on Ebay. When the graphics of it popped up I recognized it. We had at least two of them at the hospital I contracted for before I retired. We used it to pipe TV menu info to patient rooms as well as things like close out sales on liver transplants.

    VB6 (MSCommControl) will work seamlessly with USB/Serial adapters. As for the Break command; I think you'd be hard pressed to find a current adapter that doesn't support it. Testing an adapter for Break compatibility is easy. All you need is a LED and series 10K resistor connected between the TX pin and GND. A voltmeter can be used too. The other option is to use the MSComm_OnComm() event to detect it using a LoopBack tester or a simple jumper between the TX & RX pins on the DB-9 connector.

    Code:
    Private Sub Command1_Click()           
       MSComm1.PortOpen = True
       MSComm1.Break = True                  ' Place the TX pin in Break state
    End Sub
    
    Private Sub MSComm1_OnComm()         
       If MSComm1.CommEvent = comEventBreak Then                ' Monitor the RX pin.
          MsgBox "Break Signal Detected!"    ' Alert me if the RX pin is in Break state
         'Do something!
       End If
    End Sub
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  16. #16
    Junior Member
    Join Date
    Nov 2013
    Posts
    18

    Re: VB Programming book

    Quote Originally Posted by dilettante View Post
    Since you can't easily obtain VB6 anymore you might want to look for a VB.Net boook instead.
    Ignore this.

    Find a new forum if you don't have a proper answer to the poster's question. No one wants to hear it.

  17. #17
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: VB Programming book

    Quote Originally Posted by jay! View Post
    Ignore this.

    Find a new forum if you don't have a proper answer to the poster's question. No one wants to hear it.
    That attitude is not acceptable on this site. If you can't be polite, then please don't post.

    While you may think that the post you quoted was not an appropriate response to the question, it is because questions are often far wider reaching than they first appear to be - and a surprisingly large amount of the time the original question in a thread turns out to be the "wrong" question. Due to those reasons and more, giving advice that wasn't specifically asked for (but is relevant) is often a good thing.

    It was a perfectly valid suggestion (and arguably a good idea for a variety of reasons), and there was no reason to think that the thread starter would object to it - in fact, the next post from the thread starter (#5) said it might be a good idea for them. Whether or not it would be good is something that should be considered, but the decision is up to the thread starter, not you or anybody else.

  18. #18
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    Actually, there are many offerings of VB6.0/VS, (including the original MS VB6.0 Manual) on ebay but they aren't cheap!
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  19. #19

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    Re: VB Programming book

    Thanks to all for the help. I just received my copy of the Visual Basic Programmer's Guide (got them on Amazon used for <REALLY!> ONE PENNY (plus $7 shipping), a dupe copy of the Programming in VB 6, and downloaded the VB 6 language torrent. And just did the first exercise. From skimming the book, looks like first thing I need to do is get my *&^% together, build the GUI (Just duplicate my DOS page with all the regeneration and stuff, using click boxes and text entry boxes. Looks like about a 4 month project. Which is cool, as I have 10 months. So I'll probably be programming all the way to air time.
    Finally finding something explaining the commands and syntax! Again, thanks to all for your time!
    -- Yours for Better Television,
    -- Doc
    drdumont.webs.com/miscellaneous

  20. #20
    Addicted Member
    Join Date
    Mar 2007
    Location
    India
    Posts
    227

    Re: VB Programming book

    If you have access to MSDN you will find the famous book HardCoreVB in it!

    It is a fantastic book and I refer to it as and when needed.

  21. #21

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    7

    Re: VB Programming book

    Gotta love Amazon! Bought HardCoreVB for $.01 and $4 shipping. Also got Ready to Run VB Algotithms with unopened CD for $6 and $4 shipping. That's a pretty good deal, if the CD is still in one piece and round and flat.
    Got a long train ride coming up, Chicago to Seattle, then Seattle to LA and LA back to Dallas. Get a lot of good reading done that way.
    Yours for Better Television,
    -- Doc

  22. #22
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: VB Programming book

    Yep, it's really great the deals you can find there on used books. It's just unfortunate that I live in Europe, and have to fork out $46,50 for shipping if I want it in 3-7 business days... Or at least $16,95 if I am ready to wait 3-6 weeks for it to show up...

  23. #23
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: VB Programming book

    Just my opinion but I think you can find the answer to just about any VB6 question right here on VB Forums!
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  24. #24
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: VB Programming book

    @CDRIVE.

    I believe the VB forums archive is a great resource to find answers to questions. And if you don't find what you're looking for, there is the option to post your specific question. Which is then more often than not picked up by several people who are good-hearted enough to share their time, knowledge and experience to help you, or point you in the right direction to find answers. For me, the enthusiastic, but only semi-professional programmer, these are the "heroes" that can't be honored enough.

    However, reading a book about all the possibilities is something else than answering a specific question. In my humble opinion these are not mutually exclusive. Reading a book, just like attending seminars, workshops or trainings, may give you new ideas or opportunities to explore. Which then may lead to specific searches for information and possibly specific questions…

    Even though I consider myself lucky with an international background and friends in the US who could serve as an intermediate, I still wish I’d have the access to the same level of service and prices as you have. I’d say you should consider yourself lucky to get a book for a penny plus $3.99 shipping and receive it virtually overnight, whereas it would cost somebody in Europe significantly more money to get the book way later.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width