We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Unable to load DLL (uxtheme.dll)

I am using the edit control (Syncfusion.Windows.Forms.Edit.EditControl) in an MDIChild form to edit JScript. I set the SettingFile to "JScript.ini". Then try to open a JScript file. It throws an exception saying Unable to load DLL (uxtheme.dll) after LoadFile() is called. I am using Syncfusion.Edit 1.6.1.0, VS2003, and Win2K. I don't see anywhere loading the uxtheme.dll from the VS output window. Any other places I can try to solve this problem?

3 Replies

AD Administrator Syncfusion Team September 4, 2003 02:16 PM UTC

Hi Sam, I have created a sample as per your specifications and attached it here. I have tested this sample in version 1.6.1.0 in VS 2003 but was unable to reproduce this error. Please run the sample in your machine and open the test.js file in the editcontrol of the MDIchild form. Let me know how this goes. If you continue to experience this problem, please do not hesitate to get back to us by opening an incident in Direct Trac. Thank you. Regards, Guru Patwal.


SH Shulin He September 4, 2003 02:32 PM UTC

I found your problem in the following code. internal EditButton() { SetStyle(ControlStyles.Selectable, false); bThemeSupported = false; bThemeSupported = ((Environment.OSVersion.Version.Major >= 5) && (Environment.OSVersion.Version.Minor >= 1) && (Environment.OSVersion.Platform == PlatformID.Win32NT)); } Because theme is supported based on platform and OS version and you try to check if theme is active, it needs to load uxtheme.dll in OnPaint() protected override void OnPaint(PaintEventArgs pe) { base.OnPaint(pe); if (bThemeSupported) { if ((IsThemeActive() == 1) && (this.hTheme == IntPtr.Zero)) { this.hTheme = OpenThemeData(this.Handle, "SCROLLBAR"); } if (this.hTheme != IntPtr.Zero) { IntPtr hDC = pe.Graphics.GetHdc(); RECT rect = new RECT(this.ClientRectangle); DrawThemeParentBackground(this.Handle, hDC, ref rect); DrawThemeBackground(hTheme, hDC, 3, 1, ref rect, ref rect); pe.Graphics.ReleaseHdc(hDC); } } } I am doing a build myself to disable theme support.


SH Shulin He September 4, 2003 02:42 PM UTC

I did the same. When I create a brand new project with edit control, it doesn't try to load the DLL. But I am trying to use the edit control within an existing application. This application is developed purely with .NET, WinForm, C#, Managed C++ with VS2003 in Win2K environment. I couldn't find out what's going on except what I found out as in my previously posted message Anyway, I have found a temporary solution. > Hi Sam, > > I have created a sample as per your specifications and attached it here. I have tested this sample in version 1.6.1.0 in VS 2003 but was unable to reproduce this error. Please run the sample in your machine and open the test.js file in the editcontrol of the MDIchild form. Let me know how this goes. > > If you continue to experience this problem, please do not hesitate to get back to us by opening an incident in Direct Trac. Thank you. > > Regards, > Guru Patwal.

Loader.
Live Chat Icon For mobile
Up arrow icon