Page 1 of 1

dplot_start not hidden

Posted: Fri Aug 11, 2006 1:52 pm
by cdimaria
I have created a .NET 2005 application that uses DplotJr. As part of the installation I include all of the files necessary and write the registry value discribed in the Distribution section of the help. But here is the strange thing. After I install the software and distribution on to a PC and run my application the first time, Dplotjr does not start hidden. I am using Dplot_Start(1,wasactive) but it still displays the interactive window. Now if I stop the application and restart it everything is OK. Is there something that Dplotjr needs to do on the first start that causes it to not run hidden? Is there a way around this or am I stuck with it?

Posted: Fri Aug 11, 2006 6:17 pm
by DPlotAdmin
That's a very good catch, thanks. You can repeat the problem by deleting the file c:\Documents and Settings\<username>\Application Data\DPlot\DPlotJr.ini. You can (for now) correct the problem by creating that file (using Notepad or any text editor) and including these lines:

[Flags]
Maximized=1 (or 0, doesn't really matter)

... and then include that file in your setup.

I'll fix this for sure, it's a simple mistake.

If you want the long-winded explanation of what's going on... both DPlot and DPlotJr store a flag indicating whether the user had it maximized the last time it was exited and, if set, maximize it upon startup. The default state is yes, maximize it. And this overrides any other settings, including the hidden state requested by dplotlib.dll. If you use the DLL to start DPlot hidden, it checks that INI file to see if that flag is set and temporarily sets it to 0 if necessary. But it unfortunately doesn't do anything if that file isn't found, so DPlot/DPlotJr will always be maximized the first time. I just need to change one line in the DLL to make this work correctly.

Posted: Fri Aug 11, 2006 7:01 pm
by DPlotAdmin
This DLL will work as expected: http://www.dplot.com/lib/dplotlib.dll.

Posted: Mon Aug 14, 2006 8:06 am
by cdimaria
I downloaded the dll pointed to by the link but this didn't seem to work. Dplotjr still started maximized on the first invocation. I did try the .ini file thing and that worked just fine. I'll stick with that for now. Thanks for the help

Posted: Mon Aug 14, 2006 4:31 pm
by DPlotAdmin
Sorry for the trouble, but that DLL should have solved the problem. Are you sure you don't have two or more copies of dplotlib.dll lurking on your system? The latest should be dated 8/11.

Posted: Tue Aug 15, 2006 7:10 am
by cdimaria
I went back to double check and sure enough there was a version in the system32 directory. I deleted it an all other versions, then downloaded from the link you provided, recreated my install and re-installed the application. Again it did the same thing.

Posted: Tue Aug 15, 2006 8:55 am
by DPlotAdmin
Thanks, and sorry for all the trouble. At the moment I'm stumped, as it works as expected for me on several different computers. But I'll keep after it until I have a better answer than creating that INI file.