Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. Try adding the line Redim Preserve aryOrder(intI) before you set the stuff in the array.
  2. It all depends on what you're going to be using it for. ArrayLists can be used like collections, where you can add, remove and insert objects of any kind. Arrays are generally best if the data is going to be accessed by index, because the index of an item in an array won't change; ArrayList items can be removed, which will renumber all of the items in the ArrayList. You don't use one instead of the other, as they both have their places. ArrayLists are good for storing a collection of objects, arrays are good when you need to have an index->data relationship (just one example).
  3. Wow, I just downloaded it and ran it against Microsoft's System.dll namespace; lots of errors! :eek: :D I'll have to try it with one of my components.
  4. All of the iostream functions are stored in the std namespace; if you type std:: in the IDE, an intellisense list will pop up. using namespace in C++.net is like Imports in VB.NET and using in C#.
  5. You will probably need to add the line using namespace std; to your code (under the using namespace System; line, if it's there).
  6. I don't know much about threading, but I believe that in this case, you could create a new thread for each MessageBox and they would all show. In this example, both MessageBoxes show simultaneously: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim t As New Threading.Thread(AddressOf MyOtherThread) t.Start() MessageBox.Show("The first messagebox") End Sub Private Sub MyOtherThread() MessageBox.Show("The second messagebox") End SubYou can read about multi-threading in the MSDN.
  7. I always use _memberVariable; as much as I dislike using underscores in variables, it works.
  8. Well, I don't know much about W2K Terminal Server, but it might have some sort of protection against processes killing other processes.
  9. Does the user that you are logged in as (in Windows) have the appropriate permissions to do that (as in kill other processes)?
  10. You can use the Convert class in place of all of those functions, and DirectCast in place of many CType calls. No need for CStr at all.
  11. http://www.xtremedotnettalk.com/online.php?s= It's on the bottom of the main index. :)
  12. Just call the handler sub from code. You need to pass an EventArgs object though. Like this: Private Sub ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim eArgs As New ToolBarButtonClickEventArgs(ToolBarButton2) ToolBar1_ButtonClick(ToolBar1, eArgs) End Sub
  13. Then are you sure that your sqlConn is indeed null? Try setting the declaration line of 'sqlConn' to SqlConnection sqlConn = null;
  14. if (sqlConn == null) { /* create connection */ }
  15. [edit] Divil here - Invading Volte's post! This thread was split off from an older one which didn't need to be dug up [/edit] This thread is like 5 months old; no need to dig up threads that old. Don't worry though, I just about dug this thread up by accident as well; saw someone looking at it on Who's Online and clicked the link from there. Good thing I noticed the date on the post. :)
  16. Your code works just fine for me. Try putting a MessageBox.Show("test') inside the Paint event just to ensure that it is actually firing. Perhaps the event is hooked up incorrectly.
  17. Hmmm. Well, IsNumeric turned out to be in .NET after all; trouble is, I don't know if it's a "real" .NET function, or one of those backwards compatable VB6 ones. It's in 'Microsoft.VisualBasic.Information', so it seems like it would be a VB6 back-compatable function... :-\ In any case, hog's method will work.
  18. Dim newColor As Color = ControlPaint.Light(Color.Red, 0.5) Lightens the color (red) by 50%. Then newColor contains the light red.
  19. Use a function like this to test if it's a number: Private Function IsNumber(ByVal str As String) As Boolean Try Dim temp As Integer = Integer.Parse(str) Catch ex As Exception Return False End Try Return True End FunctionAlso, you can set the MaxLength property for the TextBox to 10.
  20. To use that method you need to add a refernce to shdocvw.dll, and I have no idea where in windows it is. Just stick to the Process.Start way, and you'll be fine. :)
  21. Yes, you should use BinaryWriter. The FileOpen, etc. commands are only for backward compatability and should be avoided. There's lots of info the in MSDN about it.
  22. Also, instead of using INI files, I would recommend using XML files instead, as .NET has native support for them. Read in the MSDN about the System.Xml namespace.
  23. :D :) Glad it worked for ya. :)
  24. Is CData() giving you intellisense when you do the '.' after it? Value is not capitalized, which would lead me to believe it's attempting to Access CData an an Object. Try arr(iRow, iCol) = CType(CType(CData(iRow, iCol), Excel.Range).value, String)
  25. OK, then, is arr() an array of Strings, or what?
×
×
  • Create New...