Declare A Public Param For Public Class Form1?
Apr 7, 2011
Imports System
Imports System.Threading
Imports System.ComponentModel[code]....
how to declare "smsport" on class smscomms as public so that it can be access in class form1 or button1_click event.
View 5 Replies
ADVERTISEMENT
Apr 29, 2012
When and why do you declare variables in the Public Class Form1 section?
View 1 Replies
Aug 26, 2010
How do declare a public variable .aspx web page that can be used in all the pages within my web application?
View 3 Replies
Feb 10, 2011
I can access a module from code behind but not from the aspx page in inline VB code <% ... %>.
View 2 Replies
Nov 17, 2008
how to declare an internal class within a public class using vb.net?
View 2 Replies
Jan 19, 2011
I have a public module from which I want to use Form1 components. How do I do that? For example:
Module Print_to_textbox1()
what goes here for me to display a message into a textbox1 on Form1?
End Module
View 2 Replies
Apr 2, 2012
Is their a reason why I cant declare a Public Const this way?
HTML
Public Const whatever as string = my.application.settings.xxx.tostring
I don't understand why not.
View 4 Replies
Jul 3, 2011
how to connect VB2010 to MS Access and how to declare the connection as public? I just switched from VB2010 from VB6.0 and found some major changes since VB6.0 in terms of interface and functionality. Must I use a global module for it just like in VB6.0 (.bas module)?
View 1 Replies
Apr 23, 2012
Later on i have a form where a cost for a class is calculated by timing the duration of a class by the costperhour textbox which is in a different form.
View 3 Replies
May 3, 2011
I'm trying to declare a array that I want to use in the module and in the forms. I like it to be usable all over but I cant get it to work.[code]...
View 3 Replies
Jun 13, 2012
Just working on getting more fluent in Visual Basic over the summer so I'm still sharp for my next visual basic class. My teacher went over variables, but only in local scope.I have looked everywhere, but I can't find exactly what I need. I'm making an alarm clock of sorts, and I have this code to populate the minute array and the hour array.
Public Class Form1
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[code].....
View 3 Replies
Jan 11, 2012
How can I declare public constants that are available solution wide across all projects?
View 8 Replies
Jan 13, 2011
I'd like to get a more refined programming style and I was wondering if any of you might give me a hand...(How to declare public variables, constants, functions...in a proper way),is there any useful link or pdf document I could have a look in order to improve my style?
View 5 Replies
Jun 7, 2012
I want to created a nested class that can only be visible to and instantiated from the parent class.But I also want to be able to use an instance of the nested class through a public variable of the parent class.I tried making the nested class private, or making the nested class' constructor private, but it won't compile.Is it possible to do this in .NET?
[Code]...
View 3 Replies
Apr 13, 2009
I'm getting an error in .net when trying to declare a Public class on my code behind page.
Partial Class _Default Inherits System.Web.UI.Page
Public someVariable as integer
Public someClass as className
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load [...]
The error I'm getting is BC30508: 'someClass' cannot expose type 'className' in namespace '<Default>' through class '_Default'.The goal here is accessing the class properties in script blocks on the aspx page like this <%=someClass.classProperty%>
I'm not sure if I'm trying the right methods (I've tried several ways of declaring the public class) or if it can even be done..
View 3 Replies
Nov 27, 2011
i am trying to call a public sub within a class that resides within my form1 code:
[Code]...
View 1 Replies
Jan 13, 2011
I am making a program where there is a number of strings are needs and they need to be pre-defined. I rather not store it all in a XML file as I don't want anyone going in and altering them.
Has anyone ever created a class of public constants just to make cleaner code or is it considered bad practice?
View 5 Replies
Mar 8, 2012
I've tried searching... a lot for the answer, but as I'm not too sure what exactly I'm trying to do I can't seem to find anything. I'm trying to write a dll in order to handle errors thrown from a vb.net app. In the dll I need several forms (I'm not totally sure if they can have forms - I'm a bit of a newbie when it comes to dll's) for which the user can type in their message about the error and submit it.
[Code]...
View 1 Replies
Sep 17, 2010
I have a class that is primary configuration for my application. It has 70 plus public collections that holds all my data. I am trying to do a For Each through each of these public collections, so that I can process the data through my code, but I am getting following error:
[Code]...
View 3 Replies
Mar 3, 2009
I've got an issue where Public Events in a class aren't being seen outside the class.
Code looks like this:
Public Class Class1
Public Event Event1(someargs as object)
Public Sub New()
'Perform Some Code
RaiseEvent Event1(someargs)
End Sub
End Class
View 1 Replies
Jul 22, 2010
Public MustInherit Class SingleInstanceForm(Of T As SingleInstanceForm)
Inherits Form
End Class
[code]...
View 6 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
Nov 30, 2011
I need to convert the following code, so that it exists as a created class "Payroll" that utilizes "Get" and "Set" elements. Unfortunately, I'm completely lost.
Public Class frmPayroll
Private Sub frmPayroll_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[code].....
View 2 Replies
Dec 24, 2009
Can i add an event to a Public NotInheritable Class?, in particular i would need to have an event that would listen to property change.System.Web.ClientServices.ConnectivityStatus has a property IsOffline, i would need to know when this property has changed?
Any other way to achieve this?VB.NET to C#[URL]..
View 1 Replies
May 23, 2012
I have Errorlog.vb in my vb.net 2008 project. It is for public class. Public Class ErrorLogger I want to call this public class anywhere. So on EACH vb file I use import "mainproject name".ErrorLogger How can I declare once some where at the beginning and that class will be availabe through out the project?
View 2 Replies
Sep 6, 2009
I have a form called 'Form1' in my .NET Project.
When I double clicked the form it went into the code editor.
However, I accidently deleted the statement
Public Class Form1
End Class
how can i get this code back?
View 8 Replies
Aug 22, 2011
I have this public class
Public Class commonSettings
Dim etcString As String = "some string"
End Class
How can I call etc String and use it entirely on my code?
View 3 Replies
Aug 21, 2011
Is there any way to make a class instance public?In my mainform I define an instance of a certain class and then later on in some other forms which appear I want to alter this class.I try and pass them through when creating new instances of these other forms and it tells me Error3<instance of the class I want> cannot expose type <the class> outside the project through class <the form I want to edit it with>Which I gather from documentation is about it defeating the purpose to have a private class suddenly be thrown aroudn.but then how do I make it public? I can't define it in the first place as public myXClass as XClass, it only accepts private.
View 6 Replies
Jul 7, 2011
I'll try to explain this the simplest way I can, and I'll be happy to provide more elaboration as needed.
I've created a class, class playership, as part of a little strategy game for my own practice.
I've created the instance of a playership object in my main form using the following [code]...
I'm a little confused about this because I thought a public object or variable could be accessed from anywhere within a project.
View 4 Replies
May 14, 2012
how can i serialize a class containing a public event + withevents child classes each containing a public event?
View 3 Replies