Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 September 15th, 2009, 03:32 PM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Defining controls from a different class VB

Hi, I have a class called PatientInfo that works fine. Right now, I'm trying to make a change in another class called Report to validate some objects from the class PatientInfo. Here is my code -
Code:
 Imports System.Windows.Forms Imports Bryanlgh.Echo.Views Namespace Bryanlgh.Core.Tasks Public Class Report Inherits System.Windows.Forms.UserControl Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If cboPcpMd.Text = "" Then MessageBox.Show("Please enter a Primary Care Physician!") End If If cboPhysicianPerforming.Text = "" Then MessageBox.Show("Please enter an Attending Physician!") End If End Sub End Class
The controls cboPcpMd & cboPhysicianPerforming are from the class PatientInfo with a Namespace of Bryanlgh.Echo.Views. So in this other class Report, I added the code Imports Bryanlgh.Echo.Views but when I compile I get 3 messages - 1. Namespace or type specified in the 'Imports Bryanlgh.Echo.Views' doesnt contain any public member. 2. Name 'cboPcpMd is not declared. 3. Name 'cboPhysicianPerforming' is not declared Any help will be greatly appreciated. Thanks. Victor
 
Old September 15th, 2009, 09:54 PM
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default Wrong Forum

You need one of the .NET forums





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access form controls from separate class? paket C# 6 August 1st, 2007 06:18 AM
different class between vb and c#(two books) yonghoo BOOK: ASP.NET Website Programming Problem-Design-Solution 8 September 1st, 2004 08:28 PM
Controls New Class Library project page 60??? Ghistos BOOK: ASP.NET Website Programming Problem-Design-Solution 5 July 27th, 2004 10:40 PM
About(sealed in c#/MustNotInheritabl in vb) class nagendrakumar_b General .NET 1 May 3rd, 2004 02:48 AM
How to include c# class and vb class in the .vbprj umeshayk VS.NET 2002/2003 2 January 9th, 2004 12:08 AM





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