Program only works correctly in debug mode

Faram

Here is my previous question, if you want some further information regarding my current problem:

WinForm: Inherited Panel wont Autosize

If you don't want to read through it, I'll give you some general information:

  • I'm not working directly via the programme, I'm just editing a specific DLL, that is used by this programme
  • That means, that I don't have any access to the source code of this specific programme
  • That also means that I have to fix this problem via some changes in the DLL, that is - as I mentioned before - used by this programme.

What I found out so far:

  • It works without any problems, if I attach the programme to the DLL's source code in VS2015.
  • But it has some glitches if I build the code and then copy the DLL into the programme's folder - that's also my actual problem: it somehow shrinks the tableLayoutpanel to half its actual size and I get some weird glitches in the other half of its actual, in normal start somehow not used, size.

What I tried out:

  • I changed the size manually, not via "Dock = Fill" or "Autosize = true" and it worked. But that's, as you all may know, not the best solution and we only want to use it, if there is absolutely no other way around it. No one likes to hard-code.

  • I tried to inherit its Parent's Size via:

    this.tablelayoutPanel.Size = this.Size; and
    this.tableLayoutPanel.Size = new Size(this.Height, this.Size);

So do you guys have any ideas?

Faram

Okay, I did not figured out why the debuger worked and the release/debug build not. But I just forced a redraw on the tableLayoutPanelMainwith with Application.DoEvents(). I never tried this out before, because Invalidate() + Update() or Refresh() did not work - I was like: okay, that wont be that easy, so just forget about that.

But after some trial & error and a lot of time...well, I was working for two weeks on it...I tried the simpliest thing out and YEAHY, it worked!

Anyways, thank you for your help, guys. I appreciate that.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

C# Program Only Works in Debug Mode

From Dev

Update only works in debug mode

From Dev

Timer only works in debug mode

From Dev

SetListAdapter works only at debug mode

From Dev

SFML Only Works in Debug Mode

From Dev

Passwordless SSH works only in debug mode

From Dev

Code Parallel.For works only in Debug mode

From Dev

Javascript only works in Google Chrome in debug mode

From Dev

WebForms scripts only works in debug mode

From Dev

opacity fade only works in debug mode

From Dev

Java Socket connection only works in debug mode

From Dev

Program running in debug mode in C::B only

From Dev

Code works only in Visual Studio Debug but not in release mode nor .exe

From Dev

Windows service written in Python works only in debug mode

From Dev

Code works only in Visual Studio Debug but not in release mode nor .exe

From Dev

AsyncTask only works on debug?

From Dev

AsyncTask only works on debug?

From Dev

Determine if a program is running in debug mode

From Dev

Check if program runs in Debug mode

From Dev

Check if program runs in Debug mode

From Dev

Snackbar issue (only in debug mode)

From Dev

FFMPEG exception in debug mode only

From Dev

Checking arguments only in debug mode

From Dev

Notify in verbose or debug mode only

From Dev

Checking arguments only in debug mode

From Dev

Code crashes, but only in Debug mode

From Dev

Action class works in debug mode in selenium webdriver

From Dev

HttpUrlConnection works only in debugging mode

From Dev

Program crashes in debug mode: "unable to demangle"?