1. opening windoze

I was wondering how to open a window in win95, minimized, AND without it
taking focus away from whatever current app is on top.

-- code --

-- Windows 'Hooks'
onOpen[MainWindow]=routine_id("onOpenMainWindow")

-------------------------------------------------------

WinMain(MainWindow,Normal)

new topic     » topic index » view message » categorize

2. Re: opening windoze

Kat,

Would just replacing "Normal" with "Minimize" in WinMain work for you?  It
makes a minimized icon on the taskbar, but I'm not sure about NOT taking
focus away from current app.

Dan Moyer



>I was wondering how to open a window in win95, minimized, AND without it
>taking focus away from whatever current app is on top.
>
>-- code --
>
>-- Windows 'Hooks'
>
>-------------------------------------------------------
>
>WinMain(MainWindow,Normal)

new topic     » goto parent     » topic index » view message » categorize

3. Re: opening windoze

Nope, it made the Eu minimize ok, but it still took focus, the icon button
on the taskbar is depressed. Losing the focus on the app i am typing in gets
to be really annoying, and i want this Eu code to launch transparently.

Kat


----- Original Message -----
From: Dan B Moyer <DANMOYER at PRODIGY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, January 16, 2000 10:53 PM
Subject: Re: opening windoze


> Kat,
>
> Would just replacing "Normal" with "Minimize" in WinMain work for you?  It
> makes a minimized icon on the taskbar, but I'm not sure about NOT taking
> focus away from current app.
>
> Dan Moyer
>
>
>
> >I was wondering how to open a window in win95, minimized, AND without it
> >taking focus away from whatever current app is on top.
> >
> >-- code --
> >
> >-- Windows 'Hooks'
> >onOpen[MainWindow]=routine_id("onOpenMainWindow")
> >onEvent[MainWindow]=routine_id("onEventMainWindow")
> >onClose[MainWindow]=routine_id("onCloseMainWindow")
> >
> >-------------------------------------------------------
> >
> >WinMain(MainWindow,Normal)
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: opening windoze

Hi Kat, I'm still beginner. But, I think you need
to use david's sendMessage() function.
By going through win95
this way, I think win95 will give focus back to
the program you were typing in after your other euphoria program
minimizes.( Use onPaint()  ). Using sendMessage() this way is like clicking on
the
minimize button at the top of win95 programs. You don't need (I think)
to know anything about the previous window/program because
win95 knows.  I'm going to start learning
c_func() and c_proc().

...Timmy

Kat wrote:

> Nope, it made the Eu minimize ok, but it still took focus, the icon button
> on the taskbar is depressed. Losing the focus on the app i am typing in gets
> to be really annoying, and i want this Eu code to launch transparently.
>
> Kat
>
> ----- Original Message -----
> From: Dan B Moyer <DANMOYER at PRODIGY.NET>
> To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
> Sent: Sunday, January 16, 2000 10:53 PM
> Subject: Re: opening windoze
>
> > Kat,
> >
> > Would just replacing "Normal" with "Minimize" in WinMain work for you?  It
> > makes a minimized icon on the taskbar, but I'm not sure about NOT taking
> > focus away from current app.
> >
> > Dan Moyer
> >
> >
> >
> > >I was wondering how to open a window in win95, minimized, AND without it
> > >taking focus away from whatever current app is on top.
> > >
> > >-- code --
> > >
> > >-- Windows 'Hooks'
> > >onOpen[MainWindow]=routine_id("onOpenMainWindow")
> > >onEvent[MainWindow]=routine_id("onEventMainWindow")
> > >onClose[MainWindow]=routine_id("onCloseMainWindow")
> > >
> > >-------------------------------------------------------
> > >
> > >WinMain(MainWindow,Normal)
> >

new topic     » goto parent     » topic index » view message » categorize

5. Re: opening windoze

On Mon, 17 Jan 2000 00:27:42 -0600, Kat wrote:

>Nope, it made the Eu minimize ok, but it still took focus, the icon button
>on the taskbar is depressed. Losing the focus on the app i am typing in
gets
>to be really annoying, and i want this Eu code to launch transparently.
>
>Kat

If it is a different program you are trying to launch, try using

