I created a Child Form and added several controls. One of the control
is GroupBox1. When I want to change the access modifier property of the
GroupBox1
FROM
"Public WithEvents GroupBox3 As System.Windows.Forms.GroupBox"
TO
"Public Shared WithEvents GroupBox3 As System.Windows.Forms.GroupBox"
Note down "Shared" added....
When i am executing, it did not produce any error.
When I go back to design window, it produced following error
D:\DOTNET\vbnet\Part2\Form2.vb(621): The variable 'GroupBox1' is either
undeclared or was never assigned.
I donot understand this error.
Kindly let me know how to fix it.
Many thanks in advance 6 6248
<ns********@gmail.com> schrieb I created a Child Form and added several controls. One of the control is GroupBox1. When I want to change the access modifier property of the GroupBox1
FROM
"Public WithEvents GroupBox3 As System.Windows.Forms.GroupBox"
TO
"Public Shared WithEvents GroupBox3 As System.Windows.Forms.GroupBox"
Note down "Shared" added....
When i am executing, it did not produce any error.
When I go back to design window, it produced following error
D:\DOTNET\vbnet\Part2\Form2.vb(621): The variable 'GroupBox1' is either undeclared or was never assigned.
I donot understand this error.
A shared groupbox does not make sense. Where is the Groupbox if you don't
have a Form? Where is it if you have multiple Forms? In addition, you must
not modify the code generated by the Form designer.
Kindly let me know how to fix it.
Remove the Shared keyword.
Armin
> "Public Shared WithEvents GroupBox3 As System.Windows.Forms.GroupBox" Note down "Shared" added....
Now, why in the world would you want a "shared" GroupBox !!?
Shared elements are not associated with a specific instance of a class
or structure.
Regards,
Cerebrus.
I just want create a NewClass where I want to validate the members of
groupbox1 of Form2 ...
Thanks
Hi nsikkander,
What are the "members" of your GroupBox ? Controls, I presume. And your
Controls must have associated values (Text etc.) that you want to
validate.
Well, in that case, why not store the values in some sort of collection
(Maybe... Arraylist ?) and then pass that collection to a
method/function in your NewClass, which can then return a Boolean True
or False depending on the Validation result.
In any case, a GroupBox cannot be Shared. Inherited maybe, but not
Shared.
Regards,
Cerebrus.
Many thanks Cerebrus. It sounds good idea.
Most welcome, buddy ! ;-)
Happy coding,
Regards,
Cerebrus. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chris Beall |
last post by:
If you want your code to be bulletproof, do you have to explicitly check
for the existence of any possibly-undefined variable?
Example: window.outerHeight is defined by some browsers, but not...
|
by: James A. Donald |
last post by:
I am contemplating getting into Python, which is used by engineers I
admire - google and Bram Cohen, but was horrified to read
"no variable or argument declarations are necessary."
Surely that...
|
by: ~~~ .NET Ed ~~~ |
last post by:
It is not the first time I see this happen. I am using VS.NET 2003 with .NET
Framework 1.1. In this particular situation I have a custom user control in
a windows form. There is a member variable...
|
by: Michael Howes |
last post by:
I have a strange "warning" that shows up during design time in my current
project.
I have a UserControl, which contains a public enum called ViewTypes
This UserControl also has a public property...
|
by: hui |
last post by:
Here is a problem I am having with web form designer. I have a database
control in the form, and setup the connection string as a dynamic
property. It compiles and runs fine.
I close the aspx...
|
by: VB Programmer |
last post by:
I wanted to access some properties of a panel control that is on a different
form. So, I went to the (Declarations) section of my main form (the form
with the panel) and changed the panel (called...
|
by: mros |
last post by:
I've created three buttons on a form (IsMdiContainer=True), it's mdi parent.
I need to disable these buttons from one of my child form. So,
I've changed these buttons modifier to Friend Shared...
|
by: weston |
last post by:
I've got a piece of code where, for all the world, it looks like this
fails in IE 6:
hometab = document.getElementById('hometab');
but this succeeds:
hometabemt =...
|
by: =?UTF-8?Q?Filip_Gruszczy=C5=84ski?= |
last post by:
Hello everyone!
It is my first message on this list, therefore I would like to say
hello to everyone. I am fourth year student of CS on the Univeristy of
Warsaw and recently I have become very...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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,...
| |