I'm working on my first winform project and also my first C# project so i have no idea what i'm doing pretty much
One problem i have is calling a function from form1 on form2's FormClosing
I've looked it up and most posts are from 6-8 years old and i don't understand most of them but one thing i did understand is that i could make the function i'm trying to call static but i can't because then my OleDB connection is getting some problems
If anyone wants to take a look at the code i'll link it but 2 things, i'm writing this for a VS 2013 user and when i tried to run it using VS 2015 it just didn't work, and code is partially not written in english
If you still want to look at the code here it is
https://www.mediafire.com/?x7y5zqnr6pdmm8b
PS. specifically what I want to do is call the function dodajKorisnika() (from FormMain) when FormDodajKorisnika is closing
C# winform help
Re: C# winform help
Don't know if you'll get much help here, most of us use C++ here. Nonetheless, maybe someone does know the answer to your question.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: C# winform help
Yeah, i've tried looking through it, not too familiar with C# to begin with, but am getting a lot of trouble with exceptions with this function:
Sorry, I don't have VS2013 installed anymore, nor VS2010. It took awhile to even get the error reporting stuff installed to even be able to build it.
Code: Select all
private void UpdatePonudaParameters(ReportViewer rv, string[,] Parameters)
{
//https://social.msdn.microsoft.com/Forums/en-US/693694bc-bfbc-4786-98ee-a99826e78739/difficulty-setting-reportparameter?forum=vsreportcontrols
ReportParameter[] p = new ReportParameter[(Parameters.Length / 2)];
for (int i = 0; i < (Parameters.Length / 2); i++)
{
p[i] = new ReportParameter(Parameters[i, 0], Parameters[i, 1]);
}
rv.LocalReport.SetParameters(p); // <- this causes the exception saying the report is invalid
}
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com