avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday January 20, 2021, 1:17 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - rht341 [ switch to compact view ]

Pages: [1]

Excel itself can open DBF files.  Try Open and change the file types drop down to dBase files (.dbf).  That's the way it is in Excel 2007, i believe it is available in earlier versions of Excel as well.


Yes, you have to declare a special constructor (New) and have a private variable in the class:

Public Class MyClass
    private _tx as TextBox

    Public Sub New(ByVal txtBox as TextBox)
        _tx = txtBox
    End Sub

    Public Sub MyFunction(ByVal someText as String)
        _tx.Text = someText
    End Sub
End Class


There is more than one way to do this; one is to have the runfunction method take a TextBox as a parameter:

textbox.text = "";
Class class = new Class();

public void runfunction(TextBox tx)
 tx.text = "Some text"; // This would never work, but how could it?

Developer's Corner / Re: c# assignment: Problem with random
« on: March 20, 2008, 10:59 AM »

You need to supply the Random constructor with a seed value.  See http://msdn2.microso...ibrary/ctssatww.aspx for examples.

I'm trying to pick two random numbers for assignment 5 of the c# school. I'm using the following code

Code: C# [Select]
  1. private void fillFirstBoxes()
  2.         {
  3.             userCard1Text.Text = Convert.ToString(functions.GetRandomCard());
  4.             dealerCard1Text.Text = Convert.ToString(functions.GetRandomCard());
  5.         }
  7. ...
  9.     public class Functions
  10.     {
  11.         private int RandomNumber(int min, int max)
  12.         {
  13.             Random random = new Random();
  14.             return random.Next(min, max);
  15.         }
  17.         public int GetRandomCard()
  18.         {
  19.             int[] cards = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10 };
  20.             int random = RandomNumber(0, 12);
  21.             return cards[random];
  22.         }
  23.     }

The trouble is that 90% of the time the two numbers are the same. Occasionally (about 10% of the time) the numbers are different but it is rare. So what am I doing wrong?

I know that computer random isn't really random, but surely it only takes a tick?

-mediaguycouk (March 19, 2008, 05:21 PM)

As a last resort, if normal uninstall does not work, you can try the tool mentioned here (it helped me when I had a similiar problem):

Take your time and be very careful!


N.A.N.Y. 2008 / Re: AccuTicket v1.0 - Free Ticketing Software
« on: December 29, 2007, 09:30 AM »

This is from memory, but in .NET there is a GetExecutingAssembly() function that will return the full path of the excecutable that is running.  This could be used to set/get data files.

Hope this helps.



Maybe NetStumbler is what you're looking for.  I don't have the link handy, but a search should come up with it.


Pages: [1]