Gammatech Posted July 14, 2009 Share Posted July 14, 2009 I have tried to use the System.MessageBox function but the command/Alert comes up with 'No memory to display message box' and the sequence stops. My sequence is of the form: StrResult = System.MessageBox("Do you want to change Location ID?","YesNo") If(StrResult == "Yes") // code to enter new ID EndIf I have declared StrResult as a Global String What am I doing wrong? Can System.EntryDialogue be used to get the new ID which is a string of around 40 characters or is there another way? I am running the evaluation version 5.82 build 1625 on a machine running Vista Business (ugh) as my licences are on other machines. The Vista Machine has 1Gb of memory installed with SP2 installed. Link to comment Share on other sites More sharing options...
AzeoTech Posted July 15, 2009 Share Posted July 15, 2009 That message comes right from windows. We call a function called AfxMessageBox() and according to MFC docs, this returns "Zero if there is not enough memory to display the message box". Now, our docs may not cover vista, but I can't imagine that since this is VC2008 docs. So, either you are out of memory (doubtful), out of resources (entirely possible) or vista is using 0 for a different problem. Are you calling this from a sequence running in its own thread, or from a click event on a component. It might not work from a sequence in its own thread under vista. As for resources, this is the hidden bane of windows (among many). You can have 100 gig of memory, but they only allocate so much room for windows handles, so you can only have so many windows open. I run into this all the time since I run so many apps at once, and most are development environments with lots of source windows open. On my system, all the sudden nothing will display, not even menus will appear until I close some of my apps. This happens even though I have several gig of free memory available. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.