SharpUI for .NET Support

Started by BillNew at 04-02-2007 11:28 AM. Topic has 1 replies.

Print Search Rate
Sort Posts:    
   04-02-2007, 11:28 AM
BillNew is not online. Last active: 4/2/2007 10:09:46 PM BillNew

Not Ranked
Joined on 02-03-2005
Posts 7
Possible fix for "Setup Error: Failed to load resources from resource file"
Was seeing this message upon exiting a program when using SharpUI
and a Style Manager:

"Setup Error: Failed to load resources from resource file"

Turns out that during the "Form Load" process that a Zero Byte
Style Sheet ".XML" file was getting loaded into a UImanager
object when the "LoadCurrentFormStyle" logic was called... this
in turn caused the color scheme to be messed up and the buttons
that use that manager to seemingly not work properly.

---
- Private Sub LoadCurrentFormStyle()
-
-    Dim path As String = System.AppDomain.CurrentDomain.BaseDirectory()
-    If Microsoft.VisualBasic.Right(path, 1) <> "\" Then
-       path = path & "\"
-    End If
-
-    Dim XmlStyleFilename As String = path & "StyleSheets\MyStyleSheet.xml"
-
-    Try
-       UiStyleManager.Load(XmlStyleFilename)
-       Refresh()
-    Catch ex As Exception
-       ' "Error loading selected style"
-    End Try
-
- End Sub
---

Removing the Zero Byte Style Sheet ".XML" File then adding the
"If... End If" below to the above code will help resolve the issue:

---
-       If Dir(XmlStyleFilename) <> "" then
-          UiStyleManager.Load(XmlStyleFilename)
-          Refresh()
-       End If
---

Hope this helps someone else quickly resolve this error.

:)

   Report 
   04-02-2007, 2:45 PM
ericc is not online. Last active: 4/4/2009 4:32:14 PM ericc

Top 10 Posts
Joined on 03-01-2005
Posts 1,857

DDStaff
Re: Possible fix for "Setup Error: Failed to load resources from resource file"
BillNew,
    Thank you for your question. Unfortunately, I have been unable to reproduce the described behavior. Would it be possible for you to provide me with the style sheet your experiencing this behavior with after loading? Could you provide me with a screen shot or example of what is meant by the buttons being messed up / not working properly? Could you please explain how you expect them to look / act verses what you are encountering?

Also, im happy to hear you have found a resolution to the behavior encountered.

I look forward to hearing from you. Thank you!
    Eric


   Report 
GrapeCity » Product Support » SharpUI for .NE... » Possible fix for "Setup Error: Failed to load resources from resource file"

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.