Create A Sub Main Inside A Class Which Is Itself Part Of A Project

May 17, 2009

why, when i create a sub main inside a class which is itself part of a project, i need to create it as a shared sub like this.[code]

View 2 Replies


ADVERTISEMENT

Get Assembly Information For A Class That Is Part Of The Project But Not Executing

May 2, 2011

Two of us at our company worked on a VB project. I developed the GUI interface. Another programmer developed some of the Classes that are also part of the project/Solution. Our manager wants to see as part of the 'Help/About' drop down, the version of the GUI application as well as the Class that the other programmer wrote. We are on the third modification of my GUI application, but the 8th version of the class that the other programmer wrote. Is there some way that the GUI application can get the 'Assembly Version' information for a class that may not necessarily exeuting at any given time?

View 3 Replies

Prevent The Class Library's Files From Being Opened During Main Project's Debug Mode?

Jan 24, 2009

I made a Class Library project that contains the main classes that my Main Project needs because I don't want to main classes when I distribute my project. I've successfully called and used it in my Main Project. But when I started debugging and stepping through my code which involves calling and using the class I wrote in my Class Library, I noticed that the class' file in my Class Library opens up during debug mode.

how can I prevent the Class Library's files from being opened during my Main Project's debug mode?

View 1 Replies

Class Has Been Create By Main Class Only?

Feb 27, 2011

I'm try to create a class has been create by main class only by protect sub New but how do I create it ?

Public MustInherit Class Rune
Protected MustOverride Function Create() As Rune
Public Shared Function Factory(Of T As Rune)() As T
'I can't use "T As {Rune, New}" because Sub New isn't Public
'Return (New T).Create
End Function
End Class

[Code]...

View 2 Replies

VS 2008 Class & DLL's - Create Scripts On Their Own And Allow Them To Interact With Main Sub

Dec 12, 2011

I want to start building my first large program. I want to create scripts on their own and allow them to interact with my main sub. I guess if I need a "plane" in my application, that could become it's own class? If I wanted to calculate "purchases", "money" I could create a DLL? I don't want to have to change things and have to recompile my entire application every time I want to change how something works for example.

View 5 Replies

Create Event Log Source As Part Of Installation - Windows Forms App, Vs Deployment Project

Mar 27, 2011

I have a vb.net windows form app that I am deploying as using the visual studio deployment project. The app needs to write event logs to the application log in the event viewer. For reasons explained here I need to create the event source during the installation process. Something like this to run as part of the installer

If Not EventLog.SourceExists(My.Application.Info.ProductName) Then
EventLog.CreateEventSource(My.Application.Info.ProductName, "Application")
End If

That code needs to be run during the installer with elevated privileges. So my questions are:

How do I execute that code above as part of the installer? How do I get the installer to do the UAC prompt to allow that code to run as part of the installation?

View 1 Replies

Create A New Instance Of Webbrowser Class Inside Of A Worker Thread?

Jan 14, 2009

Is it possible to create a new instance of the webbrowser class inside of a worker thread?

View 2 Replies

Create A Project For Class?

Jul 28, 2011

For extra credit I need to create a project for my class. I am here asking what is some of your ideas on a project I already did a calculator and I don't know what else to do one one

View 3 Replies

Create A Project That Contains A Pet Class?

Jun 21, 2010

Create a project that contains a Pet class. Each object will contain pet name, animal type, breed and color. The form should contain text boxes to enter the information for the pets. A button or menu item should display the pet information on a separate form. Hint: Use a ReadOnly property on the input form to pass the object to the second form.

What I have done so far is create a new class with the name Pet and have instantiated each object with readonly property. I have also created another form where the information entered by the user will be displayed. Guess I kinda need to know what would be the next step? And I want to ensure what I have done so far is correct.

[Code]...

View 7 Replies

Loop Inside Every Tables/columns In A Dbml File To Create New Partial Class?

Aug 6, 2009

I have a class that add extra information about a column for linq2sql (see code below) right now, I have to explicitly tell what column I want that info on, how would you put that code with a loop on every column in every table from a dbml file? I was doing my test on a very very small DB, now I have to implement it on a much more bigger database and I really don't want to do it manually for every tables/columns it will take hours.

how it's being used:

Partial Class Contact ''contact is a table inside a dbml file.

Private _ContactIDColumn As ExtraColumnInfo
Private _ContactNameColumn As ExtraColumnInfo
Private _ContactEmailColumn As ExtraColumnInfo

[Code]....

View 2 Replies

