|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Cant use Msgbox with running GPS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|