Re: Setup-Deployment and Initial Window Focus



On 14 Sep, 11:21, Andy <andy.and.suzanne.coo...@xxxxxxxxx> wrote:
On 14 Sep, 11:14, Andy <andy.and.suzanne.coo...@xxxxxxxxx> wrote:





On 14 Sep, 11:04, Peter Duniho <NpOeStPe...@xxxxxxxxxxxxxxxx> wrote:

Andy wrote:
[...]
Can anyone explain how I can get the program menu version to behave
the same as the desktop icon?

What version of Windows are you using?

Not that I actually know the answer specifically, regardless of the
version of Windows you're using, but it could be important.

I think there's at least a 50/50 chance this has nothing to do with
.NET, and everything to do with some specific behavior of the OS shell
that's launching the application. I haven't run into the behavior with
my own .NET setup-installed programs, so I can at least say that it
works some of the time. :)

It would be interesting to know if this happens with a minimal
application as well, or if you only have the problem with this specific
application. If the latter, then there may indeed be something about
your application that is causing the problem; figuring out what that is
would likely be a simple matter of a process of elimination, removing
customized behavior in your application until it starts working the way
you want it to.

Pete

Hi Pete,

Many thanks for the prompt reply.

I am using Windows XP Pro.

I have just tried copying the desktop shortcut and over-written the
program menu version but this does not change the odd behaviour.

I will create a simple Windows application and setup project from
scratch and see if this feature still happens.

Thanks,

Andy- Hide quoted text -

- Show quoted text -

Following on from the above, I created a simple application that
displays a form (with no added controls or code). The program menu
shortcut behaves the same way as the desktop shortcut - the window has
the focus when the application is started. Therefore I conclude that
this is not an XP issue but something to do with .NET.- Hide quoted text -

- Show quoted text -

Hi,

I have found a work-around: In the <Form>_Shown method I added the
line:

this.Activate();

which resolved the issue.

Thanks,

Andy

.



Relevant Pages

  • Re: Setup-Deployment and Initial Window Focus
    ... Can anyone explain how I can get the program menu version to behave ... the same as the desktop icon? ... I am using Windows XP Pro. ... I have just tried copying the desktop shortcut and over-written the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Setup-Deployment and Initial Window Focus
    ... Can anyone explain how I can get the program menu version to behave ... the same as the desktop icon? ... What version of Windows are you using? ... my own .NET setup-installed programs, so I can at least say that it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Desktop Icons Auto-arrange after hard shutdown
    ... Apparently when you shutdown in a non-approved manner Windows doesn't remember your desktop layout. ... Save Desktop Icon Layout and Restore Desktop Icon Layout options to the ...
    (microsoft.public.windowsxp.general)
  • Re: Lock desktop icons
    ... Wes ... MS-MVP Windows Shell/User ... >> Save Desktop Icon Layout and Restore Desktop Icon Layout options to the ...
    (microsoft.public.windowsxp.general)
  • Re: Lock desktop icons
    ... click the reg file and it will install the dll file? ... > MS-MVP Windows Shell/User ... >>> Resource Kit, can be installed on Windows 2000 and XP systems. ... >>> Save Desktop Icon Layout and Restore Desktop Icon Layout options to the ...
    (microsoft.public.windowsxp.general)