473,326 Members | 2,061 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,326 software developers and data experts.

OOP Confused

I have developed many applications in VB and eVB. I am currently
working on developing an application with the .net compact framework
2.0 in Visual Studio 2005.

In VB or eVB you could access another forms controls as shown below:

'From frmMain Click event

frmGetPrimary.grdPrimary.DataSource = dtChildUPN
>From some of the information that I have read you have to create a form
that will share it's properties before you can use the properties. This
is all very confusing for me. My problem is that the frmGetPrimary form
hasn't been called as of yet before the frmMain click event has been
fired. Can someone please tell me how to set the DataSource for a grid
in Form2 if Form1 is the form with the Click Event. Please keep it
VB/eVB oriented so I can understand. Thanks.

Jul 22 '06 #1
2 819
Hello,
In VB2005 you can indeed access the other form the very same way that you can access it in VB. This capability was missing in VS2003 and you would have to access the form properties and method through an object variable.

But it VB2005 it should work... Are you facing any problems doing that?

Cheers!
Cyril Gupta

Jul 22 '06 #2
Thomas,

In VBNet 2005 is introduced a non OOP piece special for not yet converted
VB6 developers who did not want to use OOP in VBNet but would use the
classic VB6 way, so you can use that, you find it in the "my" class.

If you want it OOP than you can declare your datagrid as Friend or Public in
your form2 and place your form public in your frm1 (outside a method)

Public frm2 as new form2

Now you can use the datagrid of frm2 everywhere in frm1

frm2.MyDatagrid

I hope this gives an idea,

Cor

<Th***********@gmail.comschreef in bericht
news:11*********************@i3g2000cwc.googlegrou ps.com...
>I have developed many applications in VB and eVB. I am currently
working on developing an application with the .net compact framework
2.0 in Visual Studio 2005.

In VB or eVB you could access another forms controls as shown below:

'From frmMain Click event

frmGetPrimary.grdPrimary.DataSource = dtChildUPN
>>From some of the information that I have read you have to create a form
that will share it's properties before you can use the properties. This
is all very confusing for me. My problem is that the frmGetPrimary form
hasn't been called as of yet before the frmMain click event has been
fired. Can someone please tell me how to set the DataSource for a grid
in Form2 if Form1 is the form with the Click Event. Please keep it
VB/eVB oriented so I can understand. Thanks.

Jul 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Haoyu Zhang | last post by:
Dear Friends, Python assignment is a reference assignment. However, I really can't explain the difference in the following example. When the object is a list, the assignment seems to be a...
2
by: Brian Roberts | last post by:
I'm confused about the use of hasattr/getattr, or possibly namespaces. I know how to do this: class UnderstandThis(object): def do_foo(self): pass def do_bar(self): pass def doit(self, cmd):...
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
6
by: ree32 | last post by:
I am a bit confused with capabilities of XML. I have an XML document with information on images(photos). Is there way to use XSL/XSLT to create a page that will display the images as gallery. ...
5
by: Jeff Amiel | last post by:
Yes, I've read the FAQ's... I'm still confused. I'm trying to help out a buddy to extract data from an .mdb file that has special 'permissions' on it. If I try to open it with the standard...
10
by: Lauren Wilson | last post by:
Ok I have searched the MS website for info on this. I am totally confused. If I want to deploy an Access 2003 app and allow my users to run it using Access 2003 Runtime, where do I get the...
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
11
by: timmu | last post by:
Someone asked me a question about integer division and printf yesterday, I tell him he should do a casting to float/double before you do any interger division. But he doesn't think so, so I try...
2
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.