VB6 MSCOMM wroks on one PC and not another


Closed Thread
Results 1 to 34 of 34
  1. #1
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default VB6 MSCOMM wroks on one PC and not another

    I have been using MSCOMM for quite awhile, this problem has dah me stumpped for a week now.
    Properties of MSCOMM:
    DTREnable is True
    EOFEnable is TruHandshaking is 0
    InBufferSize is 3072
    InPutMode is 0
    OutBuffSize is 512
    RThreshold is 1
    RTSEnable
    Settings is 2400, N,8,1
    SThreshold

    Using the same PIC code and same VB code on different machines, I get different results. The only machine that the code operates correctly on is an older machine, x86, Windows 2000 SP2. A second machine running Win2K and a third machine running XP have this problem;
    MSCOMM receives the first 8 characters, processes these 8 characters, then receives the balance. I am testing with 10 characters. I am sending PIC variables from a bit array. I am receiving the data in VB as a srting.
    I have sent the data to HyperTerminal and in every case the correct data is being sent from the PIC. For some unknown reason, on certain machines all the data is not received into the buffer.
    In addition to the slower processor I mentioned ealier, the copy of VB on the slower machine does not have the latest service pack while the other machines do, SP6. Attempting to load SP6 causes some errors and does not load. I don't have the errors handy.
    I have places a Pauseus in the Send routine thinking the slower processor was the issue, but no change.
    Any suggestions are appreciated.

    B

  2. #2
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    What do you have the attribute InputLen set to?

  3. #3
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Input Length

    Thanks for the responce. Input Length is set 0.

    I have since sent the input string to a label, visable property set to false, and so far every test I have done, not extensive mind you but progress, has been successful. I don't why the program operates better this way, timing I'm guessing.

    If InputLen should be something other than 0 please let me know. The input length is variable, no telling how many characters.

    Thanks again for the interest.

    B

  4. #4
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cooksydesign View Post
    Thanks for the responce. Input Length is set 0.
    If InputLen should be something other than 0 please let me know. The input length is variable, no telling how many characters.
    For Win XP & 2K2 you definitely want InputLen set to anything other than 0. I lost some hair a few years back when I wrote a piece of software for a serial io controller, worked fine on 9x with InputLen set to 0, but refused to work on XP until I changed it to equal 1.

  5. #5
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Length property

    Again, thanks for the interest in my post. Changing the receive length property to 1 did not do any good. I think that tells MSCOM buffer what to expect. If the incoming string was a fixed length it may have helped. I seem to have sorted it out by sending the string to a label first, then work with the data. It has not failed since I started doing it that way. I realize this is a work around, and the true cause is not identified. If there are other suggestions, I will most certainly try them.

    Regards.

    B

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I no longer use MsComm and VB6, i use VBExpress or .Net. From there you can also use the LF interrupt events (comport.ReadLine) which is probably the way to go. Never ever failed for me 'till now. VB6 EOF event is one method... if you can make it work.

    LF event... way easy to code on the PIC side... hserout [whatever, 10]

    There's a lot of different way to have success with VB, i have some applications dealing with MBs and GBs of data transfer... problem-free since years now. Even in VB6.

    I prefer the handshaking method... hardware or software.... and a preamble string never bite anyone yet.
    Last edited by mister_e; - 24th March 2008 at 19:01.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    The new Visual Basic.NET 2008 is so much better than 6 that you shouldn't waste your time trying to get it to work.

  8. #8
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Incidentally, I just discovered that Microsoft has continued support for VB6 until the 31st of march this year. They initially terminated support back in 2005, there is obvioulsy still a considerable amount of programmers developing in it. Also, all of the latest operating systems come shipped with VB6 run times! (bet ya didn't know that) This includes Vista.

    Expect to be able to run all of your VB.com applications on operating systems well into the next decade! VB6 is far from finished.

  9. #9
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post Painful transition from VB.com to VB.net

    Quote Originally Posted by tenaja View Post
    The new Visual Basic.NET 2008 is so much better than 6 that you shouldn't waste your time trying to get it to work.
    It's a very painful transition from VB.com to VB.net, particularly for programmers with 10+ years background with .com (like learning to walk all over again) and a lot of people are refusing to exchange their expertise for a "start from scratch experience", because that's pretty much what it is.

  10. #10
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    lol ..
    VB6 pro sells for upwards of AU $250 on eBay while .net goes for as little as $75.

  11. #11
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    VB6 Pro US $229
    http://cgi.ebay.com.au/Microsoft-Vis...sid=p1638.m122

    VB.net 2003 $79
    http://cgi.ebay.com.au/MICROSOFT-VIS...sid=p1638.m122

    Both obsolete products which are officially no longer produced. VB6 was released in 97, so that's 6 years between the two, yet VB6 is worth more than 3 times as much. I have actually seen VB6 going for much more than this, as high as US $1,000

    Makes you wonder huh?

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Well, probably because there's a lot of free version like EXpress and people just don't buy .NET ?

    On the other side, there's probably more .NET to sale than VB6.. but more code in VB6 available for free...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Well, probably because there's a lot of free version like EXpress and people just don't buy .NET ?

    On the other side, there's probably more .NET to sale than VB6.. but more code in VB6 available for free...
    Thats plus I think Microsoft hit a serious "keynote" with VB6 that they just haven't been able to replicate since.

  14. #14
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default Microsoft have forced OOP onto everyone with their .net frame work

    I think if you're going to use .net then you might as well go with C++ or C# (C sharp) I say this because all .net languages are object orientated, and there's really not much more involved with modern versions of C. So I guess the question is, is VB.net really a RAD (rapid application development) language like its predecessor? Would a professional C++ programmer like this person http://www.planet-source-code.com/vb...68164&lngWId=1 ever trade off C++ .net for VB.net like he did with C++.com? He claims that his high-tech calculator would have taken 3 times longer to develop in C++ than it did to do it in VB.

    The problem is, unlike with VB6, not everyone is going to be a programmer. Sure, I've gotten my head around OOP (object orientated programming), but it has taken 2 university units to get there.
    Last edited by T.Jackson; - 25th March 2008 at 15:48.

  15. #15
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I can't agree 100% with you but i understand what you mean.

    In fact everyone with a minimum of brain and a load of patience and time can be a programmer. If .NET is your first language, in theory, you'll or should learn it step by step the "recommended way". This include at least Pinvoke, Marshalls, Delegate, Garbage Collector and all other new stuff.

    But if you're a long time user of another language, you might have a lot of problem to include and understand some new requirement and loose the "good-ol' way" to do things. But yeah, you can disable almost everything of these and keep using the ol' way... you can even use most, see all, old .COM components.

    As long as the framework work great, there's no real problem, but if one day MicroSoft's developers screw something in... your customer could give you a call... and then you'll have to prove 'em it's caused by the Microsoft's Framework problem...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  16. #16
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    In fact everyone with a minimum of brain and a load of patience and time can be a programmer.
    Don't know about that. I came across a group of some very frustrated people on the discussion boards when I did my first unit of Java. They weren't idiots, they certainly had a brain, but they just couldn't get their head around OOP, particularly polymorphism.

  17. #17
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default I had considerable competition on eBay winning VB6

    I just won a professional academic copy of VB6 on a eBay auction. For years now I have been using VB5, and for just as many years I've always wanted VB6 (there are many significant differences between 5 & 6) Most notably is the "replace" function.

    VB6 is still in demand -- ironically I was up against "6" other bidders.

    http://cgi.ebay.com.au/ws/eBayISAPI....m=160220000342

    I must say that I'm happy with my purchase , considering that the "buy-it-now" price in the States typically ranges from US $250 to $1,000

    Any takers on my copy of VB5 I wonder

  18. #18
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    I purchased Visual Studio .NET when it was new, and my PC programmer refused to use it. When 2005 .NET finally came out (and with a free version available) I convinced him to give it a try, since they replaced many of the 6.0 features that were eliminated in the original .net release.

    Not only has he embraced it, but he's said he'll never go back. For those not looking forward to a new learning curve, I suggest you give it a try. The benefits will outweigh the time taken to learn them.

  19. #19
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile Believe me I'm sane!

    Quote Originally Posted by tenaja View Post
    I purchased Visual Studio .NET when it was new, and my PC programmer refused to use it. When 2005 .NET finally came out (and with a free version available) I convinced him to give it a try, since they replaced many of the 6.0 features that were eliminated in the original .net release.

    Not only has he embraced it, but he's said he'll never go back. For those not looking forward to a new learning curve, I suggest you give it a try. The benefits will outweigh the time taken to learn them.
    Some people probably think I'm nuts for purchasing an obsolete product for $150 when I can buy .net 2005 for half that. Basically I have an application that I'm too far into to be able to switch over at this point, otherwise I would be going with .net

    VB6 is an obsolete 10 year-old product Vs .net which is cutting edge technology. No disputing this much.

  20. #20
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    VB6 is an obsolete 10 year-old product Vs .net which is cutting edge technology. No disputing this much.
    I don't see what's so obsolete about it.
    V.B.6 Enterprise is all I've got (actually V.S. 6 Enterprise), except for PBP...
    How can it be obsolete if it works so damn good? Kinda like my old Chevy Blazer...32+ years old, still starts every time. Do you have to play with it once in awhile? Yes. Do you have to play nice? Yes.
    Would I quit using either of them tomorrow if I got a new one (either .NET or an '08 Blazer) ? Not a chance...
    (besides, I can't stand the new improved way of doing things that .NET introduced...makes me cringe...)

  21. #21
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    I don't see what's so obsolete about it.
    Make sure you take a picture of your prospective customer’s face to capture the reaction you get when you tell them that, you plan on developing their project in a language which is over 10 years old, not object orientated, and may or may not function in future operating systems. That picture would be priceless, and your bank account will remain with a negative balance too.

  22. #22
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Priceless
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  23. #23
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default Blue screen of death

    Quote Originally Posted by mister_e View Post
    Priceless
    That's called the "blue screen of death" for those of you who don't know. How far MS have come, I used to get that screen in 98 from doing some of the most simplest things like; killing files, registry manipulation, running multiple instances of QuarkXpress ... XP is certainly faultless in this regard. Anyway I've gotta get ready to run, big day on.

  24. #24
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Oh there's tons of idiot errors message since i own Windows (my first was 3.0), such as "this program has perform an illegal operation and will be shut down" etc etc.. huh.. who thought to code it

    At boot... "No keyboard detected.. press F1 to resume" (OK That's Bios)

    now with Vista (thanks i don't have it yet) some may have fun reading this
    http://blog.gadgetlite.com/2007/12/1...celess-though/

    and seems the Blue screen of death have been there for Vista as well


    one of my favourite banned commercial...
    Last edited by mister_e; - 28th March 2008 at 19:24.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  25. #25
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    one of my favourite banned commercial...
    That is bloody terrible! I hope Microsoft sued and got millions! Sun micro system's products are far from perfect either. I have just lost an incredible amount of respect for Sun. I now understand why MS will never ship their OS with Java run times.

  26. #26
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Can't tell for sure.. i'm not a Java coder... the only thing i know pretty well of Java is coffee
    Last edited by mister_e; - 28th March 2008 at 19:58.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  27. #27
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Can't tell for sure.. i'm not a Java coder... the only thing i know pretty well of Java is coffee
    Who am I kidding, Java's faultless and up to 20 times more efficient than most other MS languages apart from C++, but that commercial sucks harder than a heated vacum cleaner.

  28. #28
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    ... mmm... this remember me my ex girlfriend

    Oups... sorry... she's probably reading this

    Bah, she saw worst on Facebook...
    Last edited by mister_e; - 28th March 2008 at 20:23.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  29. #29
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Actually I can think of one fault with Java. Sun advise against mixing Swing & AWT GUI components as it may cause unpredictable problems. (RMIT University lecture notes)

    So there you go, Java is sub perfect!

  30. #30
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    Make sure you take a picture of your prospective customer’s face to capture the reaction you get when you tell them that
    Heck, do you think most customers (or a receiver of said projects/equipment, whatever) care much these days? Instant gratification... Does it work? Ok, I'll take it... that sort of thing..
    I know .NET is the latest/greatest/next best-est thing out there...or is it Linux? My jury is still out on that one. I got a 2nd box running Ubuntu, playing with it still. If it wasn't for the lack of app's in general, I might've switched over completely years ago.
    Anywhos...I've got that .NET Express loaded and I play with it off and on. Sure, it's full of features....features that I basically don't need or use. And jeeze is it slow to operate. Takes forever to load, 1/2 again as much to close, and so on. Maybe it's just the .NET Express itself vs. the full blown .NET, I don't know. And as has already been said in loads of places, those syntax changes can sometimes really kill a guy. A person could literally spend days trying to figure out the new way of doing things because the conversion wizard doesn't get it!

  31. #31
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Oh there's tons of idiot errors message since i own Windows (my first was 3.0), such as "this program has perform an illegal operation and will be shut down" etc etc.. huh.. who thought to code it
    Do you still have a PC running anything earlier than XP?
    One of the bugs that was with Windows from 95 thru ME, it finally got fixed was that stupid 'stuck menu' bug. You'd open up a folder, pull down a menu, without clicking anything, move the mouse off the open folder/menu, open up a 2nd folder, and the menu that you pulled down in the first folder would be stuck, even after you closed the original folder. And the only way to get rid of it short of a reboot, was to kill Explorer and reopen it thru Ctrl-Alt-Del.

  32. #32
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Do you still have a PC running anything earlier than XP?
    One of the bugs that was with Windows from 95 thru ME, it finally got fixed was that stupid 'stuck menu' bug. You'd open up a folder, pull down a menu, without clicking anything, move the mouse off the open folder/menu, open up a 2nd folder, and the menu that you pulled down in the first folder would be stuck, even after you closed the original folder. And the only way to get rid of it short of a reboot, was to kill Explorer and reopen it thru Ctrl-Alt-Del.
    Funny you should mention this. I'm using a 1 month old XP computer with a clean install, nothing extra installed, no internet and only enough programs to do PIC's - it's a dedicated PIC computer. Last night I had the same hanging menu problem. I was hoping a clean computer would stop things like this.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

  33. #33
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    (besides, I can't stand the new improved way of doing things that .NET introduced...makes me cringe...)
    Struggles to learn. I know the feeling.

  34. #34
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    Funny you should mention this. I'm using a 1 month old XP computer with a clean install, nothing extra installed, no internet and only enough programs to do PIC's - it's a dedicated PIC computer. Last night I had the same hanging menu problem. I was hoping a clean computer would stop things like this.
    I haven't been able to duplicate the hanging menu thing in XP, but then again, it's XP SP2 (or is it 3 now?). I don't remember if the bug still existed in XP (raw) or SP1. Something tells me it was still there, but I'm not 100% on that.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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