Topic: Start-up size revisited (1 of 38), Read 39 times
Conf: VEDIT Suggestions
From: John H
Date: Wednesday, November 09, 2005 03:57 PM

Hi,

I first brought this up in the "Invoking from Opera" thread but I
would like to still see an absolute way to start vedit from other
applications with it's (application) window maximized.

I have resorted to using other external editors for some
applications because I got tired of having to maximize vedit each
time.

Fortunately my most used application, Total Commander requires
nothing more than VPW.EXE and all works fine.

..I guess it's because of differences in how the applications spawn
Vedit. But I really don't care why since I just want vedit to ALWAYS
honor the AppMax=1 setting I use.

--
John
VEDIT SN: 95651
VEDIT (DOS) Ver. 6.13.1 01/25/05
VEDIT (32-Bit) Ver. 6.13.1 01/25/05
VEDIT Pro (64-Bit) Ver. 6.13.1 01/25/05
Windows 2000 (5.0.2195 Service Pack 4)

 


Topic: Re: Start-up size revisited (2 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Wednesday, November 09, 2005 04:57 PM

On Wed, 09 Nov 2005 15:57:00 -0500, John H wrote:

>I first brought this up in the "Invoking from Opera" thread but I

Just for easier access: You are referring to
http://webboard.vedit.com/read?19167,32
in the "Startup, File Open, Exit" conference.

>would like to still see an absolute way to start vedit from other
>applications with it's (application) window maximized.

In contrary to my older message in that thread I now was successful to
let Opera use a shortcut to start the external editor.

But even if that shortcut has "maximized" set and functions properly
used from Explorer, Total Commander or DOS-Box (means: starts VEDIT
maximized): If called from Opera it's no longer maximized...

I suspect Opera being the problem here.
But not knowing how that maximize flag works in Windows and works in
Vedit I can't help any more.


Christian

 


Topic: Start-up size revisited (3 of 38), Read 24 times
Conf: VEDIT Suggestions
From: John H
Date: Wednesday, November 09, 2005 05:16 PM

On Wed, 9 Nov 2005 16:58:23 -0500 GMT, Christian Ziemski wrote:

>>would like to still see an absolute way to start vedit from other
>>applications with it's (application) window maximized.

> But even if that shortcut has "maximized" set and functions properly
> used from Explorer, Total Commander or DOS-Box (means: starts VEDIT
> maximized): If called from Opera it's no longer maximized...

Weird. I tried the PIF/LNK file approach but was unsuccessful with
Opera. Most I have no problem with just pointing to VPW.EXE..

> I suspect Opera being the problem here.
> But not knowing how that maximize flag works in Windows and works in
> Vedit I can't help any more.

I also have this happen with WinSCP and a couple other applications.
I'm going to test ShellExecute() different ways to see if I can
recreate the situation with one of my own programs.

With any luck I'll patch Opera and the other applications if I have
to. I'd rather see Vedit somehow 'break free' of the influence of
calling applications automatically.

--
John

 


Topic: Re: Start-up size revisited (4 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Wednesday, November 09, 2005 09:41 PM

At 05:16 PM 11/9/2005, you wrote:
>>>would like to still see an absolute way to start vedit from other
>>>applications with it's (application) window maximized.
>
>> But even if that shortcut has "maximized" set and functions properly
>> used from Explorer, Total Commander or DOS-Box (means: starts VEDIT
>> maximized): If called from Opera it's no longer maximized...

As mentioned before, I cannot easily replicate this. For example,
from VEDIT Command mode, the following command always starts maximized:

System("c:\vedit\vpw.exe",MAX)

From Win 2000/XP command prompt, the following command always starts
VEDIT maximized:

start /max c:\vedit\vpw.exe

Therefore, I would suggest placing the above command into a batch
file, e.g. veditmax.bat, and invoking this batch file from any
program has otherwise cannot start VEDIT maximized.

Ted.

 


Topic: Start-up size revisited (5 of 38), Read 23 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 12:11 AM

On Wed, 9 Nov 2005 21:42:14 -0500 GMT, Ted Green wrote:

> As mentioned before, I cannot easily replicate this. For example,
> from VEDIT Command mode, the following command always starts maximized:

> System("c:\vedit\vpw.exe",MAX)

Heh heh. Cute. I have just for the first time loaded Vedit in order
to load another copy of itself. ;-)

--
John

 


Topic: Start-up size revisited (6 of 38), Read 27 times
Conf: VEDIT Suggestions
From: Ian Binnie
Date: Thursday, November 10, 2005 12:44 AM

On 11/9/2005 5:16:17 PM, John H wrote:
>On Wed, 9 Nov 2005 16:58:23 -0500 GMT,
>Christian Ziemski wrote:
>
>>>would like to still see an absolute way to start vedit from other
>>>applications with it's (application) window maximized.

The simplest way to do this is set {CONFIG, Misc, Instance control} to "1".
If you start Vedit, then maximise it, VEDIT attempts to open all files in one instance of VEDIT.

I do this all the time. Vedit is always running on my computer, and files are opened in this instance.
I rarely close Vedit.
(In those odd occasions when I want separate instances, I use a different invocation option - see the help file.)

>> But even if that shortcut has "maximized" set and functions properly
>> used from Explorer, Total Commander or DOS-Box (means: starts VEDIT
>> maximized): If called from Opera it's no longer maximized...


You have never told us how you have configured Opera to start Vedit.
Christian suggested:-
start /max c:\vedit\vpw.exe

I would like to see your exact startup string (complete with any quotes.

It is possible that Opera tries to be smart, and bypass the START prompt.
"/max" is a command prompt parameter.

If you really want to explore further, it is necessary to see exactly what command line started an application.

One way of doing this is ProcessExplorer (free) from:-
http://www.sysinternals.com/Utilities/ProcessExplorer.html


This doesn't even require installation.

Run ProcessExplorer, then edit from Opera see what starts, click on Properties to see the Command Line

 


Topic: Start-up size revisited (8 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, November 10, 2005 03:57 AM

On 11/10/2005 12:44:43 AM, Ian Binnie wrote:
>
>You have never told us how you have configured Opera to start Vedit.
>Christian suggested:-
>start /max c:\vedit\vpw.exe
>
>I would like to see your exact startup string (complete with any quotes.

One problem is that Opera only allows a real file in that configuration option. An .exe, a shortcut or a batch file etc.

So the direct approach with "start /max ..." doesn't work and one has to use an intermediate batch file for this.


>It is possible that Opera tries to be
>smart, and bypass the START prompt.
>"/max" is a command prompt parameter.

Yes, Opera seems to be (too) smart. Even if using a shortcut (.lnk) in Opera to open Vedit, the command prompt shown in Process Explorer always is
"C:\vedit\vpw.exe" "C:\tmp\testfile.txt"


Christian

 


Topic: Start-up size revisited (9 of 38), Read 24 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 08:19 AM

On Thu, 10 Nov 2005 00:45:05 -0500 GMT, Ian Binnie wrote:

> The simplest way to do this is set {CONFIG, Misc, Instance
> control} to "1". If you start Vedit, then maximise it, VEDIT
> attempts to open all files in one instance of VEDIT.

> I do this all the time. Vedit is always running on my computer,
> and files are opened in this instance. I rarely close Vedit. (In
> those odd occasions when I want separate instances, I use a
> different invocation option - see the help file.)

I use instance control 1 as my default, however there a couple
reasons I don't leave vedit always loaded:

- taskbar real estate : I'd rather it minimize and close to the
system tray with my other 'always on' applications

- memory consumption, vedit and me : I can see myself figuring out
that the reason my system is dragging was because I forgot to close
a bunch of edit buffers. I tend to use vedit a great deal however
unlike you I load/close it hundreds of times during the day. It's so
fast it seems pretty much loaded all the time anyhow.

>>> But even if that shortcut has "maximized" set and functions properly
>>> used from Explorer, Total Commander or DOS-Box (means: starts VEDIT
>>> maximized): If called from Opera it's no longer maximized...

> You have never told us how you have configured Opera to start Vedit.
> Christian suggested:-
> start /max c:\vedit\vpw.exe

You commenting to Christian here.. As for how I start vedit,
typically VPW.EXE suffices. Other times I need to pass the file name
like VPW.EXE %s -- a 'VPW.EXE -maxinspiteofeverything' option is
what I'm interested in but perhaps that is not possible.

> I would like to see your exact startup string (complete with any quotes.

> It is possible that Opera tries to be smart, and bypass the START prompt.
> "/max" is a command prompt parameter.

...but /max is not a vedit parameter thus useless for pre W2K users.

> Run ProcessExplorer, then edit from Opera see what starts, click
> on Properties to see the Command Line

"D:\VEDIT\VPW.EXE" "D:\Opera\profile\cache4\opr079LW.html"

..looks simple enough. For comparison, editing from total commander:

D:\COMMON\VEDIT\VPW.EXE D:\TEMP\README.TXT


NOTE: any application which I spawn vpw.exe from that doesn't
result in a maximized instance of vedit, is causing vedit to forget
it's prior settings and save the new 'normal window' setting. Thus:

1. source view from opera (opera using "d:\vedit\vpw.exe")
2. results in 'normal' un-maximized vedit window
3. close vedit without maximizing it
4. reopen vedit from command line, non-opera, etc
5. vedit is 'normal' not maximized

..on the other hand, if at step 2.5 I maximize vedit then it again
is maximized on start up for step 4.

Frankly I don't what where/how vedit stores it's last size or how to
control it. Config(U_AUTO_CFG,0) doesn't seem to have any thing to
do with it. Different issue though I guess..

--
John

 


Topic: Start-up size revisited (12 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, November 10, 2005 10:51 AM

On 11/10/2005 8:19:46 AM, John H wrote:

>Frankly I don't what where/how vedit stores it's last size or how to control it. Config(U_AUTO_CFG,0) doesn't
>seem to have any thing to do with it.

It's stored in VEDIT.INI

 


Topic: Re: Start-up size revisited (13 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, November 10, 2005 11:12 AM

At 10:52 AM 11/10/2005, you wrote:
>>Frankly I don't what where/how vedit stores it's last size or how to control it. Config(U_AUTO_CFG,0) doesn't
>>seem to have any thing to do with it.
>
>It's stored in VEDIT.INI

John:

I'm beginning to wonder if your vedit.ini is being run at all when you invoke from Opera. If not, that would explain why it won't maximize.

Try this:

1. Backup your vedit.ini file.

2. Edit your vedit.ini and change:

UserMacroDir=c:\vedit\user-mac

To something nonsense like:

UserMacroDir=x:\nowhere

3. Invoke VEDIT from Opera.

3. In VEDIT command mode give the command "cfs" to display the string.
Check if USER_MACRO is set to "x:\nowhere", if not, you vedit.ini
probably was not loaded.

4. Restore your vedit.ini from your backup.

Also, for testing, you can invoke VEDIT without the vedit.ini with
this invocation command:

vpw -k

If that gives you the same size window as invoking VEDIT from Opera,
than it is a good indication that vedit.ini did not load.

Ted.

 


Topic: Start-up size revisited (17 of 38), Read 25 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 07:53 PM

On Thu, 10 Nov 2005 11:13:32 -0500 GMT, Ted Green wrote:

Hi Ted!

> I'm beginning to wonder if your vedit.ini is being run at all when
> you invoke from Opera. If not, that would explain why it won't
> maximize.

> Try this: ..[snip]

It's being read okay, I get an expected error when vedit tries to
load one of my auto-start macros.

> 3. In VEDIT command mode give the command "cfs" to display the string.

The new, invalid path to user-mac shows.

--
John

 


Topic: Re: Start-up size revisited (19 of 38), Read 26 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, November 10, 2005 09:04 PM

At 07:54 PM 11/10/2005, you wrote:
>It's being read okay, I get an expected error when vedit tries to
>load one of my auto-start macros.
>
>> 3. In VEDIT command mode give the command "cfs" to display the string.
>
>The new, invalid path to user-mac shows.

OK. Thanks. So much for that hypothesis.

Please the .bat file with the Ved_Zoom() command as in my last posting.

Ted.

 


Topic: Start-up size revisited (11 of 38), Read 22 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 08:32 AM


Just wanted to add that ProcessExplorer shows:

"D:\VEDIT\vpw.exe" D:\Temp\scp28159\home.php

when I use vedit from WinSCP, also causes vedit to start 'normal'
and not maximized, etc.. Same as Opera.

--
John

 


Topic: Re: Start-up size revisited (14 of 38), Read 22 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, November 10, 2005 01:06 PM

On Thu, 10 Nov 2005 08:32:00 -0500, John H wrote:

>when I use vedit from WinSCP, also causes vedit to start 'normal'
>and not maximized, etc.. Same as Opera.

John:

I can confirm that.


Maybe it's possible to find out details of the problematic call by
looking at WinSCP's sourcecode. It's written in Borland C++ Builder
version 6 (from readme file).

But who is able to read and understand C++? At least not me.


Christian

 


Topic: Re: Start-up size revisited (15 of 38), Read 22 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, November 10, 2005 02:57 PM


>Maybe it's possible to find out details of the problematic call by
>looking at WinSCP's sourcecode. It's written in Borland C++ Builder
>version 6 (from readme file).

The call of the external editor is in the file
winscp376source\forms\CustomScpExplorer.cpp
and the then used ExecuteShell is in the file
winscp376source\windows\GUITools.cpp

But now someone else has to have a closer look...

Christian

 


Topic: Re: Start-up size revisited (16 of 38), Read 22 times
Conf: VEDIT Suggestions
From: Ian Binnie
Date: Thursday, November 10, 2005 05:43 PM

On 11/10/2005 2:57:32 PM, Christian Ziemski wrote:
>
>>Maybe it's possible to find out details of the problematic call by
>>looking at WinSCP's sourcecode. It's written in Borland C++ Builder
>>version 6 (from readme file).
>
>The call of the external
>editor is in the file
>winscp376source\forms\CustomSc
>pExplorer.cpp
>and the then used ExecuteShell
>is in the file
>winscp376source\windows\GUIToo
>ls.cpp
>
>But now someone else has to
>have a closer look...
>
>Christian
>
Unfortunately you need more than some knowledge of C++.
The function is not in Microsoft SDK, so it is probably a Borland proprietary function.

It is possible that the issue is related to the problem Ted mentioned with Drag & Drop, which ignores contents of the shortcut.

There are a couple of possible "fixes" (not that this is an issue to me).

1. Vedit to include a "Maximise" option.
2. Implement a file open macro to maximise the window (not sure if this is possible).

 


Topic: Re: Start-up size revisited (18 of 38), Read 22 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, November 10, 2005 08:58 PM

At 05:44 PM 11/10/2005, you wrote:
>It is possible that the issue is related to the problem Ted mentioned with Drag & Drop, which ignores contents of the shortcut.
>
>There are a couple of possible "fixes" (not that this is an issue to me).
>
>1. Vedit to include a "Maximise" option.
>2. Implement a file open macro to maximise the window (not sure if this is possible).

I cannot find any documentation for it (Sorry!), but when this issue was last discussed, we implemented a new command Ved_Zoom() which maximizes VEDIT:

Ved_Zoom(1) Maximize VEDIT
Ved_Zoom(0) Restore VEDIT's size

------

Therefore, you could create a batch file containing:

c:\vedit\vpw.exe +c"Ved_Zoom(1)" %1 %2 %3 %4 %5 %6 %7 %8 %9

Shelling out to this batch file with a filename will open VEDIT in maximized mode.

-------

I am still curious if someone can determine if the vedit.ini file is loaded.

Ted.

 


Topic: Start-up size revisited (20 of 38), Read 22 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 09:18 PM

On Thu, 10 Nov 2005 20:59:30 -0500 GMT, Ted Green wrote:

> I cannot find any documentation for it (Sorry!), but when this
> issue was last discussed, we implemented a new command Ved_Zoom()
> which maximizes VEDIT:

> Ved_Zoom(1) Maximize VEDIT
> Ved_Zoom(0) Restore VEDIT's size

This looks interesting, will there be a beta available to test this?

--
John

 


Topic: Re: Start-up size revisited (21 of 38), Read 23 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, November 10, 2005 11:12 PM

At 09:19 PM 11/10/2005, you wrote:
>On Thu, 10 Nov 2005 20:59:30 -0500 GMT, Ted Green wrote:
>
>> I cannot find any documentation for it (Sorry!), but when this
>> issue was last discussed, we implemented a new command Ved_Zoom()
>> which maximizes VEDIT:
>
>> Ved_Zoom(1) Maximize VEDIT
>> Ved_Zoom(0) Restore VEDIT's size
>
>This looks interesting, will there be a beta available to test this?

Oops. I thought it was in 6.13, but it is not. No wonder it wasn't documented.
I am trying hard to get 6.15 into beta within a few days.

Ted

 


Topic: Re: Start-up size revisited (28 of 38), Read 21 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Saturday, November 12, 2005 02:32 PM

On Thu, 10 Nov 2005 23:12:00 -0500, Ted Green wrote:

>>On Thu, 10 Nov 2005 20:59:30 -0500 GMT, Ted Green wrote:
>>
>>> I cannot find any documentation for it (Sorry!), but when this
>>> issue was last discussed, we implemented a new command Ved_Zoom()
>>> which maximizes VEDIT:
>>
>>> Ved_Zoom(1) Maximize VEDIT
>>> Ved_Zoom(0) Restore VEDIT's size
>>
>
>Oops. I thought it was in 6.13, but it is not.
>No wonder it wasn't documented.


According to the already existing

Win_Zoom( ) Zoom the current window to full screen.
Win_Zoom(CLEAR) De-zoom the window.
Win_Zoom(TOGGLE) Zoom/de-zoom toggle. Same as {VIEW, Zoom}.

Is_Zoomed Return TRUE if the editing windows within
VEDIT are zoomed (maximized).


I would suggest

App_Zoom( ) Zoom the Vedit application to full screen.
App_Zoom(CLEAR) De-zoom it.
App_Zoom(TOGGLE) Zoom/de-zoom toggle.

Is_Zoomed_App Return TRUE if Vedit is maximized


And additionally something like

Zoom_By_Ini Return TRUE if AppMax=1 in Vedit.ini


This way a macro has all possibilities.


For example we can solve the startup problem with [u]startup.vdm:

if (Zoom_By_Ini) { App_Zoom }


Just some ideas...

Christian

 


Topic: Re: Start-up size revisited (38 of 38), Read 17 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, March 23, 2006 12:57 PM

At 02:34 PM 11/12/2005, you wrote:
>I would suggest
>
> App_Zoom( ) Zoom the Vedit application to full screen.
> App_Zoom(CLEAR) De-zoom it.
> App_Zoom(TOGGLE) Zoom/de-zoom toggle.
>
> Is_Zoomed_App Return TRUE if Vedit is maximized
>
>And additionally something like
>
> Zoom_By_Ini Return TRUE if AppMax=1 in Vedit.ini

Just to close this thread, these were all implemented in 6.15, but with different names:

App_Max or Vedit_Zoom
App_Max(CLEAR)
App_Max(TOGGLE)
Is_App_Max
Is_App_Max_By_Ini

(Note: 6.15.1 "final beta" dated 03/22/2006 does not have Is_App_Max_By_Ini implemented, but the code was fixed today 03/23/06.)

Ted.

 


Topic: Re: Start-up size revisited (22 of 38), Read 23 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Friday, November 11, 2005 02:39 AM

On 11/10/2005 5:43:32 PM, Ian Binnie wrote:
>On 11/10/2005 2:57:32 PM, Christian Ziemski wrote:
>>
>>>Maybe it's possible to find out details of the problematic call by
>>>looking at WinSCP's sourcecode. It's written in Borland C++ Builder
>>>version 6 (from readme file).
>>
>>The call of the external >editor is in the file
>>winscp376source\forms\CustomScpExplorer.cpp
>>and the then used ExecuteShell is in the file
>>winscp376source\windows\GUITools.cpp
>>
>>
>Unfortunately you need more than some knowledge of C++.
>The function is not in Microsoft SDK, so it is probably a Borland proprietary function.

As far as I can see the following are the relevant parts:


if (ExecuteFileBy == efInternalEditor)
{
// .......
}
else
{
HANDLE Process;

if (ExecuteFileBy == efExternalEditor)
{
AnsiString Program, Params, Dir;
Data.Command = ExternalEditor->Data.ExternalEditor;
TWinConfiguration::ReformatFileNameCommand(Data.Command);
SplitCommand(Data.Command, Program, Params, Dir);
assert(Params.Pos(ShellCommandFileNamePattern) > 0);
Params = StringReplace(Params, ShellCommandFileNamePattern,
AddPathQuotes(FileName), TReplaceFlags() << rfReplaceAll);
if (!ExecuteShell(Program, Params, Process))
{
throw Exception(FMTLOAD(EDITOR_ERROR, (Program)));
}
}
else
{
assert(Side == osRemote);
if (!ExecuteShell(FileName, "", Process))
{
throw Exception(FMTLOAD(EXECUTE_FILE_ERROR, (FileName)));
}
}



//---------------------------------------------------------------------------
bool __fastcall ExecuteShell(const AnsiString Path, const AnsiString Params)
{
return ((int)ShellExecute(NULL, "open", (char*)Path.data(),
(char*)Params.data(), NULL, SW_SHOWNORMAL) > 32);
}

//---------------------------------------------------------------------------
bool __fastcall ExecuteShell(const AnsiString Path, const AnsiString Params,
HANDLE & Handle)
{
bool Result;

TShellExecuteInfo ExecuteInfo;
memset(&ExecuteInfo, 0, sizeof(ExecuteInfo));
ExecuteInfo.cbSize = sizeof(ExecuteInfo);
ExecuteInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ExecuteInfo.hwnd = Application->Handle;
ExecuteInfo.lpFile = (char*)Path.data();
ExecuteInfo.lpParameters = (char*)Params.data();
ExecuteInfo.nShow = SW_SHOW;

Result = (ShellExecuteEx(&ExecuteInfo) != 0);
if (Result)
{
Handle = ExecuteInfo.hProcess;
}
return Result;
}
//---------------------------------------------------------------------------


And ShellExecute() is a Windows call, isn't it?
(I'm not a programmer at this level!!)

Christian

 


Topic: Start-up size revisited (23 of 38), Read 21 times
Conf: VEDIT Suggestions
From: John H
Date: Friday, November 11, 2005 08:49 AM

On Fri, 11 Nov 2005 02:39:44 -0500 GMT, Christian Ziemski wrote:

> And ShellExecute() is a Windows call, isn't it?
> (I'm not a programmer at this level!!)

Yes it is. I use it quite a bit for one of my applications. I pass
it command lines such as "http://some.com" and let the association
pick up the default application to open with, or specific program +
arguments command lines like "d:\vedit\vpw.exe " and have
not run into the sort of problem I see with Opera/WinSCP+VPW.EXE
before.

--
John

 


Topic: Re: Start-up size revisited (24 of 38), Read 18 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Friday, November 11, 2005 02:09 PM


To test the strange behavior when calling VEDIT from Opera or WinSCP I
wrote a little program (in Delphi, but using the Windows API call).


The call
ShellExecute(Form1.Handle, nil, 'd:\vedit\vpw.exe',
nil, nil, SW_SHOW);

that is used in WinSCP too, indeed opens VEDIT always NOT maximized.



These two other calls are working as expected:

ShellExecute(Form1.Handle, nil, 'd:\vedit\vpw.exe',
nil, nil, SW_SHOWNORMAL);

ShellExecute(Form1.Handle, nil, 'd:\vedit\vpw.exe',
nil, nil, SW_SHOWDEFAULT);

VEDIT is opened exactly in that state it was closed (regarding
maximization or not, read from the VEDIT.INI).



These are the original Microsoft descriptions for the options:

SW_SHOW Activates the window and displays it in its current
size and position.

SW_SHOWNORMAL Activates and displays a window. If the window is
minimized or maximized, Windows restores it to its original size and
position. An application should specify this flag when displaying the
window for the first time.

SW_SHOWDEFAULT Sets the show state based on the SW_ flag specified
in the STARTUPINFO structure passed to the CreateProcess function by
the program that started the application. An application should call
ShowWindow with this flag to set the initial show state of its main
window.


I have no more clue why VEDIT doesn't maximize itself when called via
SW_SHOW ...



Christian

 


Topic: Re: Start-up size revisited (25 of 38), Read 19 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Saturday, November 12, 2005 09:29 AM


I tested FileZilla which is another remote filemanager (FTP, SFTP...)
and also can call a local editor.

FileZilla opens VEDIT in the maximized/not_maximized state that is
stored in vedit.ini. As it should be.

It uses the option SW_SHOWNORMAL for ShellExecute:

CString file=m_Fullpath+m_FileData[index].Name;
SHELLEXECUTEINFO sei = {0};
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.lpFile = file;
sei.nShow = SW_SHOWNORMAL;
BOOL b = ShellExecuteEx(&sei);


So it seems that

- SW_SHOW (as in WinSCP) is not the appropriate way
or
- VEDIT doesn't react correctly when called with SW_SHOW?


That might be a riddle to solve after 6.15 is out ...


Christian

 


Topic: Start-up size revisited (26 of 38), Read 19 times
Conf: VEDIT Suggestions
From: John H
Date: Saturday, November 12, 2005 10:48 AM


SW_SHOWNORMAL : .. An application should specify this flag when
***displaying the window for the first time***.

Pretty much indicates the proper nShowCmd for first run is
SW_SHOWNORMAL.

--
John

 


Topic: Re: Start-up size revisited (27 of 38), Read 19 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Saturday, November 12, 2005 12:01 PM

On Sat, 12 Nov 2005 10:48:00 -0500, John H wrote:

>SW_SHOWNORMAL : .. An application should specify this flag when
>***displaying the window for the first time***.
>
>Pretty much indicates the proper nShowCmd for first run is
>SW_SHOWNORMAL.

Yes, but i'm not sure how easy it would be to convince the programmers
of Opera, WinSCP etc. etc. to change their code.

And on the other hand there are people like Ian having only one
instance of Vedit open. For those calls the SW_SHOW seems to be o.k.

So perhaps it's possible to change Vedit to always honor the
maximize-setting in vedit.ini, regardless of the SW_SHOW flag.

Christian

 


Topic: Start-up size revisited (29 of 38), Read 19 times
Conf: VEDIT Suggestions
From: John H
Date: Saturday, November 12, 2005 04:27 PM

On Sat, 12 Nov 2005 12:02:50 -0500 GMT, Christian Ziemski wrote:

> On Sat, 12 Nov 2005 10:48:00 -0500, John H wrote:

>>SW_SHOWNORMAL : .. An application should specify this flag when
>>***displaying the window for the first time***.
>>
>>Pretty much indicates the proper nShowCmd for first run is
>>SW_SHOWNORMAL.

> Yes, but i'm not sure how easy it would be to convince the programmers
> of Opera, WinSCP etc. etc. to change their code.

I originally had something about that fact in my draft message. :-)
However it may be the new commands Ted mentioned will take care of
this so I decided to hang tight.

> And on the other hand there are people like Ian having only one
> instance of Vedit open. For those calls the SW_SHOW seems to be o.k.

Yes, I imagine all the other nShowCmd flags are for manipulating an
already created window, which Ian will have if Vedit is always
loaded.

--
John

 


Topic: Re: Start-up size revisited (30 of 38), Read 19 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Sunday, November 13, 2005 11:19 AM

At 12:02 PM 11/12/2005, you wrote:

>So perhaps it's possible to change Vedit to always honor the
>maximize-setting in vedit.ini, regardless of the SW_SHOW flag.

I think you figured it out as here is the VEDIT startup code:

AppMax = GetPrivateProfileInt( VED_NAME, "AppMax", 0, lpVEDITINI );
if (AppMax && ((nCmdShow == SW_SHOWNORMAL) || (nCmdShow == SW_SHOWDEFAULT)))
nCmdShow = SW_SHOWMAXIMIZED;
nShow = (QUIETF & 1) ? SW_SHOWMINIMIZED : nCmdShow;
ShowWindow( hwndFrame, nShow );
UpdateWindow( hwndFrame ); // Note: causes SIGNON message to be shown

VEDIT is only maximized if "AppMax" is set in the vedit.ini file, AND
the instance was invoked with SW_SHOWNORMAL or SW_SHOWDEFAULT,
OR if the instance was invoked with SW_SHOWMAXIMIZED.

I have added SW_SHOW to the 2nd code line above.

Ted.

 


Topic: Start-up size revisited (31 of 38), Read 20 times
Conf: VEDIT Suggestions
From: John H
Date: Sunday, November 13, 2005 01:50 PM

On Sun, 13 Nov 2005 11:20:22 -0500 GMT, Ted Green wrote:

> VEDIT is only maximized if "AppMax" is set in the vedit.ini file, AND
> the instance was invoked with SW_SHOWNORMAL or SW_SHOWDEFAULT,
> OR if the instance was invoked with SW_SHOWMAXIMIZED.

> I have added SW_SHOW to the 2nd code line above.

Excellent! Thanks you Ted, I expect that will put this issue to rest
finally.

..and thanks Christian for digging into it!

Once I put Vedit back in place for Opera and a few other
applications as the editor this will save me no less than 30 minutes
a day.

--
John

 


Topic: Re: Start-up size revisited (32 of 38), Read 21 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Monday, November 14, 2005 06:44 PM

At 01:51 PM 11/13/2005, you wrote:
>Excellent! Thanks you Ted, I expect that will put this issue to rest
>finally.

I have placed a preliminary 6.15 vpw.exe (just the executable) at:

www.vedit.com/download/beta/vpw.exe

Please test it to see if it works from Opera, as it has the new SW_SHOW code.

Ted.

 


Topic: Start-up size revisited (33 of 38), Read 22 times
Conf: VEDIT Suggestions
From: John H
Date: Monday, November 14, 2005 07:28 PM

On Mon, 14 Nov 2005 18:46:08 -0500 GMT, Ted Green wrote:

>>Excellent! Thanks you Ted, I expect that will put this issue to rest
>>finally.

> I have placed a preliminary 6.15 vpw.exe (just the executable) at:
> www.vedit.com/download/beta/vpw.exe Please test it to see if it
> works from Opera, as it has the new SW_SHOW code.

Works great!

--
John

 


Topic: Re: Start-up size revisited (34 of 38), Read 24 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Monday, November 14, 2005 08:32 PM

At 07:29 PM 11/14/2005, you wrote:
>> I have placed a preliminary 6.15 vpw.exe (just the executable) at:
>> www.vedit.com/download/beta/vpw.exe Please test it to see if it
>> works from Opera, as it has the new SW_SHOW code.
>
>Works great!

Great. Then one long-time mystery is solved.
Thank you Christian for making the "key" discovery.

Ted.

 


Topic: Start-up size revisited (7 of 38), Read 22 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, November 10, 2005 03:47 AM

On 11/9/2005 5:16:17 PM, John H wrote:
>
>Weird. I tried the PIF/LNK file approach but was unsuccessful with Opera.

You have to type in the path of the link in Operas input field manually. The button "choose" doesn't work for links.

e.g: c:\xxx\vpw_max.lnk

Christian

 


Topic: Start-up size revisited (10 of 38), Read 22 times
Conf: VEDIT Suggestions
From: John H
Date: Thursday, November 10, 2005 08:21 AM

On Thu, 10 Nov 2005 03:48:15 -0500 GMT, Christian Ziemski wrote:

>>Weird. I tried the PIF/LNK file approach but was unsuccessful with Opera.

> You have to type in the path of the link in Operas input field
> manually. The button "choose" doesn't work for links.

Yes, that I knew. I simply had no better results despite the
shortcut having window maximized set.

--
John

 


Topic: Re: Start-up size revisited (35 of 38), Read 14 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Saturday, January 14, 2006 01:34 PM

It looks like I have to reopen this thread...

(Note: The following has nothing to do with the APP_MAX fix earlier in
this thread. I tested with an unfixed VEDIT too.)


I found a behavior of VEDIT related to startup which could be
improved.


This happened:
I had VEDIT open, but minimized to taskbar.

Then I tried to have a look at the source code of a HTML page opened
in Opera via Opera's "View source".

Nothing seemed to happen, only some sort of a short blinking.

A closer look showed that Opera has passed the file correctly to the
minimized VEDIT, but it remained minimized.


Some more tests with Explorer, TotalCommander and FileZilla lead to:

Using the program's internal call of an external editor (VEDIT) give
the same result as the relatively new "Open with Vedit" context menu:
A minimized VEDIT remains minimized.

But using "Open" in Explorer & Co (the same as double click) on a
associated-to-Vedit file (e.g. .txt) the minimized Vedit is maximized
upon opening the file.


IMHO it would be desirable that VEDIT always un-minimze from taskbar
when called from somewhere.


Christian

 


Topic: Re: Start-up size revisited (36 of 38), Read 15 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Saturday, January 14, 2006 06:10 PM

At 01:40 PM 1/14/2006, you wrote:
>IMHO it would be desirable that VEDIT always un-minimze from taskbar
>when called from somewhere.

That seems like a reasonable request.

Ted.

 


Topic: Start-up size revisited (37 of 38), Read 16 times
Conf: VEDIT Suggestions
From: John H
Date: Saturday, January 14, 2006 06:13 PM

On Sat, 14 Jan 2006 13:40:18 -0500 GMT, Christian Ziemski wrote:

> IMHO it would be desirable that VEDIT always un-minimze from taskbar
> when called from somewhere.

Agreed.

--
John