473,689 Members | 3,013 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.helpprovi der

and:

me.helpprovier1 =new system.windows. forms.helpprovi der

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 3476
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 mynewClassObjec t as New myNonSharedClas s.
Dim myvalue = mynewClassObjec t.value

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

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 mynewClassObjec t as New myNonSharedClas s.
Dim myvalue = mynewClassObjec t.value

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

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.startpos ition=formstart position.center screen
end sub
end class

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

sub new()
mybase.new()
mybase.startpos ition=formstart position.center screen
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.startpos ition=formstart position.center screen
Me.xHelp.HelpNa mespace = "mspaint.ch m"
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
2710
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 VS, however, when I change to release and put it out on the web it fails giving me the following error message The underlying connection was closed. Could not establish a trust relationship with the remote server.
15
2086
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 Studio.NET installed. Nothing but headaches. Continually getting System.Data.SqlClient.SqlException : Timeout expired message - The timeout period elapsed prior to completion of the operation or the server is not responding. Can anyone help with...
4
4107
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 you.... Rgds.... Posted Via Usenet.com Premium Usenet Newsgroup Services
3
1335
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 field screendescription has the form code I am trying to create at runtime the code that is in the field screendecription is Imports System.Windows.Forms Public Class clsLoginScreen Inherits System.Windows.Forms.Form
14
7032
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 sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection string: "server=192.1.1.1; Initial Catalog=master; uid=The_User; password=The_Password; Connect...
1
1966
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 code in "line 168"and in line"393" <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%Option Explicit%> <% Dim strCourseCode Dim strSubjectCode Dim strSubjectName
10
2531
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 TeamScore(1-10) Employee3 TeamScore(1-10) Employee4 TeamScore(1-10) Then I submit this page with all the values in TeamScore for every employee and I want to perform a calculation based on the values in the drop-down and a
68
4702
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 scripting, server-side includes or frames, is there a way to include a standard header on all pages within a site? The design goal is to have the header links and title graphic on every page kept in some single place, so that a change to the header...
5
2554
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 rows in the table already. If he so wishes, he can add additional rows. Whilst creating the rows, I have set the 'id' and 'onchange' attributes. Now when he comes back to this page after going forward 1 page, the table is not loading with all values....
0
8528
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6454
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4321
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4547
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2965
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 we have to send another system
2
2219
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.