I upgraded one of my products to use VS.NET 2008. The upgarded product runs
fine in ALL Windows XP, Server 2003 environments and some variants of Vista.
In some Vista variants (Vista Home Basic say) it has the following behaviour:
1. When the ActiveX is placed on a Form of VS.NET 2008 application, it does
not fully paint the print/preview window. Just the container rectangle is
drawn. No errors are reported.
2. If I do the same on another machine running Vista Business I can place
the print/preview ActiveX on a Form of vS.NET 2006 application and output
text to the print/preview window of ActiveX, however, when I try to run the
compiled application on a machine with Vista Home Basic I get the following
exception (The error also occurs on other variants of Vista):
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException
for details. The error is: Unable to get the window handle for the
'AxVSPrinter' control. Windowless ActiveX controls are not supported."
Source="vsView8Test"
StackTrace:
at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T
Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at WindowsApplication1.My.MyProject.MyForms.get_frmMain()
at WindowsApplication1.My.MyApplication.OnCreateMainForm() in
I:\vsView8Test\vsView8Test\vsView8Test\My
Project\Application.Designer.vb:line 35
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
InnerException: System.Reflection.TargetInvocationException
Message="Unable to get the window handle for the 'AxVSPrinter'
control. Windowless ActiveX controls are not supported."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.AxHost.InPlaceActivate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at WindowsApplication1.frmMain.InitializeComponent() in
I:\vsView8Test\vsView8Test\vsView8Test\Form1.Designer.vb:line 61
at WindowsApplication1.frmMain..ctor()
InnerException: System.AccessViolationException
Message="Attempted to read or write protected memory. This is
often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at
System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32 iVerb,
IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent,
COMRECT lprcPosRect)
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.InPlaceActivate()
InnerException:
If this problem is not resolved then one of my best selling products will
not work in some Vista environements and my customers will not be very happy.
Please help.
Regards,
Joginder NAhil
www.starprint2000.com
JoginderNahi wrote:
Why an ActiveX works in some Vista variants and not in others?
11-Oct-07
Regards,
Joginder NAhil
www.starprint2000.com
EggHeadCafe - Software Developer Portal of Choice
Build a Self-Updating Windows Service Data Cache
http://www.eggheadcafe.com/tutorials/aspnet/fa6446c0-248d-44f4-8bd9-47041e0465ce/build-a-selfupdating-win.aspx