Create A Custom Class That Has Inside An Array Of Another Custom Class?

Jan 31, 2011

I want to create a custom class that has inside an array of another custom class (see my code below) but when the programm runs is crashes. Why? What is the right expression???? Plz help I'm a newbie in VB.net.....

Public Class ctrarray
Public nameclass As String
Public ctrlindex(glvar_spaces) As ctrlindexclass
End Class

[code]....

View 6 Replies

Create A Class Library Project Is That A COM Component?

Feb 7, 2012

I hear COM here and there and I want to know is COM and a COM dll the same thing, and most important: when I create a Class library project is that a COM component?

View 3 Replies

VS 2008 Create A Class Library In C# And Then Use That Dll In A .net Project?

Dec 30, 2009

I know you can create a class library in C#.NET and then use that dll in a vb.net project and everything is just peachy. But can you use C++.NET and VB.NET/C#.NET in that manner?

View 2 Replies

Create A New Instance Of Security Class For Every Form In Project?

Feb 19, 2009

I'm creating what I believe is an mdi app.I have a login form.I have a class for security.My login form creates an instance of the security class. There are all kinds of security parameters for each user (permissions to different things, etc.)These parameters are part of my security class.Once the user logs in, many other forms will all be opened and closed within the main mdi frame.All of these other forms need the information of the security class to know what the user has permission to do.Do I have to create a new instance of security class for every form in my project? Isn't there a way to store this stuff globally somehow. Retrieve once from the db at the start of the app during login and just get it from this global area everytime?

View 2 Replies

Program To Create A Class Outside The Default Project Namespace?

Dec 5, 2009

Is that possible to create a class in vb.net that is not in the default namespace of the project?

for example, say you have a project call sample1, then automatially IDE will have everything default to the Sample1 as your namespace root rather than under global, which is find for most case.but I want to create some classes that is directly under global namespace

View 7 Replies

Access To Object Passed ByRef In The Constructor Of A Class Through Another Part Of The Class?

Aug 18, 2009

I have some classes, BsfciFile and StudyFlashCard. Bsfci is the extension to which I save my set of flashcards in an INI format. I am currently working to transform my code from using Windows API calls to access the INI to using a IniFile class that I found on the internet. I would like the BsfciFile to have a Array of StudyFlashCard objects, but I would like the StudyFlashCard class to use the IniFile class object contained in the BsfciFile class. I can pass the IniFile from the BsfciFile class to the constructor for the StudyFlashCard class, but I want it to modify the same IniFile as the BsfciFile class has later on.

[Code]...

View 1 Replies

Why Is The Name Of A Sub Routine Always Inside A Function Main()

Aug 2, 2009

Public Module Exercise
Private Function GetFullName$(MI As String, _
LastName As String, _
FirstName As String)

[code]....

I want to know why the name of a sub routine is being used inside a Function Main as i have highlighted in bold letter.Canīt it stay outside the Function Main() just close to the Sub Program.? Example: -

MsgBox("Hello " & FullName)
Return 0
End Function

[code]....

View 5 Replies

ASP.NET Find DropDown Value Inside Repeater Control Part II?

May 31, 2009

I want to find the values from a number of dropdown and textbox controls inside a repeater control.

db.ConnectionString = SystemConnString
db.Open()
Dim selectedAdTitle As String = ""[code].....

AdTitle and AdFullName dont seem to be bringing across the values. There is no error so they have found the control ok. Below is the ASPX file code.

<asp:Repeater ID="myRepeater" runat="server">
<ItemTemplate>
<asp:DropDownList ID="AdTitle" runat="server">[code]......

View 2 Replies

Limit Space Child Form Can Move Inside Main One?

Mar 25, 2009

I want that the child form's moving space inside the main form would be limited so it wouldn't go over the borders like in the picture.[code]...

View 2 Replies

Make The Controls Inside The Application, Resize According To The Main Window?

Jun 3, 2012

Let's say I make an application where the window (by default) is 1280x720, but the user is able to resize as How can I make the controls inside the application, resize according to the main window?

View 2 Replies

How To Searching Part Of Object Inside Array List Without Looping Method

Feb 10, 2012

I save the client data into an array list. How to find part of data(currentIP) inside the array list(clientList) with fast method? [code]

View 1 Replies

Inside The Service Class, Declare A Class Variable Named Started?

May 8, 2012

