Jump to content
Xtreme .Net Talk

Machaira

Avatar/Signature
  • Posts

    330
  • Joined

  • Last visited

Everything posted by Machaira

  1. What's the Call Stack look like when it hits this line? Are you in the middle of destroying the ActiveForm?
  2. Try this: Private _data() As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim iLp As Integer Dim total As Integer If _data Is Nothing Then ReDim _data(0) Else ReDim Preserve _data(_data.GetUpperBound(0) + 1) End If _data(_data.GetUpperBound(0)) = TextBox1.Text For iLp = 0 To _data.GetUpperBound(0) total += CType(_data(iLp), Integer) Next iLp Label1.Text = total.ToString Label2.Text = (total / _data.GetLength(0)).ToString End Sub
  3. While you can run .NET applications on Win98, it doesn't support the SDK, so I don't see how SharpDevelop would work. See .NET requirements here
  4. Not sure why you're trying to use an array of TextBoxes. Here's how I would do it (one TextBox on a form): Private _data As New ArrayList Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim iLp As Integer Dim total As Integer Dim average As Single _data.Add(TextBox1.Text) For iLp = 0 To _data.Count - 1 total += CType(_data(iLp), Integer) Next iLp Label1.Text = total.ToString Label2.Text = (total / _data.Count).ToString End Sub Or, even easier: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Static count As Integer Static total As Integer count += 1 total += CType(TextBox1.Text, Integer) Label1.Text = total.ToString Label2.Text = (total / count).ToString End Sub If you're using .NET, there's no reason to use regular arrays that you have to manually resize. Let .NET handle it for you. :D :cool:
  5. If you have parent child tables in your dataset the datagrid should automatically handle displaying them correctly.
  6. I don't believe that's the purpose of the PropertyGrid. It's just meant to modify properties.
  7. One thing - don't name your object instances the same as the class name. Ex: Dim dsOrderItems As New dsOrderItems change it to something like: Dim ds As New dsOrderItems
  8. Umm, what is that supposed to do?
  9. Piece of cake: Private _frm As New Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click _frm.Show() _frm.Location = New Point(Me.Left + Me.Width, Me.Top) End Sub Private Sub Form1_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Move _frm.Location = New Point(Me.Left + Me.Width, Me.Top) End Sub Note: this only keeps the 2nd form docked if you move the first form. If you need it to snap back to the first form when you move the 2nd, pass a reference to the first form in the constructor: Dim _frm As New Form2(Me) Keep the reference as a member of Form2 (call it _frm). In the Form2 Move event just do: Me.Location = New Point(_frm.Left + _frm.Width, _frm.Top)
  10. Any reason you're using a ListView? Sounds like a grid would be a better choice.
  11. Gee, I thought that's what I said. ;) :cool:
  12. Yeah, that's more efficient and clean. That's what I get for coding off the top of my head. :)
  13. Try creating a datatable from the MSSQL table where you're going to store the data, create a database from the XML, and add the rows in the XML datatable to the MSSQL datatable (create a row from the MSSQL datatable and copy the items from a row in the XML datatable to this new row, then add the new row to the MSSQL datatable). I don't believe you can do it as simply as you're thinking.
  14. Sounds like you don't have a reference to the DLL containing "com"
  15. Between this post and the one regarding the PropertyGrid I have to think maybe you're asking the wrong questions. What exactly are you trying to do?
  16. I would imagine you'd have to have an object that had a DateTime as a property.
  17. Dim list As String() = New String() {"list1", "list2"} Dim dt As DataTable Dim iLp As Integer 'presumes table is filled before this For iLp = 0 To dt.Rows.Count - 1 ReDim Preserve list(list.Length) list(list.Length - 1) = dt.Rows(iLp).Item(0) Next iLp BTW, why are you using a recordset in .NET?
  18. No programming language that I know of requires run time files. A company's implementation of that language may however. :) Also, it depends on what you're including in your application. A "Hello World" application wouldn't require anything extra, but a database app might. C/C++ is probably the language with the least dependencies.
  19. See attached.WindowsApplication1.zip
  20. I believe there's a Sprite class in D3D that you can use for drawing 2D images. It's pretty simple from what I remember.
  21. Trying to open the file every few seconds in a loop would probably work. Once you're able to open it, the copy should be complete.
  22. Take a look at the .NET Compact Framework.
  23. I'm running SP2 on both my laptop and desktop and I have no problems with it. I'm assuming the install runs correctly?
  24. Basically .NET takes care of all the details. It creates template insert, update, delete statements and executes the proper one for each row. It knows what has been changed for each row and inserts the data for the query.
×
×
  • Create New...