1. Marie-Andree

    calculate timespan (days) between 2 dates from timepicker in a class

    Hello, I am trying to pass 2 variables check in date and check out date from 2 different date time picker on a form. The goal is two calculate the number of day between the 2 dates. Here is what I have so far: From the form: Public Class FormReservations 'Declare the new objects: Private...
  2. S

    Question 2d scrolling game, bullet class

    Hi, I am making a 2d side scrolling game and the basic idea is that you are flying arround with your character and at the ground there are enemies shooting bullets to the top of the form. I made a class that makes the bullets from a picturebox. This is how the class looks like: Public class...
  3. L

    Tip Your own Linked List Class

    I will just leave a simple example of a linked list class. Public Class Node Public NextNode As Node Public Val As String End Class Public Class List Public FirstNode As Node Public Sub Add(ByVal val As String) 'Add new node at the beginning of the list Dim...
  4. K

    Question Sharing a Database Connection String between Classes in another Library

    I'm not sure if the title is very good, I'll explain. Maybe I'm thinking about this too much, but lately I've been really trying to construct well designed classes and libraries. Anyways, I'm trying to design a library which basically handles all of the communication to a particular database...
  5. C

    Tabpage Class Exampl

    Hi i want to make a custom tabcontrol for my application can someone please show me an example of class programming this is what i have so far: Imports System.Drawing.Drawing2D Class MyTabControl Inherits TabControl please help me ASAP i havent done this before.
  6. L

    Class, class inheritance, list box

    I've created a Form that allows a user to enter two numbers, one in each textbox. There is an add/subtract/multiply/divide button. The user then presses Save to save the equation, and Display to display the entire equation in the listbox, which can store up to ten equations. I am to use a class...
  7. M

    Question Something like ENUM but dynamic

    Hi all, I have a problem that bother me and I wonder if I can get some sugestions here! I have to build a dll which will expose some functions to users! I have to use for some of the functions parameters some guidance for users( like ENUM does), in order to remove inserting wrong data! ENUM is...
  8. jmfrank63

    Question DateTime as Optional Parameter in Constructor

    Hello Community, this is my first time and my first question, so if I do something wrong please notify me. I am trying to build a class with a date as optional parameter. If none is given the current date shall be assumed. Since optional parameters require a default value I tried the...
  9. N

    Question Class Build Order

    I have several classes in my solution that depend on each other, so the classes need to be built in a certain order for the solution to work. How can I force one class to be built before it tries to build another? Thanks.
  10. VBobCat

    Question How to identify one given instance from a class when debugging?

    Hello people, I wrote a class that helps me to validate entries on textboxes and comboboxes. The constructor takes the control to be validated as parameter, so the class can handle some of its events. Then, each Form declares so many instances of it as the number of controls that require...
  11. VBobCat

    Question How to cancel class' construction?

    Hello people, I have a class which is constructed by a Sub New with parameters. In this sub, these parameters are used to query a database in search of data that will define new class' properties. Though unlikely, it may happen that the query returns no elements with such combination defines...
  12. N

    Multiple levels of inheritance with UserControl

    I want to create a control from UserControl, and then have another class or control inherit that. Basically, I want the following: Public Class MyBaseClass : Inherits UserControl Public Class MyControl : Inherits MyBaseClass I am having trouble doing this, but I am not sure what I am missing...
  13. V

    Question What is the entry point of a VB program?

    I was playing with VB.Net yesterday using Visual Studio Express (VSE). I am trying to get a feel for the language. One thing that struck me was the fact that VB's entry point, Sub Main(), is written inside a Module, as opposed to inside a Class like in C#. At least that's how it appears in...
  14. N

    Question Specifying the name used for the JavaScript class

    I am creating a WebService using the following: <%@ WebService Language="vb" CodeBehind="~/MyWebService.asmx.vb" Class="myprojectname.MyWebService" %> This works fine, except that it names the generated JavaScript class "myprojectname.MyWebService" (which is longer than I would like), but I...
  15. S

    Question class decelerarion as array

    Hai all I have done developments using class module and property. I have done the deceleration as follows in VB6. VB6 deceleration Public BomMatList() As New MaterialList After this deceleration i use BomMatList as array as follows...
  16. M

    Question How to set and get a value from a class property within the main event of a module ?

    Hi, I started as a part-timer in my current job( developer - windows forms) 6 months ago and now I'm stuck with a major problem... My boss gave me the project he was working on, my problem there is: the project uses a submain as startup object which is located in a module, thy so the...
  17. S

    Changing structure of an arraylist

    Hi all, thanks for any help in advance! I have created a Class Library (dll) with a module and a class in it. The module declares a structure, and an instance of this structure. In the class, there is an arraylist declared. My main program calls a function in the class library class. The...
  18. V

    Question Excel - Copy method of Range class failed

    Part ot my program is to simple copy a range of cells ~21 000 rows from one WB (oSH) and copy it to another WB (oSHOut). I've red a lot of posts,tried a lot of variants, but nothing helps. Strange here is that if I copy less than 8500 rows, the paste to the destination range is OK. But if I...
  19. C

    Question Class and Array Error

    Hello. Can you help me please Public Class qqq Public xxx as string End Class 'This block form1 Public Class main Public aaa() as qqq Public Sub www() redim aaa(3) Dim bbb as qqq = new qqq bbb=qqq(1) 'Error Line end sub end class Thanks.
  20. punto13

    Invoque a Save method from child class

    Hi all, I've been working with a lot of APIs from diferent products. Now that I'm building my own, I have a .... 'arquitecture issue'. What I see in others and try to imitate is: CoreAnimalEngine (a class that manages all. The collections of items and most important, all the activity to...