Making A General Functions Class Library That Will Be Used In Several Applications And Asp Pages?
Jul 12, 2009
making a general functions class library that will be used in several applications and asp pages, sometimes running at the same time.I've looked at a lot of samples on the web and they all show you to create an instance of the classlibrary namespace or the classlibrary class.
IE.
dim obj2 as new mycompany.mynamespace.myclass
dim n2 as integer
n2 = obj2.somefunction(...)
What I did was create my class library and put a class in it and declared a function as sharred, then created my dll.I don't have to create an instance of it and I can use it like the net framework by just coding
n2 = mycompany.mynamespace.myclass.somefunction(...).
The net framework does this, I mean once I imports it I don't have to make an instance of it in every function.All the samples I've seen about class libraries do not use the shared keyword.
View 1 Replies
ADVERTISEMENT
Feb 11, 2009
I have large group of functions that I would like to store in basically a library and simply call the functions from the controls on my forms. Back in VB 6 I would have done this with a module, but now I have been told that a Public Class is the correct way in .NET. How should I go about doing this?
View 2 Replies
Feb 3, 2011
Namespace MyClassLib
Public Class MainClass
Public Sub New()
[CODE]...
Is it possible to make it so that the user using the Class Library has to declare a new Instance of MainClass() before using Subs/Functions in Class2 or Class3?
View 2 Replies
Dec 6, 2010
What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.
Public Shared Function Get...(byval xx as xx)
and
Public Function Get...
The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).
View 1 Replies
Jan 17, 2010
My boss has given me an asp.net web application that was done by his former employee. Now my boss has no contact with that employee. He wants me to make some changes in that web application. I went through the application. There is no documentation present for that application . Its a huge application. It contains many directories. I think it was a team work. It has many asp pages, aspx pages, jsp pages, xml pages, css pages, etc... How to understand other person or team's website or web application that was written in asp or asp.net and vb or vb.net?
View 4 Replies
Jun 20, 2011
I have an aspx page with some controls. One of which is an iFrame, whose source changes (depending on the selection in a listbox). So, if a user selects an item in the listbox (ie: Claims.aspx), the iFrames source changes to "Claims.aspx".
Now here comes the tricky part. I have a button on my 'child' pages (ie: Claims.aspx). I'd really really really like to have that button execute either:
1) Javascript from the 'parent' page
2) A VB function in the code-behind of the 'parent' page
Any way to do this? (and really, why do I suddenly feel like I'm working with VB 3.0?
View 2 Replies
Aug 19, 2009
I have an aspx page with some controls. One of which is an iFrame, whose source changes (depending on the selection in a listbox). So, if a user selects an item in the listbox (ie: Claims.aspx), the iFrames source changes to "Claims.aspx".Now here comes the tricky part. I have a button on my 'child' pages (ie: Claims.aspx). I'd really really really like to have that button execute either
View 2 Replies
Jun 21, 2011
I have a Visual Basic Class Library project. It generates a DLL. Is there a method to generate a static .LIB to which I can do a static link?Alternatively, can I do a static link against a DLL?
View 6 Replies
Oct 12, 2010
I want to create some reusable code in my forms.The idea is that a class is growing when more subroutines are added so, I need to store the finished subs somewhere to make place for others, this way I don't lose myself searching through the entire class
View 4 Replies
Dec 28, 2010
I am very familiar with modules from my time with VB and my other programming, but what is the most commonly used practice and the best way to go about this for a website application with ASP.NET? Say I have multiple pages (in multiple directories; some in the root directory, some in child directories from the root) that will call the same set of functions and subroutines, how do I go about putting this reusable code in a place where the pages and their respective classes can call the functions/subroutines?
View 3 Replies
Mar 1, 2010
I have a DLL library, but I am not familiar with it. How can I get its usage in vb.net?
View 2 Replies
Jun 17, 2011
Are there any libraries available that to change the look-and-feel of Desktop Applications made using VB.net 2008? Here is a snapshot of an application that runs on Windows 7:I think its made using the .net framework, but how can it be styled like this? PS - Even if its not built using .net framework, then please let me know which language supports the UI customization on windows platform.
View 2 Replies
Nov 25, 2009
I want add hotkey functions in my console applications.[code]How I can add two or more keys as shortcut?
View 2 Replies
Nov 7, 2010
[code].... Can't use a Microsoft Library's functions
View 2 Replies
Jul 13, 2009
I want to calling visual basic dynamic link library in visual basic applications. I'm using visual studio 2005.net
View 2 Replies
Sep 29, 2009
VB.net newbie question: I am writing a number of console applications, all of which need to use a set of common functions and subroutines that are compiled directly into the applications, not into a separate DLL.
I assume that each separate console application needs to be a separate project, and that the commonly used functions and subroutines need to be in a separate module, but how can such a module be shared between multiple projects so that only one copy of the shared module and its code is required, without creating a separate DLL?
View 2 Replies
May 9, 2010
I am currently working on a project witch contains lots of functions and properties. These functions and properties are stored in the dll. If I reference to this from within my project, these functions and properties are all in the same namespace or class. (I don;t know how it is called)Example:If I type the root namespace: Functions. I get all the functions. I would like to organize them in:
Functions.Maths (All the functions involving maths)
Functions.Internet (All the functions involving the internet)
Functions.Language (All the functions involving languages)
I tried using classes but I cant access the properties when they are stored in a class. I don't know why.
View 2 Replies
Apr 20, 2010
i have a program and i want it to visit a pre-set list of websites which will be in a richtextbox and i want it to visit all the sites in order BUT heres my problem that idk how to fix it will only load the last page of the list it will not load any other ones. Heres my code for it to visit the websites
For i = 0 To RichTextBox1.Lines.Count - 1
WebBrowser1.Navigate(RichTextBox1.Lines(i))
[code]....
View 8 Replies
Apr 16, 2011
I'm making a program to open specific web pages with button clicks. I have a form with the buttons and 'WebBrowser1'. Everything works ok, except that when clicking on certain links within a website, it opens a full-screen window of Internet Explorer.How can I prevent it from opening a new window. It should just navigate to the link within the WebBrowser1 window.
View 6 Replies
Mar 1, 2010
I need to create unit testing project for my current website. The currentw ebsite si written in VB. All unit testing examples are using interface to create mock object. My current VB class does not implment any interface. Can I add interface and implement it to my current class and functions without affecting or changing codes to any pages in my website that call the functions? For examples my current class is like:
[Code]...
View 2 Replies
Apr 7, 2010
I'm sure there are several ways of achieving my goal but I am after opinions on what you think is the best option. I'm writing a vb.net application which (amongst other thinks) interfaces with media players in the home. Because there are different types of media playersI'm trying to structure it so each type of media player has it's own class which interfaces to a management class which sits on top of all the different devices types.
The device classes are responsible for discovering the phsyical devices and returning that information up to the management class. A device class may be responsible for monitoring 1 or more physical devices so..
[Code]...
View 1 Replies
Jun 9, 2011
I have started making applications that retrieve data from sql databases.
I write the database with Sql management studio then apply that database to my applicaton.
My question is, how can I make my applications more secure against hackers. Some applications store user names and passwords and personal information / finantial information and so on.
View 1 Replies
May 6, 2009
Ok. I just took my final for VB and the last chapter we did was on procedures and functions. Functions was the only thing out of this whole semester that I was just completely lost. I'm trying to work on this cause I'm taking Advanced VB next so I wanna know what I'm doing. So I'm trying another tutorial in the book and I'm really lost. Here is what the it wants you to do.
Retail Price Calculator
Write an application that accepts from the user the wholesale cost of an item and its markup percentage. (For example, if an item's wholesale cost is $5 and its retail price is $10, then the markup is 100%)
The program should contain a function named CalculateRetail that receives the wholesale cost and markup percentage as arguments, and returns the retail price of the item.
When the user clicks the Get Retail button, the program should do the following:Verify that the values entered by the user for the wholesale cost and the markup percent are numeric and not negative. Call the CalculateRetail function Display the retail cost as returned from the function.
Here's what the calculator looks like and my code so far.
Public Class Form1
Private Sub btnRetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRetail.Click
[Code].....
View 4 Replies
Feb 14, 2012
I have a class library in VB.NET that does a NET-envelope for an USB device driver.There is only one function of that driver that I could not envelope in a traditional class, but I had to put it in a Windows Service as described here:Sharing a class property (field) between applications.The Windows Service works fine, but I have now two projects for my NET-envelope: the one with the class library, the second with the windows service and I do not like the idea to maintain two distinct projects for the same driver.Is it a good practice (or even if possible) to add a windows service class to a normal class library (without creating its own project as described in the vb tutorial)?I know, in any case I should create a separate setup only for the windows service, but in this way I could have together all the classes that envelope my usb device driver in only one project.
View 1 Replies
Mar 23, 2012
Is there a way to call functions within a class upon instantiation of that same class? Basically, I have functions within a class, but I want to automatically call some of those functions simply when there is an instance of the class created.
Basically, I have this structure:
Dim instance as new class
instance.function1
instance.function2
[Code].....
View 1 Replies
Jun 22, 2010
I am a student of PGDCA. making a project of LIBRARY MANAGEMENT SYSTEM IN VB.NET 2005 VERSION.
View 4 Replies
May 18, 2010
I've createda vb.net class library where I've defined a number of small classes... nothing complicated, just working with strings, sending emails, etc.In another project, I reference the class library and I'm seemingly able to create an instance ofone of tclasses - intellisense shows me all of the plic properties, methods, etc... all looks perfect. No compile errors at all, nothing b gumdropsand lollipops.When I run the app I'm working on that references the class library, it fails at the point where I'm creating an instance of the class and gives me a vague exception, "System.TypeLoadException".
View 2 Replies
Mar 12, 2011
I'm posting this there is a relationship with my previous post [URL]
I have two projects, namely:
1. Project1 (Windows Application)
2. Project2 (Class Library)
in Project2 there are several classes:
* frmLogin.vb
* frmCustomer.vb
* clsGlobals.vb
in my case, I want to frmLogin.vb and frmCustomer.vb not called in Project1 and I can only call is clsGlobals.vb
View 8 Replies
Jul 28, 2009
we are using the Enterprise Library data access application block in our data layer for an application. We must be doing something wrong though because we cannot seem to get encryption and the ability to reconfigure connection strings working well. For example, when the application starts, it checks if the connection strings are "Protected", and if they are not, we encrypt them using the following function:
[Code]...
Then comes another issue. If a user installs an update for the application, the first time it runs, nothing can connect if the config file was previously encrypted. A restart of the application (second time running) will fix the issue. with all of the battles we are fighting here, I wanted to ask if we are doing this right? How should we be encrypting and allowing updates. If you need to see the exceptions thrown, I can provide those upon request (will need to change some code to get them again, but it is doable).
View 4 Replies
Jul 6, 2010
I'm making a custom class that mocks the System.Drawing.Rectangle class because the Rectangle class doesn't have a name property. I need a name property because I am adding all of my rectangles to a collection and I need a little more info stored than just their locale and size. So I changed the _onPaint event but nothing is working out when I run the program?
Public Class Rectanglar : Inherits UserControl
Public BackgroundColor As Color = Color.Blue
Public Sub New(ByVal name As String, ByVal XY As Point, ByVal Widthy As Integer, ByVal Heighty As Integer)
[code].....
View 5 Replies