Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Ultima SDK

Ultima SDK Support for the Ultima SDK.

Reply
 
Thread Tools Display Modes
Old 11-11-2006, 08:51 PM   #1 (permalink)
Forum Newbie
 
Join Date: Feb 2004
Posts: 4
Question Using the SDK under VB.NET

Alright, I need some help here.

I started a new project and added Ultima.dll as reference.

On the object browser, I can see all functions. It's all ok.

Then, im doing a simple button to retrieve a picture from the ART..

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim wBitmap As Bitmap = Ultima.Art.GetLand(19)
        picturebox1.Image = wBitmap
End Sub
No errors there, it seems to find all the declarations.

I run the application and click the button, then my vb.net tells me this error:


Type load exception was unhandled
Could not load type 'Ultima.Art' from assembly 'Ultima, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

In details:

Code:
System.TypeLoadException was unhandled
  Message="Could not load type 'Ultima.Art' from assembly 'Ultima, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
  Source="Ultima"
  TypeName="Ultima.Art"
  StackTrace:
       at WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       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
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
What's wrong there!?

I've got UO installed, but not running.

My second question is the following. Can this SDK be used without the client and just load animations and stuff on my own application?

Thanks for the replies!
rednaxela is offline   Reply With Quote
Old 11-18-2006, 01:27 AM   #2 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

Thats pretty strange. If you indeed added Ultima.dll to the project as a reference your program should not be doing that. Maybe the answer to the second qestion may answer the first. Yes, you will need to have Ultima Online installed on your computer in order for Ultima.dll to function correctly. You may download the ML client and all the files from download.com. Just do a search for ultima online. Good luck with your project.
rsmiller21 is offline   Reply With Quote
Old 11-18-2006, 09:03 AM   #3 (permalink)
Forum Newbie
 
Join Date: Feb 2004
Posts: 4
Default

I have AOS installed. Wouldn't it be enough?
rednaxela is offline   Reply With Quote
Old 11-18-2006, 12:55 PM   #4 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

As far as I know it shouldn't be problem. You may just have a bad project build. I have had some occasions when a Visual Studio project file gets corrupted and won't load assemblies especially in VS 2001. Regardless of the version, try removing the Ultima.dll refference, then build the project (which will fail), remove all temp files from the project bin directory, then adding the Ultima.dll refference in again. Is this a stand alone application or is this going to be compiled from the RunUO server?
rsmiller21 is offline   Reply With Quote
Old 11-19-2006, 01:37 AM   #5 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

It occured to me that is you are using this program in the RunUO server, you will need to add in all assembly references(Ultima.dll, System.Windows.Forms, ect) to the Assemblies.cfg in the Data directory.
rsmiller21 is offline   Reply With Quote
Old 11-19-2006, 07:59 AM   #6 (permalink)
Forum Newbie
 
Join Date: Feb 2004
Posts: 4
Default

Actually, it is now working.

I made it work under C# by using the same code, and then it worked on VB.NET..

:S


Thread closed, I guess!

Thanks ppl!
rednaxela is offline   Reply With Quote
Old 11-19-2006, 07:59 AM   #7 (permalink)
Forum Newbie
 
Join Date: Feb 2004
Posts: 4
Default

Tho, I see 2 missing things on that SDK..

Sounds, fonts
rednaxela is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5