AppActivate Code works in Win 98 but not Win 2K. 
Author Message
 AppActivate Code works in Win 98 but not Win 2K.

Hello:

I am using AppActivate to pass control back and forth between a VB
executable and AutoCAD Map 5.  Here is an example:

            AppActivate objAcad.Caption
            Set utilobj = objAcad.ActiveDocument.Utility
            stPnt = utilobj.GetPoint(, Prompt1)
            If Index = 12 Then
                Coord(5).Text = Format(stPnt(0))
                Coord(7).Text = Format(stPnt(1))
            ElseIf Index = 13 Then
                Coord(6).Text = Format(stPnt(0))
                Coord(8).Text = Format(stPnt(1))
            End If
            AppActivate frmSettings.Caption
            Call SetVar("OSMODE", OldOsmode, 1)

On my old Win 98 machine, everything works as expected.  The VB application
changes focus to AutoCAD and executes the GetPoint function, then passes the
values back to my form.  On my Win 2000 machine, the command is executed
correctly in AutoCAD, but the application does not get focus and is not
brought to front.  Instead, the AutoCAD icon on my Taskbar flashes.

Does anyone have any ideas/fixes/workarounds for this problem?  Any help
would be much appreciated.

Cheers,

Stephen



Sun, 08 Aug 2004 06:30:42 GMT  
 AppActivate Code works in Win 98 but not Win 2K.
I am having the same problem with a screen saver...I have it posted in
here for help....it executes fine in all windows platforms except XP
and 2000.....does the same thing...starts minimized in the task bar.
If you get an answer...please send it on to me...
thanks...
hanser in houston
Quote:

>Hello:

>I am using AppActivate to pass control back and forth between a VB
>executable and AutoCAD Map 5.  Here is an example:

>            AppActivate objAcad.Caption
>            Set utilobj = objAcad.ActiveDocument.Utility
>            stPnt = utilobj.GetPoint(, Prompt1)
>            If Index = 12 Then
>                Coord(5).Text = Format(stPnt(0))
>                Coord(7).Text = Format(stPnt(1))
>            ElseIf Index = 13 Then
>                Coord(6).Text = Format(stPnt(0))
>                Coord(8).Text = Format(stPnt(1))
>            End If
>            AppActivate frmSettings.Caption
>            Call SetVar("OSMODE", OldOsmode, 1)

>On my old Win 98 machine, everything works as expected.  The VB application
>changes focus to AutoCAD and executes the GetPoint function, then passes the
>values back to my form.  On my Win 2000 machine, the command is executed
>correctly in AutoCAD, but the application does not get focus and is not
>brought to front.  Instead, the AutoCAD icon on my Taskbar flashes.

>Does anyone have any ideas/fixes/workarounds for this problem?  Any help
>would be much appreciated.

>Cheers,

>Stephen



Sun, 08 Aug 2004 11:01:05 GMT  
 AppActivate Code works in Win 98 but not Win 2K.
Check out the ForceFore sample at www.mvps.org/vb
IIRC, AppActivate has never been able to restore a minimized app, and all
sorts of things differ between operating systems...

Jim Deutch
MS Dev MVP

Quote:
> Hello:

> I am using AppActivate to pass control back and forth between a VB
> executable and AutoCAD Map 5.  Here is an example:

>             AppActivate objAcad.Caption
>             Set utilobj = objAcad.ActiveDocument.Utility
>             stPnt = utilobj.GetPoint(, Prompt1)
>             If Index = 12 Then
>                 Coord(5).Text = Format(stPnt(0))
>                 Coord(7).Text = Format(stPnt(1))
>             ElseIf Index = 13 Then
>                 Coord(6).Text = Format(stPnt(0))
>                 Coord(8).Text = Format(stPnt(1))
>             End If
>             AppActivate frmSettings.Caption
>             Call SetVar("OSMODE", OldOsmode, 1)

> On my old Win 98 machine, everything works as expected.  The VB
application
> changes focus to AutoCAD and executes the GetPoint function, then passes
the
> values back to my form.  On my Win 2000 machine, the command is executed
> correctly in AutoCAD, but the application does not get focus and is not
> brought to front.  Instead, the AutoCAD icon on my Taskbar flashes.

> Does anyone have any ideas/fixes/workarounds for this problem?  Any help
> would be much appreciated.

> Cheers,

> Stephen



Mon, 09 Aug 2004 01:02:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. WIN 2k API vs WIN 98/WIN NT API - Help needed

2. Win API Call not working in vb.net app distributed to WIn 98

3. AppActivate doesn't work with Win 98 SE

4. Problem printing in Win 95 but not Win 98

5. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

6. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

7. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

8. QuickBasic not working under WIN-98

9. Default printer fonts for Win '95/98 not working

10. Win 98,Win XP and API

11. Userform Controls change their size between Win 98 and Win NT

12. Win 98 and Win Me Problem

 

 
Powered by phpBB® Forum Software