Create a class named Service. Inside the Service class, declare a class variable named Started. The datatype of this variable is Boolean.Public Class Service Dim started as Boolean End Class Create a class named Server. Inside the Server class, declare a dynamic array that can contain elements of the type Service.(Note: For convenience, both the array and the variable Started can be accessible from a client program that creates an instance of Server and Service respectively)

Create a constructor for the Service class. When the constructor is executed, it will set the value of the class variable Started to True. Create two new classes: WebServer and DatabaseEngine. Both of these classes inherit from the class Service. Inside the Service class, declare a Sub procedure (method) named Terminate. This method should display the following text Service stopping in a message box when executed.This method can be overridden in classes that inherit from Service class.

Inside both the WebServer and DatabaseEngine class, override the method Terminate inherited from their base class Service. Both methods should first call the base class Terminate method. The messages Web server stopping and Database engine stopping should also be displayed in a message box when the Terminate method for the WebServer and DatabaseEngine are called respectively. These messages should only be displayed if the Started variable inherited from their base class is not equal to False.

Inside the Server class, declare a method named Shutdown. This method does not return any value. When executed, it will call the Terminate method for each of the Service instances (if any) in the arrServices
array. You should call the Terminate method within a For Each loop that loops through the elements of the arrServices array.

In the Sub Main method, create an instance of the class Server. Set the size of the arrServices array in
your Server instance to contain 2 elements. Create first a WebServer instance and then a DatabaseEngine
instance into this array. Call the Shutdown method from your Server instance.

View 7 Replies

Get A Value Inside Parent Class From Child Class (in Nested Classes)?

Jan 1, 2012

I have Class1 and class2 which is inside class1, VB.NET code:

Public Class class1
Public varisbleX As Integer = 1
Public Class class2

[code]....

View 1 Replies

How To Assign A Different Reference To A Class Instance From Inside The Class Code

Jan 18, 2011

my proble is the following: I have a class MyClass and another class Modifier, which has a method ModifyMyClass(ByRef mc as MyClass) that receives a MyClass instance as ByRef parameter to modify it. A smell of the code is:

[Code]...

View 4 Replies

VS 2008 Reference Parent Class From Inside Child Class?

Apr 11, 2009

I have a 'property management class' that contains several functions and properties. I have several other classes that use the 'management class' as a property to derive the value of several of its other properties.Is there a way for me to reference the outer class from the 'management class' functions without having to pass it as a parameter? I ask because several different classes can have this 'management class' as a property and am having a hard time typing the parameter.

View 7 Replies

Access The Base Class Inside A Derived Class?

Oct 22, 2010

How do I access the base class inside a derived class?

View 1 Replies

Handle An Event Raised In Class Inside Own Class?

Apr 14, 2009

I have a "partial" class in VB.NET. Half of it is auto generated by a code generation tool. That half implements INotifyPropertyChanged, so any properties in that part of the partial class raise the PropertyChanged event.In my "custom" part of the class, I declare another property that depends on one of the properties in the auto-generated side. Therefore, when that auto-generated property changes, I also want to raise a PropertyChanged event on my custom property that depends on it.

If I go into the generated part of the class and raise the event there, that will get overwritten if I ever re-generate that part, so I don't want to do that. I would rather add an event handler in my side of the partial class that checks if the generated property changed, and if so, raise another event for my custom property.

[Code]...

I'm assuming it's because normally you'd use the WithEvents keyword to tell the compiler that you're subscribing to events from that object. I don't have a clue how to do this inside of the class that's actually raising the event, or if that's even possible.

View 1 Replies

IDE :: Class Files. Same As Namespace Or The Same As The Class Object Inside?

May 22, 2009

If my namespace is Company.Application.EDI.Acknowledgement and if I stick with theprogramming practice of one class per file then should my class be saved asacknowledgement.vb? Are there any gotchas that will come up?

View 5 Replies

Start Project With Sub Main()?

Mar 7, 2012

I have created one Windows form based VB.Net project in which I want to start my project with Sub Main()

I have added one module and created one Public Sub Main() method but when I am trying select Sub Main from Startup form, I am not getting the method there. I am using VS 2010

View 4 Replies

Unable To Publish Main Project

Aug 31, 2009

Since I'm unable to publish my main project, I've decided to start from scratch to see if I can locate the problem. I created a brand new project, just a simple form and dragged 4 controls onto it (a label, a button, a combo box and a checkbox). There is no code in any of the controls.I published this using Clickonce at url...(I'm aware people may not be happy clicking links). It's set to run only from the webpage. It runs fine on this PC, but on my friends PC and on my spare PC, it simply churns up a page of html error codes.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved