I will post my correct and working code tonight. Basically I wrapped up all the intelligence into another custom ActiveX component of my own design so you may have to modify to suit your needs.Quote:
Originally Posted by hcker2000
Printable View
I will post my correct and working code tonight. Basically I wrapped up all the intelligence into another custom ActiveX component of my own design so you may have to modify to suit your needs.Quote:
Originally Posted by hcker2000
Wow agine that didn't take long I set the delay on the on com event to sleep 100 and it still locks up. Even if it didn't 100ms sleep is way to long as it takes roughly 7 seconds to update the display.
OK, the delay stuff is now in the code I posted. You can use it if it helps. If not, good luck.
http://www.vbforums.com/showthread.php?t=315098
Humm checked it out. Dosn't look like I am doing a whoal lot of stuff diferently when it comes to actualy sending date to the com port. The only difference that I can see is I'm trying to update the display every half second or so.
Comming back on your program, I found an other one.
VB Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim lngMsg As Long lngMsg = X / Screen.TwipsPerPixelX Select Case lngMsg Case WM_RBUTTONUP ' right button SetForegroundWindow Me.hWnd Call Me.PopupMenu(popMenu, , , , popStartStop) Case WM_LBUTTONUP popHideShow_Click End Select End Sub
So what is wrong with that chunk of code?
Well how can lngMsg become WM_RBUTTONUP or WM_LBUTTONUP? Now false messages can be send (a lot). Myn opinion still stands that MSComm can't blow up VB. It must be in an API.
I concur. I've never seen a problem with MSComm Control.Quote:
Originally Posted by namrekka
Humm. Well I see what u meen now. I will comment it out as it is only for the system tray pop up menu which isnt as important as geting it working properly.
That is what was causing it. I'm still probably going with the dll because it is alot smaller than the ms comm controler is.
I think I missed something. What DLL?Quote:
Originally Posted by hcker2000
Oh. When these problems came up to begine with a friend of mine was like well why dont I just make you a dll for that? Of corse that is fine with me because the dll is much smaller than the mscomm controler is. dll is about 69k compared to about a meg for the mscomm.
Cool. Again, what DLL?
It is just a little com controler dll we are working on. We hit a snag with it though. When ever I try and call the functions it crashes the software or the Visual Basic 6.