Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with Common Dialog
Message
From
26/10/1997 12:53:17
Michael Urban
National Weather Service
Wichita, Kansas, United States
 
General information
Forum:
Visual C++
Category:
Troubleshooting
Miscellaneous
Thread ID:
00054814
Message ID:
00056737
Views:
29
After pruning down my code and trying to isolate the problem, I tracked it down to a focus problem, not the common dialog, as
previously thought. The common dialog just happened to be in use when the error occurred. I got rid of the common dialog, and everything else not essential to the program, and the error remains. I trimmed my code down to two forms. When Form2 gets focus, it is supposed to SetFocus to Form1, which is the main program form. In the VB environment, no problem, it works. When compiled, an endless loop occurs with Form1 setting focus to Form2 (though it is never told to do so in my code), which set focus back to Form1, which set focus to Form2, and so on. I cannot recreate it any other program, so there must be something I am missing, although I stripped out all unnecessary code. I called Microsoft, and sent them what I had. They said they'll get back to me, so it may be awhile.

I have installed SP2, and now I wish I hadn't. Its controls are not backward compatible with programs written before it, and generally seems to be a royal pain.

Mike

>I tried to reproduce your problem, but didn't have any luck... however, I did notice that the common dialog control was one of those that got replaced by VB5 Service Pack 2.... have you installed this update yet?
>Hope this does the trick.
>
>Stan B.
>
>>I am using VB5 Pro, and am getting an error that I cannot track down.
>>
>>I have a form which contains a text box, one command button, a menu and the common dialog control. In the
>>menu, I have an open option, which displays a message box (warning the user that the newly opened file will
>>cancel any changes made to the currently displayed text in the text box), followed by the Open common dialog
>>box. When running in the VB Environment, there is no problem. However, when compiled, I receive an error 5
>>after the dismissal of the msgbox, while the Open dialog box displays. There is NO intervening code between the
>>msgbox function and the .ShowOpen event. If I comment out the message box, the error goes away. This error is
>>not trappable, and the error message box is a generic one, not one which comes from my subroutine (which
>>contains error handling). As a test, I placed a message box before a .ShowSave event, and also received the same error. Has anyone else experienced this, or have any clue as to what is going on here?
>>
>>TIA,
>>
>>Michael Urban
>>Michael.Urban@noaa.gov
Previous
Reply
Map
View

Click here to load this message in the networking platform