Search results for query: *

  1. S

    Using Structures in Class Module

    Like so: Public Structure DataRange Public Min As Integer Public Max As Integer Public Val As Integer End Structure Public Class MyCalcs Private MyValues As DataRange Public Property Min() As Integer Get Return MyValues.Min End Get Public Property Max() As Integer Get Return MyValues.Max End...
  2. S

    Read and Write to a file

    If you provide your code that is causing the problem, I can help. I have an idea as to what your problem is, but without your code to see exactly what is going on, I'm just guessing.
  3. S

    VB 2005 question regarding reading text files

    I don't think there is an "easy" way to do what you want. The problem is that the "start" point is not clearly defined. If you had some mathematical way to determine (based on file size) where to start, then a StreamReader/FileStream object might be able to do what you are asking.
  4. S

    need help with these errors

    I would recommend you take some classes on OOP in general or, at a minimum, read some online tutorials.
  5. S

    Outlook Express password encryption?

    I am writting an application that will set-up an e-mail account on outook express. This is for the company I work for. We get a lot of calls from customers having problems configuring e-mail clients to use with our mail server. We would like to diminish this with an auto-set-up app. I know...
  6. S

    Trace Route Program

    I figured it out. I can use the Ping() class. Here's the idea: Dim pinger As New Ping() Dim reply As New PingReply() Dim options As New PingOptions() Dim buffer() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes("Hello") options.DontFragment = True Dim i As Integer For i = 1 To 30 'Max...
  7. S

    Strange IP address format?

    You can try the IPAddress.Parse() method.? This method will return an IPAddress object. I don't know if it supports IPv6, but you can try. Try: t.Connect(IPAddress.Parse("ipv6 address string"), port)
  8. S

    Strange IP address format?

    One of the overloads for the Connect() function takes the dns name for the host you want to connect to: Dim t As New TcpClient() t.Connect("www.yahoo.com", 9999)
  9. S

    Trace Route Program

    I'm trying to write a trace route program. It needs to return: Address of each hop Time to each hop Total number of hops Total round trip time I first thought that the Ping() class would be useful, but only for counting hops. I need some ideas on how to do this. Scott D.
  10. S

    Modulus11

    Here is a static class that will 1) calculate check values and 2) check a given ISBN for validity. Public Class ISBN Public Shared Function IsValid(ByVal number As String) As Boolean Return number.Length = 10 AndAlso number.Chars(number.Length - 1).ToString() =...
  11. S

    Array----how to clear it

    Array.Clear(<array name>, <start index>, <number of elements to clear>)
  12. S

    Modulus11

    Now that I actually read through the whole page that I posted, I think I see what your question is. You want to check the validity of the input number before querying the DB? If so, you'll have to write the algorithm and use the appropriate return value to determine if the number is valid before...
  13. S

    Modulus11

    I'll take a stab at this I assume that when you say "populate" that you are running an SQL query on a database? If so, this shouldn't be too difficult. Assuming that you know how to construct queries in your table adapter, all you need to do is parse the input textbox, run a "Modulus 11"...
  14. S

    Saving, Loading and dislpaying information in a mulit-form project

    Are you saving the info to files? Database? What exactly isn't working on your second form? A little more detail and I can probably help.
  15. S

    Storing pairs of integers

    Even easier (PairsCollection class; use the same IntPair class): <System.Serializable()> Public Class PairsCollection Inherits System.Collections.ObjectModel.Collection(Of IntPair) End Class Use like this: Dim pc As New PairsCollection pc.Add(New IntPair(x, y)) .... ' access pairs...
  16. S

    Validation help with text box

    Try this: Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Not e.KeyChar.IsLetter(e.KeyChar) AndAlso e.KeyChar <> ControlChars.Back e.Handled = True End If End Sub
  17. S

    Storing pairs of integers

    Try this: <System.Serializable()> Public Class IntPair Private _x, _y As Integer Public Property X() As Integer Get Return _x End Get Set(ByVal value As Integer) _x = value End Set End Property Public Property Y() As...
  18. S

    Option Strict On

    Formatted your code to make it easier to read and added some comments (suggestions). Public Function TicketPrice() As String ' <---- this is the return type If mstrDestination = "Washington,DC" Then ' ************ ' Don't return like this, use Return <something>...
  19. S

    Class/Constructor Question

    Glad to help!
  20. S

    Class/Constructor Question

    Almost forgot: ' reset PurchaseObject object Me.po = New PurchaseObject Add this at the bottom of the resetButton_Click() event handler. This will clear all of the data for the purchase object. I edited my previous post to reflect this change.
Back
Top