shellExecute( "open", "<program_name>", SW_SHOWMINNOACTIVE )
-- SW_SHOWMINNOACTIVE displays the window as a minimized window. The active
   window remains active.

-- Brian

new topic     » goto parent     » topic index » view message » categorize

6. Re: opening windoze

----- Original Message -----
From: Brian Broker <bkb at CNW.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, January 17, 2000 11:42 AM
Subject: Re: opening windoze


> On Mon, 17 Jan 2000 00:27:42 -0600, Kat wrote:
>
> >Nope, it made the Eu minimize ok, but it still took focus, the icon
button
> >on the taskbar is depressed. Losing the focus on the app i am typing in
> gets
> >to be really annoying, and i want this Eu code to launch transparently.
> >
> >Kat
>
> If it is a different program you are trying to launch, try using
>
> shellExecute( "open", "<program_name>", SW_SHOWMINNOACTIVE )
> -- SW_SHOWMINNOACTIVE displays the window as a minimized window. The
active
>    window remains active.

The launching program doesn't have a shellExecute(), it has a run. It's the
Eu program that needs to launch without affecting other apps.

Kat

new topic     » goto parent     » topic index » view message » categorize

7. Re: opening windoze

Sorry, timmy, but i am doing other things, and don't have time or real
incentive to learn C or gui programming so i can understand what
win32lib/windoze wants. I was hoping someone else here knew and would simply
tell me how to do it. Since the Eu program knows it's own name, can't it
just

procedure onOpen
setWindow(mainwindow,notActive)
setWindow(mainwindow,Minimize)

etc

 How do i do that?

Kat


----- Original Message -----
From: timmy <tim781 at PACBELL.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, January 17, 2000 4:34 AM
Subject: Re: opening windoze


> Hi Kat, I'm still beginner. But, I think you need
> to use david's sendMessage() function.
> By going through win95
> this way, I think win95 will give focus back to
> the program you were typing in after your other euphoria program
> minimizes.( Use onPaint()  ). Using sendMessage() this way is like
clicking on
> the
> minimize button at the top of win95 programs. You don't need (I think)
> to know anything about the previous window/program because
> win95 knows.  I'm going to start learning
> c_func() and c_proc().
>
> ...Timmy
>
> Kat wrote:
>
> > Nope, it made the Eu minimize ok, but it still took focus, the icon
button
> > on the taskbar is depressed. Losing the focus on the app i am typing in
gets
> > to be really annoying, and i want this Eu code to launch transparently.
> >
> > Kat
> >
> > ----- Original Message -----
> > From: Dan B Moyer <DANMOYER at PRODIGY.NET>
> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
> > Sent: Sunday, January 16, 2000 10:53 PM
> > Subject: Re: opening windoze
> >
> > > Kat,
> > >
> > > Would just replacing "Normal" with "Minimize" in WinMain work for you?
It
> > > makes a minimized icon on the taskbar, but I'm not sure about NOT
taking
> > > focus away from current app.
> > >
> > > Dan Moyer
> > >
> > >
> > >
> > > >I was wondering how to open a window in win95, minimized, AND without
it
> > > >taking focus away from whatever current app is on top.
> > > >
> > > >-- code --
> > > >
> > > >-- Windows 'Hooks'
> > > >onOpen[MainWindow]=routine_id("onOpenMainWindow")
> > > >onEvent[MainWindow]=routine_id("onEventMainWindow")
> > > >onClose[MainWindow]=routine_id("onCloseMainWindow")
> > > >
> > > >-------------------------------------------------------
> > > >
> > > >WinMain(MainWindow,Normal)
> > >
>

new topic     » goto parent     » topic index » view message » categorize

8. Re: opening windoze

>
> The launching program doesn't have a shellExecute(), it has a run. It's
the
> Eu program that needs to launch without affecting other apps.
>

Kat:

I don't know much about Windows, but maybe a call to getActiveWindow before
Euphoria opens its own window, open the Euphoria window minimized, and then
immediately call setActiveWindow to reset focus to the saved window?


Irv

new topic     » goto parent     » topic index » view message » categorize

9. Re: opening windoze

----- Original Message -----
From: Irv Mullins <irv at ELLIJAY.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, January 17, 2000 2:40 PM
Subject: Re: opening windoze


