Search results for query: *

  1. Josaph

    capital letters

    Yes, use .ToUpper. (ie: TextBox1.Text = TextBox1.Text.ToUpper()) I'm not sure if there is a built in function to do this in .NET as I couldn't see one. I'm sure someone will correct me if I'm wrong. But this is what I did. Dim Words() As String = Split(TextBox1.Text, " ")...
  2. Josaph

    Sorting Columns

    You need to add "Order By tblBooking.[BookingID] DESC" to the end of your SQL. This will put the record list in a descending (DESC) order which would show you the most recent added record first.
  3. Josaph

    Getting a varible on another form

    Bob, I definitely see the advantages of using the properties. I was just wondering what the disadvantages of using a public variable were. Thank you,
  4. Josaph

    Getting a varible on another form

    Good call. But just so I know, what is the negative effect of accessing a public variable as opposed to a public property accessing the private variable? Is it just improper coding, or is there a negative effect? I personally don't know this one. Thanks,
  5. Josaph

    specify the mail server address

    There may be something in .NET 2.0 that will pull this information for you, but I am not that familiar with 2.0. Perhaps someone else can point you in the right direction.
  6. Josaph

    Running Totals

    Did you defined the variable runningtotalofbooking before your loop? You can also use the += on runningtotal instead of typing the variable twice with a + sign. (ie: runningtotalofbooking += totaloftraveler) Dim runningtotalofbooking as Decimal Do until (some condition) Dim...
  7. Josaph

    specify the mail server address

    I'm sorry, I don't know how else to explain it. Your friend needs to find out his own SMTP server and tell you what it is. This is of course, if your friend knows your are putting this program on his computer.
  8. Josaph

    Getting a varible on another form

    You would need to make it public first of all, then you need to send the instance of Form1 to Form2 so it can access it. When you create an Instance of Form2 you can set it's Owner property to Form1. This way you can reference it later. Now, there may be a better way of accomplishing this that...
  9. Josaph

    specify the mail server address

    The server is the PC in which the SMTP client resides. If your email is hosted by another company you would put the SMTP information as the server. For example: (smtp.hotmail.com) <-- use your SMTP server here. Whoever provides your email can tell you this.
  10. Josaph

    Seeing if a file exists

    Like Paszt said, if you use the ReadAllText(filename) method, you can read the entire file into your variable. Then you can use a split command to separate the lines. Dim myLines() as String = Split(myVariable, Environment.NewLine) If you really want to step through the file, you need to use...
  11. Josaph

    how to minus two times

    Dim Date1 As Date = #10/10/2006 1:00:00 AM# Dim Date2 As Date = #11/10/2006 12:00:00 PM# Dim Time As TimeSpan = Date2.Subtract(Date1) MsgBox(Time.Hours & " hour(s) and " & Time.Minutes & " minutes.")
  12. Josaph

    Visual Studio error messages

    I would try to delete the bin and obj folders in your project and then rebuild the application and see if that works.
  13. Josaph

    specify the mail server address

    MSDN to the rescue http://msdn2.microsoft.com/en-us/library/k0y6s613.aspx Parameters host A String that contains the name or IP address of the host computer used for SMTP transactions. Remarks The host parameter is used to initialize the value of the Host property. The Credentials...
  14. Josaph

    Fixed Field Lengths

    Other than those two suggestions, is this a viable solution to control fixed length strings in .NET?
  15. Josaph

    ContextSwitchDeadlock was detected

    Are you using threading in your application? I will not pretend to know completely the origin of the error message, but it sounds like your application is taking a long time to complete a process and you aren't sending messages to Windows letting it know that it's still working. Threading this...
  16. Josaph

    Module in VB.net

    I'm not sure if this is the best approach, but if you wanted to send multiple forms to the same method you could do the following. Friend Sub Test(ByVal Frm As Object) If TypeOf Frm Is Form Then Dim tmpForm As Form = CType(Frm, Form) If tmpForm.Name = "Form1"...
  17. Josaph

    Seeing if a file exists

    Dim myVariable as String myVariable = sw.ReadLine()
  18. Josaph

    How to bind constants to the designer completion menu

    Are you talking about enumerations? Public Enum MyButtons OKButton = 0 CancelButton = 1 YesButton = 2 NoButton = 3 End Enum Private Sub DisplayMyButtons(ByVal ButtonType As MyButtons) MsgBox("You selected " & ButtonType.ToString) End Sub...
  19. Josaph

    Fixed Field Lengths

    In a majority of the projects I need to export data in a fixed field length style with no delimiters. When I switched over to .NET I noticed this capability was removed. I am hoping that I can get some constructive feedback on this example I have put together to see if it's an optimal solution...
Back
Top