User Profile

Collapse

Profile Sidebar

Collapse
lab3terch
lab3terch
Last Activity: Dec 7 '06, 06:53 AM
Joined: Oct 31 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lab3terch
    replied to drawing in a picturebox
    For some reason my text did not post with the code - so here it is! I am finishing up a class in VB and would like some assistance in a program. I need to do the following: the user needs to select a drawing tool, line color and line width (have these displayed in comboboxes). when they click draw they can draw using the selected items and with the drawing start with mouse down and end with mouse up. I am able to get a drawing in the picture box,...
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic drawing in a picturebox

    drawing in a picturebox

    Imports System.Drawing. Graphics

    Public Class Form1
    Inherits System.Windows. Forms.Form
    Dim x1, y1, x2, y2 As Integer
    Dim red, black, blue, green, orange As Color
    Dim x, y, w, h As Integer
    Dim rectangle, freehand As Graphics
    Dim line As Graphics
    Dim wide, n As Integer
    Dim myPen As Pen

    #Region " Windows Form Designer generated code...
    See more | Go to post

  • Thank you so much for your message. I will try your suggestions this afternoon and let you know what happens.
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic entering file contents into an array

    entering file contents into an array

    I am a student finishing a class in Visual Basic, and would like some assistance with a program I am working on. I need to read the contents of a file (showing makes of cars on one line and a daily rental fee on the following line) into an array and then display the file contents in a list box. The user then chooses the car he/she wants to rent. I then need to obtain the rental fee from the array and use that value to calculate the total rentals....
    See more | Go to post

  • lab3terch
    replied to enhanced button control
    I GOT IT TO WORK!! I wrote a function to store the new value and that did the trick!!...
    See more | Go to post

    Leave a comment:


  • lab3terch
    replied to enhanced button control
    I am still havingn problems with this - I can get the counter to increase by one for a button click, but I cannot get the clicks stored so they will be used to increment the next button click.
    I have done the following code:
    Private Sub button1_Click(B yVal sender As Object, ByVal e As System.EventArg s) Handles Button1.Click

    Dim totclicks As Integer
    Dim n As Integer
    Do
    ...
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic problems with enhanced button control
    in .NET

    problems with enhanced button control

    I am using Visual Studio.NET 2003 and have built a enhanced button control (enhbutton) to capture the number of times the button has been clicked. I did the code and did a build. I then added a test program (buttontest), added the enhbutton control and set buttontest as the startup program. I cannot get the number of times the button is clicked to display on the face of the button. A 0 is put in by the enhbutton code as the starting point. My code...
    See more | Go to post

  • lab3terch
    started a topic enhanced button control that counts clicks
    in .NET

    enhanced button control that counts clicks

    I have built an enhanced button control which I want to use to capture the number of times the button has been clicked. I have added the new control to a test program but cannot get it to work. The code for the enhanced control is as follows:

    Private Sub EnhBtn_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles EnhBtn.Click
    End Sub
    Public Property totclicks() As Integer
    Get
    Dim n As...
    See more | Go to post

  • lab3terch
    replied to enhanced button control
    Thanks for your help! Please accept my apologies for posting to the wrong forum. I use both .NET 2003 and VB 2005 and sometimes get confused! I will also post to the correct forum. Again, my thanks and apologies....
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic enhanced button control

    enhanced button control

    I have built an enhanced button control which I want to use to capture the number of times the button has been clicked. I have added the new control to a test program but cannot get it to work. The code for the enhanced control is as follows:

    Private Sub EnhBtn_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles EnhBtn.Click
    End Sub
    Public Property totclicks() As Integer
    Get...
    See more | Go to post

  • lab3terch
    started a topic format for datetimepicker

    format for datetimepicker

    I am working on a program where I have two datetimepickers and need the difference in days between the two dates. I have the format property for both set to short. When I add the datetimepicker to a label it prints as 12:00:00AM instead of as a date.. How do I format this to return tghe day of the month selected in the picker?

    Dim d1 As Date = DateTimePicker1 .Value
    Dim d2 As Date = DateTimePicker2 .Value
    ...
    See more | Go to post

  • lab3terch
    replied to VB.NET: testing a custom control
    in .NET
    I have now got the text names for the labels to be filled in by the control when the test program is run. The problem now seems to be with the code I have for the total number of days between the datetimepicker1 (date1) and datetimepicker2 (date2). In an attempt to find the problem, I selected date1 to print and got a value of 1200 AM so apparently need to do a conversion somewhere to get just the date. The code is below:

    Public...
    See more | Go to post

    Leave a comment:


  • lab3terch
    replied to VB.NET: testing a custom control
    in .NET
    Yes,, I have the control on the form and have referenced the test project to the control....
    See more | Go to post

    Leave a comment:


  • lab3terch
    replied to VB.NET: testing a custom control
    in .NET
    I got a message that what I entered had not been declared. I entered thwe name of the control.totdays , or daterange.totda ys. I put this in the click event for the button in the test program....
    See more | Go to post

    Leave a comment:


  • lab3terch
    replied to VB.NET: testing a custom control
    in .NET
    Tried that - still did not work....
    See more | Go to post

    Leave a comment:


  • lab3terch
    replied to VB.NET: testing a custom control
    in .NET
    My intent is to take the totdays from the custom control and then multiply it by 50 in the test program. I am using VB 2003 for this exercise....
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic VB.NET: testing a custom control
    in .NET

    VB.NET: testing a custom control

    I am having difficulties getting the date interval to calculate and to get the text added to the labels. I know the code in the test program works if I get the total days, so the problem is with the code for the control. When I print Date1 I get 12:00 AM but cannot seem to get the datetimepicker to use dates in the calculation.

    Thanks for your willingness to help!


    The code for the custom control:
    ReadOnly...
    See more | Go to post

  • lab3terch
    replied to calculating interest
    Thank you so much for your guidance! Works fine now and I have learned something new!!
    See more | Go to post

    Leave a comment:


  • lab3terch
    started a topic calculating interest

    calculating interest

    I am working on a program in which the user enters an amount of money in a textbox, selects a beginning and ending date using the datetimepicker, and then the program calculates the new amount based on an interest rate of 1% compounded monthly. The code I have written is as follows:

    Public Class Form1

    Private Sub cmdCompute_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles cmdCompute.Clic k...
    See more | Go to post

  • Thanks for your help! The problem was not in the code, but in how I was getting the results; what you gave me solved that problem (many thanks!!!)...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...