Results 1 to 10 of 10

Thread: Custom dialog in a class library

Threaded View

  1. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: Custom dialog in a class library

    And can you actually use a windows form in the solution list?

    And when using the methode mentioned by cicatrix, can I just add event handlers and others in the MyCustomForm class?

    Thanks for the help so far

    EDIT:

    I tried using:
    Code:
    Class MyClassLib
    
         Class MyCustomForm
             Inherits Windows.Forms.Form
             ' Your corm logic here
             ' Don't forget to move all your designer code here as well.
         End Class
         
         Public Function ShowDialog() As DialogResult
             Dim f As New MyCustomForm
             Return f.ShowDialog
         End Function
    End Class
    And exported it as a library dll.
    I made a reference to it in my test application, but now it can't find the subs and functions.
    Here is my code:

    Code:
    Public Class TextureBrowseDialog
        Public Function ShowDialog() As Windows.Forms.DialogResult
            Dim f As New Form1
            Return f.ShowDialog
        End Function
    
        Public Function GetTexturePath() As String
            Return TextureBrowserSelTexture
        End Function
        Public Function GetTextureImage() As Drawing.Image
            Return TextureBrowserImageTexture
        End Function
        Public Sub SetRoot(ByVal RootPath As String)
            TextureBrowserRoot = RootPath
        End Sub
        Public Sub SetTexturePath(ByVal SelectedPath As String)
            'TODO
        End Sub
    
    End Class
    Anyone knows why it can't find the public subs in this class?
    (it did with a previous library...)
    Last edited by bergerkiller; Mar 3rd, 2010 at 01:38 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width