dplot_start not hidden

Q&A for Visual Basic, Visual Basic .NET, and PowerBasic developers using DPlot
Post Reply
cdimaria
Posts: 5
Joined: Thu Aug 03, 2006 9:06 am

dplot_start not hidden

Post 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?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

This DLL will work as expected: http://www.dplot.com/lib/dplotlib.dll.
Visualize Your Data
support@dplot.com
cdimaria
Posts: 5
Joined: Thu Aug 03, 2006 9:06 am

Post 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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
cdimaria
Posts: 5
Joined: Thu Aug 03, 2006 9:06 am

Post 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.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
Post Reply