In exampe of how to use LayerRendering code string sInstall = ReadRegistry("SOFTWARE\\ESRI\\CoreRuntime");
axSymbologyControl1.LoadStyleFile(sInstall + "\\Styles\\ESRI.ServerStyle");
worked. But in my program the same code does not work, when loadStyleFile I get error message"(Exception - HRESULT: 0x80004005 (E_FAIL))". Error code - -2147467259.stack trace -" ? System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) ? ESRI.ArcGIS.Controls.ISymbologyControlDefault.LoadStyleFile(String fileName) ? ESRI.ArcGIS.Controls.AxSymbologyControl.LoadStyleFile(String fileName) ? monitor.KartaForm.KartaForm_Load(Object sender, EventArgs e) ?
\\VS2005\\Projects\\monitor\\monitor\\KareliaForm.cs:???????? 398 ? System.Windows.Forms.Form.OnLoad(EventArgs e) ? System.Windows.Forms.Form.SetVisibleCore(Boolean value) ? System.Windows.Forms.Control.Show() ? monitor.Form1.ShowKarta() ?
\\VS2005\\Projects\\monitor\\monitor\\Form1.cs:???????? 199 ? monitor.Form1.Form1_Load(Object sender, EventArgs e) ?
\\VS2005\\Projects\\monitor\\monitor\\Form1.cs:???????? 151 ? System.Windows.Forms.Form.OnLoad(EventArgs e) ? System.Windows.Forms.Form.OnCreateControl() ? System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) ? System.Windows.Forms.Control.CreateControl() ? System.Windows.Forms.Control.WmShowWindow(Message& m) ? System.Windows.Forms.Control.WndProc(Message& m) ? System.Windows.Forms.ScrollableControl.WndProc(Message& m) ? System.Windows.Forms.ContainerControl.WndProc(Message& m) ? System.Windows.Forms.Form.WmShowWindow(Message& m) ? System.Windows.Forms.Form.WndProc(Message& m) ? System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) ? System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) ? System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ? System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam) ? System.Windows.Forms.Form.SetVisibleCore(Boolean value) ? System.Windows.Forms.Control.set_Visible(Boolean value) ? System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) ? System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) ? System.Windows.Forms.Application.Run(Form mainForm) ? monitor.Program.Main() ?
\\VS2005\\Projects\\monitor\\monitor\\Program.cs:???????? 17 ? System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) ? System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) ? Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() ? System.Threading.ThreadHelper.ThreadStart_Context(Object state) ? System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) ? System.Threading.ThreadHelper.ThreadStart()"Can anybody say - how to improve situation?Thanks!