C
C#2y ago
mebaX

❔ Forms Project doesn't work in my other pc.

I can run it on my main pc but in my second pc, it doesn't works.
16 Replies
mebaX
mebaXOP2y ago
Before all, when I run it on my second pc System.ArgumentException: Value of '0' is not valid for 'emSize'. 'emSize' should be greater than 0 and less than or equal to System.Single.MaxValue. (Parameter 'emSize') i got this error I deleted an unnecessary part of the code related to the font
mebaX
mebaXOP2y ago
mebaX
mebaXOP2y ago
and this is how it is now
Jimmacle
Jimmacle2y ago
what have you tried in terms of debugging?
mebaX
mebaXOP2y ago
I didn't understand
Jimmacle
Jimmacle2y ago
use the information in the exception to find the place in the code that is causing problems
mebaX
mebaXOP2y ago
I only deleted 3 lines of code and rebuilded it
Jimmacle
Jimmacle2y ago
that doesn't mean anything
mebaX
mebaXOP2y ago
there is no exception
Jimmacle
Jimmacle2y ago
this message is from an exception
mebaX
mebaXOP2y ago
this is how it is now yes i know
Jimmacle
Jimmacle2y ago
so what do you mean there is no exception?
mebaX
mebaXOP2y ago
after my edit, there is no exception
Jimmacle
Jimmacle2y ago
okay, well we can't help you if all we have to go on is a picture of a blank window i'm going to guess the "unnecessary" code was actually necessary
mebaX
mebaXOP2y ago
Button[] elements = {H,He,Li,Be,B,C,N,O,F,Ne,Na,Mg,Al,Si,P,Cl,Ar,K,Ca}; foreach (Button element in elements){ element.Height = 100000; element.Width = element.Height; //deleted part: Font myFont = new("Segoe UI", element.Height / 7); element.Font = myFont; } and it is works successfully on my main pc i deleted it because there isn't text in buttons. There is only images.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server