So here's a head scratcher. Recently I finished a program in VB that have several GroupBox to place my buttons in. And during testing in my PC everything worked out fine.
But when I want to test it on user PC, the program immediately pop up a "The program is not responding" message and stops process immediately without even showing the form. The user PC does not have Visual Basic 2010 installed.
After experimenting further I found out that the GroupBox were the cause, when I removed them the program can run in user PC fine.
So yeah... Till now I don't know why GroupBox doesn't want to play well like this. Is this a common problem in general?
P.S. I don't know if this is the right place to ask this. If not please let me know and I'll remove this question. Thanks.
Related
So, I have an MS Access front-end that I'm compiling to an ACCDE, which I want to distribute. When running it from an ACCDB file, everything works fine. I have a welcome form with links to a bunch of different forms. Some I call with DoCmd.OpenForm, with others I create an instance of the form with Set frm = New Form_Name, and then show it with frm.SetFocus and frm.Visible. While testing and developing a number of different things, opening forms hasn't been a problem for what feels like an eternity.
But then I compiled the ACCDE, and for some reason, opening forms has stopped working. While the welcome form miraculously works just fine, opening any other forms from that welcome form generates an error 3000 with a description which is something along the lines of "reserved error (-3034); there is no message for this error" (might not be 100% accurate since I'm translating from German). This is regardless of if I call it with DoCmd.OpenForm or create a new instance.
Here's the weird part: this only ever happens once for every form after compiling. That means, if I launch the form again after the error, even after closing the front-end entirely, then it works. I've checked over and over again and there are no variables being used, so there isn't the chance of some variable being uninitialized. Now, I could just execute every form on the ACCDE file after compiling it, but that seems like a ridiculous workaround. Plus, it doesn't make any sense, either, since I'm not storing any data in the front-end.
And oddly enough, this happens with all forms except the welcome form. The welcome form is launched by a macro, but I've ruled that out, since some of the forms that I launch from the welcome form used to be launched with macros, and I had the same problem there. The biggest difference between the welcome form and the other forms is that the welcome form is an unbound form.
Oddly enough, Google has not led me to any people with the same problem. Has anyone else ever had this problem or know what could be causing it? This isn't only happening on my computer, in fact, I was alerted to the problem after I had distributed an alpha version of the front-end. I'm using Access on office 365, version 1908, in case it makes a difference.
I'm writing a VB program where I want to be able to "push" an Exit button with a keyboard shortcut to close the program. I understand that if I put an & in the text of the button (E&xit), I can create a Alt-X shortcut to exit.
I've written programs where it's worked before; it's simple, but now it's not working. In fact, it's not even underlining the x in the text on the button. It's like a setting is telling it to be ignored. (I'm using the latest version of MS Visual Studio.)
I have found that if I turn on the form setting KeyPreview=True, it will work, but the x is still not underlined, so there is no visual indication of the shortcut being available. I feel like I'm missing some setting or switch that make this activate normally. Can someone explain or point me in the right direction? Thanks.
jmcilhinney, well, now it's working, both on new and existing apps, even with keypreview turned off. I think there was something strange going on with Visual Studio that day. Other parts of my program (with KeyPress handling) were not working correctly either at that time. Then suddenly everything started to behave as expected. Or maybe it was something I was doing with Keypress that messed up the Access Keys. I wish I could explain better, but now I can't reproduce the problem.
I used to program in VB6 professionally (up to about 6 years ago). Now I'm trying to write a personal program in Visual Studio 2017 Community. I'm having a problem:
I had the program finished but needed to embed an ICO file in the EXE and couldn't get it to work. Somewhere in the process, I screwed something up. None of my "code-behind" stuff is running. That is, form_load doesn't run, none of the code associated with the buttons runs when clicked upon, nothing. Double-clicking a button to see the code behind it actually brings up the Form1.Designer.vb window (which I'd not seen before).
It's as if all the code behind the form has been orphaned and the form and the code which had been associated with it have been separated. I'm sure I did something stupid while monkeying with settings to try to get the ICO file to embed but I have no clue what I did wrong.
Suggestions? Please. :-/
--HC
Okay, I have had the most aggravating problem with OpenFileDialog1. I have a program that I've been using for some 8 months, and in the past month, the program has begun to hang randomly when utilizing the OpenFileDialog1.ShowDialog() function. I have already read through all of the other posts about multi-threaded vs single threaded application. This did not fix it. Enabling the "Show Help" button did not fix it. I am mostly at a loss. here is a thorough walkthrough of the bug:
Run the application. I can always use the Open File button a few times with no problems. It freezes randomly after the program has been running for awhile.
The freeze happens after I push the ShowDialog button, and never displays the Open File Dialog window. The entire program locks up and hangs. If I pause it, Visual Studio doesn't show an error. It underlines the OpenFileDialog1.ShowDialog() in green, which is very odd.
I have found a way to break the freeze. Simply run a second instance of the program and use the OpenFileDialog function. As soon as it loads the file in the second instance, the first instance unfreezes. However, this is not a fix.
The only thing I can think of that may be causing this is the program also uses a WebBrowser1 control. It only seems to happen AFTER the WebBrowser control, which is on a seperate form, not the main form, has been initiated and utilized. Does this make any sense at all?
Thank you for anyone who can help me. I am about to tear my hair out.
Debug your program with dnspy, And when the software freezes, you will be able to see within the dnspy the actual code even if it is in a third party DLL.
I have solved this problem. It was quite unsolveable based on my description above, but hopefully I will help someone with this solution. The error is related to using the IE11 Emulation Control (11000) in the WebBrowser1 control. For some reason this interferes with OpenFileDialog and causes it to hang. I have no idea why. I changed my WebBrowser1 to use IE9 Emulation Control (9999) and the error has gone away. Thank you to those who looked into this. This is a registry entry in HKEY_CURRENT_USER.
I have written a VB application in VS2010. When I try to record its operation for a demo video with Windows Media Encoder x64 or Apowersoft free screen recorder, I get a recording of everything on the desktop except my application. It's like the application is invisible to the recorder. It has worked in the past (2 weeks ago). It must be something I have done but I'm baffled. Is there a "feature" in VB that can prevent you from recording the Form?
BTW, a still screen capture works fine and sub forms I bring up are captured. Only the main form is invisible to the recorder.
Thank you for your help and time.
Not a VS or VB problem after all. What I found was that windows 7 was switching me from Aero Theme to Windows 7 Basic. The message that showed up was that I was low on display memory. (A quick pop-up in the bottom right corner that I was ignored during the recording). However, I have 4.75 G of display memory?
BTW on a video conf call it produced the same invisibility "feature" until I found the Theme switch.
I haven't actually fixed anything but now know to watch for the tell tale screen blink as it switches mode. I pause the recording, and switch it back before restarting the recording. Got through the recordings I needed for now. I was using MS Media Encoder. I have now replaced it with Adobe Premier elements but haven't tried it yet to see if I still have the problem. Need to get the "how to" videos out the door first.
Thanks again. I have read many of your Answers to others in the past that have helped me solve numerous other VB and VS problems.
Michael
That's weird since it's recording forms from the application and not other forms (main form) from the same application.
Make sure you run the recorder as administrator and not the application.