473,499 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help provider on EVERY form

I have hundreds of forms and I have a class defined as cMyForm which is
what every form is (inherits cMyForm as the start instead of
system.windows.forms.form)

When I add a helpprovider to a form, it creates:

Friend with events helpprovider1 as system.windows.forms.helpprovider

and:

me.helpprovier1=new system.windows.forms.helpprovider

With some other code defining which file.

All of my forms (hundreds) use the same file. I don't want to HAVE to
manually add the help provider to every form. I would like to do that in
the class definition of cMyForm. How can I do that? Would I put the
helpprovider in the SUB NEW of my class or what?

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
4 3460
Hi Darin,

I did give this morning this explanation for agnes.

In VB.net I use classes. There are two types; the names are so called names.
- The shared class (which contains a lot (mostly all) of shared methods
and properties)
- The non-shared class

From a non-shared class you have to create an object in your programming by
instancing them.
Dim mynewClassObject as New myNonSharedClass.
Dim myvalue = mynewClassObject.value

Shared members, events and properties in a class can directly called by
their name
Dim myvalue = mySharedClass.value

The benefit above a module is that you shall call them instancing or using
their name, with which they become immediately recognizable in your project.

The benefit from a non-shared class above a shared class is that it uses
less memory. It goes out of scope when the procedure ends where it is in
created (which is not true, the truth is when there are no references
anymore to it).
-------------
When I understand you well, than you can make a shared class, which holds
the data from your files and use its methods to read and write.

I hope this helps?

Cor

Nov 20 '05 #2
Hi Darin,

I did give this morning this explanation for agnes.

In VB.net I use classes. There are two types; the names are so called names.
- The shared class (which contains a lot (mostly all) of shared methods
and properties)
- The non-shared class

From a non-shared class you have to create an object in your programming by
instancing them.
Dim mynewClassObject as New myNonSharedClass.
Dim myvalue = mynewClassObject.value

Shared members, events and properties in a class can directly called by
their name
Dim myvalue = mySharedClass.value

The benefit above a module is that you shall call them instancing or using
their name, with which they become immediately recognizable in your project.

The benefit from a non-shared class above a shared class is that it uses
less memory. It goes out of scope when the procedure ends where it is in
created (which is not true, the truth is when there are no references
anymore to it).
-------------
When I understand you well, than you can make a shared class, which holds
the data from your files and use its methods to read and write.

I hope this helps?

Cor

Nov 20 '05 #3
Ok, but I am still at a loss.

My form class is:

Public Class cMyForm
inherits form
sub new()
mybase.new()
mybase.startposition=formstartposition.centerscree n
end sub
end class

So, do I want to add in NEW the part about the helpprovider, sub as:

sub new()
mybase.new()
mybase.startposition=formstartposition.centerscree n
dim xhelp as new helpprovider
mybase.controls.add(xhelp)
end sub

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4
Hi Darin,

New is a sub, so when you create it there it will be gone, it has to be on a
global place on a form.

That will be in the start of your program. By instance direct after the
class declaration.
Something as simple sample
\\\
Private xHelp as new helpprovider
sub new()
mybase.new()
mybase.startposition=formstartposition.centerscree n
Me.xHelp.HelpNamespace = "mspaint.chm"
end sub
////
The controls which are beneath the form when you use the designer, do you
not have to add to the form (me.controls).

I hope this helps?

Cor
Nov 20 '05 #5

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

Similar topics

10
2680
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
15
2060
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual...
4
4092
by: Oceania | last post by:
Hi All, I did try using the sample code from the ADO.net forum to link one table, it is working fine. But, I got a problem when I tried to link all tables (20 tables)... Please help, thank...
3
1323
by: Chris Calzaretta | last post by:
I need to create a form from this web service http://24.163.239.122/wsprojecttrackerobjects/wsprojecttrackerobjects.asmx if you call getloginscreen there is a field called screendescription that...
14
6994
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
1
1947
by: terryspanky | last post by:
----------------------Below are all the codes don't have errors---- The only problem I have is when I Delete, I'ts not deleting the subject that I click. I want to use the above codes to modify the...
10
2504
by: 60325 | last post by:
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations. Example: Employee1 TeamScore(1-10) Employee2 ...
68
4617
by: zwsdotcom | last post by:
I've been looking for references for some weeks now, but haven't found an answer to the following question. I'd love some help on this: *Without* using JavaScript or other active client-side...
5
2534
by: truptivk | last post by:
Hello all, I have a question and I'd be glad if any of you could help me :) I have written code to add rows dynamically to an existing table. When the user first comes to the page, there are 2...
0
7128
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
7169
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
7215
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
7385
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
5467
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
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.