> >
> > The launching program doesn't have a shellExecute(), it has a run. It's
> the
> > Eu program that needs to launch without affecting other apps.
> >
>
> Kat:
>
> I don't know much about Windows, but maybe a call to getActiveWindow
before
> Euphoria opens its own window, open the Euphoria window minimized, and
then
> immediately call setActiveWindow to reset focus to the saved window?


Wolfgang sent me a hack to win32lib,, well, not really a hack, but it adds a
new functionality to win32lib, and it works! smile)

Wolfie, can we post it to the listserv, please?

Kat,
happily still coding towards her original goal,
not sidetracked by windoze api coding smile

new topic     » goto parent     » topic index » view message » categorize

10. Re: opening windoze

Kat,
Have you heard back from Wolf about posting his module?

Judith Evans


Kat wrote:
>Wolfgang sent me a hack to win32lib,, well, not really a hack, but it adds
a
>new functionality to win32lib, and it works! smile)
>
>Wolfie, can we post it to the listserv, please?
>

new topic     » goto parent     » topic index » view message » categorize

11. Re: opening windoze

Judith,

Yeas, he mentioned a valid concern, adding anything to win32lib will make it
sorta incompatable and unsupported, and yet another version of the win32lib.
So use at your own risk, David prolly won't support it. If you upgrade later
to another win32lib, you'll need to drop these lines into it too. But it
really does work, the app that has focus doesn't lose it, and the Eu app
opens in the taskbar, ready to do it's thing.

Kat,
smile


> Hi Kat.
> If you don't mind 'hacking into win32lib itself, this will work.
> I've just declared a new style for openWindow() to use:
>
> global constant NEWSTYLE=0 -- add THIS !!! ,  then in:
>
> global procedure openWindow( integer id, integer style )
>
>     atom hWnd, styleFlag
>
>     -- get the handle
>     hWnd = window_handle[ id ]
>
> -- NEW! 0.30
>     -- convert the style to a Win32 flag
>     if      style = Minimize then   styleFlag = SW_SHOWMINIMIZED
>     elsif   style = Maximize then   styleFlag = SW_SHOWMAXIMIZED
> elsif style=NEWSTYLE then styleFlag=SW_SHOWMINNOACTIVE -- add THIS !!
>     else                            styleFlag = SW_SHOWNORMAL
>     end if
> --etc--
>
> So if you use openWindow(YourWin,NEWSTYLE), or
> WinMain(YourWin,NEWSTYLE) this should work.
> Wolf

> Well, maybe I should have:
> global constant NEWSTYLE=SW_SHOWMINNOACTIVE
> ...but a quick fix was a quick fix...   blink
> Wolf


----- Original Message -----
From: Judith Evans <camping at FLASH.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Wednesday, January 19, 2000 5:04 AM
Subject: Re: opening windoze


> Kat,
> Have you heard back from Wolf about posting his module?
>
> Judith Evans
>
>
> Kat wrote:
> >Wolfgang sent me a hack to win32lib,, well, not really a hack, but it
adds
> a
> >new functionality to win32lib, and it works! smile)
> >
> >Wolfie, can we post it to the listserv, please?
> >
>

new topic     » goto parent     » topic index » view message » categorize

12. Re: opening windoze

Wolf wrote to Kat:

> -- NEW! 0.30
>     -- convert the style to a Win32 flag
>     if      style = Minimize then   styleFlag = SW_SHOWMINIMIZED
>     elsif   style = Maximize then   styleFlag = SW_SHOWMAXIMIZED
> elsif style=NEWSTYLE then styleFlag=SW_SHOWMINNOACTIVE -- add THIS !!
>     else                            styleFlag = SW_SHOWNORMAL
>     end if

The reason I use bogus flags is because of the Modal property. Otherwise,
I'd just map the constants like so:

   constant
    Minimize = SW_SHOWMINIMIZED,
    Maximize = SW_SHOWMAXIMIZED

If I make the Modal constant -1, then I can change openWindow to accept
regular Win32 flags. I'll look into this.

SettingModal as a property in openWindow is probably a bit of a mistake; it
reflects a class of window instead of a display property. I should instead
have set up seperate classes of windows, such as Window, Dialog, Palette,
MDI and so on. Creating a modal window would become:

   constant MyModal = create( Dialog, ... )

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu