Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 25th, 2009, 02:53 AM
backup69 backup69 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: Estonia
Posts: 62 backup69 User rank is Private First Class (20 - 50 Reputation Level)backup69 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 21 h 32 m 19 sec
Reputation Power: 6
Question Cant use Msgbox with running GPS

Hi

I made app which run GPS and receive coordinates. My problem is i cant use msgboxes in this app because when Mscomm port is open all app freeze when i show Msgbox and need to kill over task manager because i cant even push ok button in the Msgbox. Maybe problem in the Mscomm Sub? Because this loop to frequently (over 1000 times in sec).
Following metod works but maybe this is stupid solution and someone know better one?
MSComm1.PortOpen = False
MsgBox "Some information"
MSComm1.PortOpen = True

Reply With Quote
  #2  
Old June 25th, 2009, 04:01 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 15th Plane (12000 - 12499 posts)
 
Join Date: Jun 2003
Posts: 12,280 Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level)Doug G User rank is General 15th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 Days 12 h 45 m 59 sec
Reputation Power: 2009
You have a problem in your mscomm coding somewhere.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old June 25th, 2009, 10:16 AM
medialint's Avatar
medialint medialint is offline
Type Cast Exception
Click here for more information.
 
Join Date: Apr 2004
Location: Oakland, CA
Posts: 13,983 medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)medialint User rank is General 70th Grade (Above 100000 Reputation Level)  Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 3 Weeks 2 Days 18 h 22 m 5 sec
Reputation Power: 5633
Facebook
Try using a regular form instead
__________________
medialint.com


"Beware of the man who works hard to learn something, learns it, and finds himself no wiser than before. He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way."
- Vonnegut - Cat's Cradle, 1963

Reply With Quote
  #4  
Old June 25th, 2009, 01:17 PM
MadDogBrown MadDogBrown is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Posts: 762 MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 13 m 40 sec
Reputation Power: 520
Why do you have a loop?

You should be handling the onComm event to process data.

It sounds like your loop is deadlocking the UI; you're not allowing windows messages to be processed.

If you must loop, consider using a Thread.Sleep() followed by a call to Application.DoEvents to allow the message queue to be processed.

Be aware that you could cause a re-entrant situation in your event handler by doing so.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Cant use Msgbox with running GPS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek