Search results for query: *

  1. Bob Langlade

    Retrieve values from objects between forms

    Using "F1" (online help) you usually get a good information. Considering that you have a textbox named textbox1 on the form from which you want to retreive or set the text : Public Property MyText() As String Get Return TextBox1.Text End Get Set(ByVal...
  2. Bob Langlade

    Retrieve values from objects between forms

    By using properties.
  3. Bob Langlade

    Question How compare a control is TextBox using If?

    If TypeOf (_EditControl) Is TextBox Then
  4. Bob Langlade

    Answered String with Tab Delimited Data

    How about the split function?
  5. Bob Langlade

    remove first occurence white spaces

    Hi, This will even work with more than two spaces : Public Function RemoveDoubleSpaces(ByVal MyText As String) As String Dim Temp As String = "" Dim SpaceAlreadyFound As Boolean = False 'Flag For Each c As Char In MyText If c = " " Then...
  6. Bob Langlade

    Chrono problem

    One of the solutions would be to use the stopwatch object : Dim Chrono As New Stopwatch Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Chrono.Reset() Chrono.Start() End Sub Private Sub...
  7. Bob Langlade

    Writing to file problem...

    Yes it's working, but you can convert your item to string only once. TextBox1.Text = "" 'To Clear the textbox if the file doesn't exist Dim Item As String = ListBox1.SelectedItem.ToString If System.IO.File.Exists(Item) = True Then Dim objReader As New...
  8. Bob Langlade

    Writing to file problem...

    Dim file_name As String = "c:\Test.txt" Try Dim objWriter As New System.IO.StreamWriter(file_name) For Each item In ListBox2.Items objWriter.WriteLine(item.ToString) Next objWriter.Close() Catch ex As Exception...
  9. Bob Langlade

    Removing the Items from ListBox or ComboBox

    Yes, you can remove your datasource and fill your listbox using the add function (ListBox1.Items.Add("Your Item")) in a loop.
  10. Bob Langlade

    Removing the Items from ListBox or ComboBox

    Since your listbox is binded to a datatable, it seems that the only way to remove your items from the listbox is to remove them from the datatable.
  11. Bob Langlade

    Question Edit a listbox item...

    It seems that when you are removing an item from a listbox, you raise the selectedIndexChanged a second time (you have one less item). You can solve this problem by removing the handler to the procedure listening to the event before removing the the item, and then reasigning it. Private...
  12. Bob Langlade

    Question Trouble with date formation

    Just a variation from Scotty's Code: Public Function SpecialDate(ByVal Mydate As String) As String Dim _Date As Date = CDate(Mydate) With _Date Return String.Format("{0}{1}{2}_{3}{4}{5}", _ .Day.ToString("00"), .Month.ToString("00")...
  13. Bob Langlade

    Pls help me code for linq

    Here are a few videos that will help you learn link : http://msdn.microsoft.com/en-us/vbasic/bb466226.aspx#linq
  14. Bob Langlade

    Queues

    Here is a sample of an object using a queue, in Form1 there are only two controls : Textbox1 and Button1. Public Class Form1 Dim Myqueue As New Queue Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Myqueue.Enqueue("One")...
  15. Bob Langlade

    how to reference a textbox

    That might not work with nested controls : Dim Ctl As Control Dim MyTextbox As TextBox For i As Integer = 1 To 30 Ctl = Me.Controls.Item("Textbox" & i.ToString) If Ctl IsNot Nothing Then MyTextbox = CType(Ctl, TextBox)...
  16. Bob Langlade

    Column order in Datagridview with LinkToSQL

    I eventually got the answer on a French Forum, you can modify the position of the columns by using the DisplayIndex property::) Dim Db As New SageDataContext Db.DeferredLoadingEnabled = False Dim Elements = From Customers In Db.F_COMPTET _ Select...
  17. Bob Langlade

    Column order in Datagridview with LinkToSQL

    Hi, I am trying Link to SQL in VB 2008 as it seems a promising feature. I have added a LinkToSql class (name Sage.dbml) to my project with all the databases in needed from my SQL Server. I then perform this simple code to populate my datagridview : Dim Db As New SageDataContext...
  18. Bob Langlade

    Cant Find Crystal Report template in ADD NEW ITEM.... Plz Help

    I think that Crystal Report is not included in the Express version.
  19. Bob Langlade

    VS.NET from .NET Framework 1.1 to 2.0

    Please edit your profile and change your framework to 1.1, this way your question will be less confusing.
  20. Bob Langlade

    VS.NET from .NET Framework 1.1 to 2.0

    If you are using VB 2005, Framework 2.0 is already installed.
Back
Top