❔ 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
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
and this is how it is now
what have you tried in terms of debugging?
I didn't understand
use the information in the exception to find the place in the code that is causing problems
I only deleted 3 lines of code and rebuilded it
that doesn't mean anything
there is no exception
this message is from an exception
this is how it is now
yes i know
so what do you mean there is no exception?
after my edit, there is no exception
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
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.
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.