Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 28th, 2006, 06:21 AM
Authorized User
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default error while referencing system.windows.forms.dll

hi all,

I am colordialog control to show solor palette. following is the code i am using.

Imports System.Data.SqlClient
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Web
Imports System.Data.DataRowView
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Public Class newdev
    Inherits System.Web.UI.Page
    Private dlgcolor As ColorDialog
    Protected WithEvents lblcolor As System.Web.UI.WebControls.Label
    Protected WithEvents lblerr As System.Web.UI.WebControls.Label
    Protected WithEvents txtdevcode As System.Web.UI.WebControls.TextBox
    Protected WithEvents txtdevname As System.Web.UI.WebControls.TextBox
    Protected WithEvents Button1 As System.Web.UI.WebControls.Button
    Protected WithEvents btnshow As System.Web.UI.WebControls.ImageButton
    Protected WithEvents txtcolor As System.Web.UI.HtmlControls.HtmlInputText
    Protected WithEvents Button2 As System.Web.UI.WebControls.Button

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        dlgcolor = New ColorDialog()
    End Sub

    Private Sub btnshow_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnshow.Click
    End Sub
End Class

when I run the application and click on the button to view the dialogbox i am getting error

Server application unavailable

Can anybody help me

Old March 28th, 2006, 03:11 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

WindowsForms != WebForms. You can host winforms inside of webforms and the methodology to doing so is like calling a COM object (You have compile the file and then call it from your webform using the object tag)

"The one language all programmers understand is profanity."

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble referencing a DLL in VS2005 sgurkin Visual Studio 2005 0 November 5th, 2008 12:53 PM
where is my System.Windows.Forms.MessageBox? IZRAILEVICH1 C# 2005 3 November 14th, 2005 03:38 AM
where is my System.Windows.Forms.MessageBox? IZRAILEVICH1 General .NET 2 May 29th, 2005 09:30 PM
Referencing a spreadsheet from an ActiveX DLL James Diamond Excel VBA 2 January 23rd, 2004 07:21 AM
Referencing an ActiveX DLL from Excel james gold Excel VBA 1 September 10th, 2003 10:41 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.