473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

how to use classes and wats wrong if i write the code like this

seshu
156 100+
Hi everybody today i have developed an application which uses the concepts of classes and the code is like this to explain you simply
i have two forms form1,form2,and a class class1
in class i wrote this
Expand|Select|Wrap|Line Numbers
  1. Public Class Class1  
  2.   Public str As String = ""
  3. End Class
  4. in form1 class  one i wrote this code
  5. dim cls as new class1
  6. in button click 
  7.   cls.str=textbox1.text
  8. in another button click
  9. dim frm as new form2
  10. frm.show
  11. in form 2 class
  12. dim cls1 as new class1
  13. on form load
  14. textbox1.text=cls1.str
now here in this code this the value of textbox1 in form 1 is not coming in form2 textbox some one plzz help me
Feb 21 '07 #1
2 915
NSRao
11
try with static clause
Feb 21 '07 #2
nmsreddi
366 256MB
Hello

Is this a webapplication or awindows application

if you want to get value of textbox that exist in another webform you have to explicitly pass that value as a parameter while you are navigating to other form .other wise you can access textbox by using its form object in another form but you cannot access the value of that text box


make it clear ant try it out

Good luck
Feb 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: vrillusions | last post by:
I've been using functions since I first started using php, but I've been hearing more and more about classes, which I never really looked at that much. I understand the whole OO programming...
7
by: Rajani | last post by:
Hello, dim receiptto receiptto="a2z@yahoo.com" set cdoconfig=CreateObject("CDO.configuration") set cdomsg=CreateObject("CDO.Message") with cdoconfig.Fields...
45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
4
by: john townsley | last post by:
do people prefer to design classes for the particular job or for a rangle of tasks they might encounter now and in the future. i am doing some simple win32 apps and picking classes is simple, but...
4
by: Chris F Clark | last post by:
Please excuse the length of this post, I am unfortunately long-winded, and don't know how to make my postings more brief. I have a C++ class library (and application generator, called Yacc++(r)...
25
by: Brian | last post by:
Can some one please tell me what I'm doing wrong. I'm trying to create a class called Dog, but Visual Basic tells me that I can't enter Wolf.age....why is this? Public Class Form1 Public Class...
173
by: Zytan | last post by:
I've read the docs on this, but one thing was left unclear. It seems as though a Module does not have to be fully qualified. Is this the case? I have source that apparently shows this. Are...
1
by: rhepsi | last post by:
Hii all, im worried with a project where... im trying to delete a row from the datagrid.... delete_button_click:...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.