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.
Unfortunately, activation email could not send to your email. Please try again.

Unable to load DLL (uxtheme.dll)

Thread ID:

Created:

Updated:

Platform:

Replies:

6898 Sep 3,2003 04:42 PM Sep 4,2003 10:42 AM Windows Forms 3
loading
Tags: EditControl
Shulin He
Asked On September 3, 2003 04:42 PM

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?

Administrator [Syncfusion]
Replied On September 4, 2003 10:16 AM

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.

Shulin He
Replied On September 4, 2003 10:32 AM

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.

Shulin He
Replied On September 4, 2003 10:42 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;