473,387 Members | 1,798 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,387 software developers and data experts.

Accessing forms controls in module

Hi all,

If I remember correctly, in VB you can refer to your controls from a module
simply by referring to ControlContainer, ie. Form1.Textbox1.Text =
"something".

I have added a module to my project in .Net and I cannot access any of my
controls in Form1. In fact referring to Form1 brings up a very limited list
of properties. How do I get at my controls and properties?

Thanks,

Phil
Nov 20 '05 #1
2 1139
Declare your form in your module, that's the only solution I know.
So in your module you type somewhere:
dim MyForm as new frmMyForm

and than you can in the module refer to all the methods ans properties by
using MyForm.fntMyFunction etc

Hope this helps, Pieter

"Phil" <Ph**@nospam.com> wrote in message
news:c1**********@sparta.btinternet.com...
Hi all,

If I remember correctly, in VB you can refer to your controls from a module simply by referring to ControlContainer, ie. Form1.Textbox1.Text =
"something".

I have added a module to my project in .Net and I cannot access any of my
controls in Form1. In fact referring to Form1 brings up a very limited list of properties. How do I get at my controls and properties?

Thanks,

Phil

Nov 20 '05 #2
Well hell..................thanks! That's simple and I feel dumb I didn't
know :-)

Have a good one!

Rgds, Phil

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
Declare your form in your module, that's the only solution I know.
So in your module you type somewhere:
dim MyForm as new frmMyForm

and than you can in the module refer to all the methods ans properties by
using MyForm.fntMyFunction etc

Hope this helps, Pieter

"Phil" <Ph**@nospam.com> wrote in message
news:c1**********@sparta.btinternet.com...
Hi all,

If I remember correctly, in VB you can refer to your controls from a

module
simply by referring to ControlContainer, ie. Form1.Textbox1.Text =
"something".

I have added a module to my project in .Net and I cannot access any of my controls in Form1. In fact referring to Form1 brings up a very limited

list
of properties. How do I get at my controls and properties?

Thanks,

Phil


Nov 20 '05 #3

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

Similar topics

2
by: Dave PNNZ | last post by:
Can someone help! I want to insert a feild on a Access 2000 database form where you insert Date of Birth in another feild I want in to automaticly caculate how old the person is in years can...
4
by: Jim Heavey | last post by:
Hello, I have created a form which I intend to use a a dialog box. It has a few controls on that form and I changed the properties of those controls to "public" with the idea that I could access...
5
by: RSH | last post by:
I havent been able to set a property from another class with out getting some sort of error. Can someone please tell me what I'm doing wrong here? Public Class Form1
7
by: Sudhakara.T.P. | last post by:
Hi, I have an tab control in one of the forms and it has two tab strips. Now I have written an general function that accepts form name as parameter and iterates through all the controls in the...
9
by: Bob | last post by:
Hello: I have a form with 26 panels. Each panel has a bunch of other controls in it. The panels visible property are set to False. Each panel has a corosponding button to set it's visible...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
3
by: judy.j.miller | last post by:
Does anyone know why i can't access a form element value using dot notation in firefox, when i'm in a function. Works ok in the body. I'm trying to do this: var FarTemp = faren.temp.value; I...
8
by: colmkav | last post by:
Hi, could someone tell me how I can check whether a database is open by name eg something like db("mydbname")
1
by: Grega | last post by:
Hi all, I am trying to create a VB smart device application. I create few buttons dynamically on form_load... something like this: Dim WithEvents BtnOperate As New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.