Archived

This topic is now archived and is closed to further replies.

Minion

Problem with labels in Visual Basic

Recommended Posts

I'm just learning Visual Basic 6.0. I was working through an tutorial "Stopwatch" application I found on the internet and my first attempt to run the completed application failed with an illegal operation and killed VB. I restarted and created the whole app again (I didn't save it before the original error), saved it, and ran it. Once again, it shutdown VB with an illegal operation. After this I did some testing and found it didn't shutdown with controls like command buttons, but always with text labels and input boxes. And it always gives me an illegal operation, and then when I click OK I get another illegal operation. I was just curious if anyone else has had these kinds of problems. In case it matters, here are the details from both illegal operations: 1st:
    
VB6 caused an invalid page fault in
module VB6.EXE at 0167:004581f1.
Registers:
EAX=00000000 CS=0167 EIP=004581f1 EFLGS=00010246
EBX=01756854 SS=016f ESP=007ff738 EBP=007ff790
ECX=007ff748 DS=016f ESI=00400000 FS=59d7
EDX=00000000 ES=016f EDI=00000001 GS=0000
Bytes at CS:EIP:
8b 08 ff 51 08 83 a3 9c 00 00 00 00 e9 28 fd ff 
Stack dump:
00000000 017476b4 01756854 01756a0c 004032f0 84654416 f900009c 00000044 00000000 00000000 00004190 00403320 00000001 017476b4 00000000 00000001
  

2nd:
      
VB6 caused an invalid page fault in
module SSSCC.DLL at 0167:60567702.
Registers:
EAX=00000000 CS=0167 EIP=60567702 EFLGS=00010246
EBX=60480000 SS=016f ESP=03d6fbe4 EBP=03d6fc14
ECX=00000000 DS=016f ESI=03860620 FS=6bc7
EDX=8178d224 ES=016f EDI=00000001 GS=649e
Bytes at CS:EIP:
8b 71 04 85 f6 57 74 23 8b 7c 24 0c 33 d2 8b c7 
Stack dump:
03860620 6056b2c9 00000db4 60480000 00000001 03860620 6056b12b 03860620 03860620 03d6fc24 6058d804 00000000 03d6fc30 6057bcd9 03860620 03860620
    
Thanks in advance, Mark Edit: It might be also worth noting that when I try to cut, copy, or delete a label or input box, I get an error as well. I also get an illegal operation when I try to bring up a form from a saved project with one of these controls on it. [edited by - minion on October 19, 2002 6:02:34 PM]

Share this post


Link to post
Share on other sites
I'll post the code, but VB doesn't just crash with that project. It crashes anytime I use a label or input box.

Here's the code:

    
Option Explicit
Dim StartTime As Variant
Dim EndTime As Variant
Dim ElapsedTime As Variant

Private Sub cmdEnd_Click()
'Find the ending time, compute the elapsed time
'Put bothe values in label boxes
EndTime = Now
ElapsedTime = EndTime - StartTime
lblEnd.Caption = Format(EndTime, "hh:mm:ss")
lblElapsed.Caption = Format(ElapsedTime, "hh:mm:ss")
End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdStart_Click()
'Establish and print starting time
StartTime = Now
lblStart.Caption = Format(StartTime, "hh:mm:ss")
lblEnd.Caption = ""
lblElapsed.Caption = "
"
End Sub


Also, here is a list of the controls that cause the problem:
PictureBox, Label, TextBox, CheckBox, ComboBox, ListBox, and Image

Thanks,
Mark Ulrich

[edited by - Minion on October 19, 2002 6:23:29 PM]

Share this post


Link to post
Share on other sites
I''ve tried to reinstall VB and Visual Studio completely with no success. I did notice when I restarted my machine after a reinsallation I got a notice concerning MSSTDFMT.DLL but it''s on my system in the windows\system directory. Might a service pack help me out with this?

Share this post


Link to post
Share on other sites