Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. I use single-letter prefixes for common types: iInteger sString pIntPtr and double-letter prefixes for structures, classes and uncommon types: scMain (instance of Subclass) dtTime (instance of DateTime class) I mean come on... do you really need 3 letters?
  2. You had spaces between the apostrophes and the text. A difference of " text " and "text". *Shrug*
  3. If that's how you need to look at, then yes, it is. ;)
  4. strSQL = "SELECT DATE FROM Shipping WHERE SHIP_TO = '" & strSelection & "'"
  5. Here's a size chart: 4 = Large 3 = Medium 2 = Small 1 = Bucky
  6. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=49315
  7. System.Drawing.Image.FromFile() System.Drawing.Graphics.DrawImage()
  8. And for God's sake get rid of the "On Error Resume Next" line. Use a Try/Catch block instead, only if need be.
  9. You never redimension the array. As it stands it'll always have zero elements. No elements equates to no forms.
  10. Dim sWords() As String = InputText.Text.Split(" "c) MessageBox.Show(sWords.GetUpperBound(0).ToString(), Application.ProductName)
  11. Say you have a class named myDog. You take the class myDog, along with all its properties, such as size and color, and persist it in a format that can be saved to a file or sent over a network. It's basically like taking a live dog, and saving it to a file. Of course you can also deserialize what's been serialized, essentially taking the file and turning it back into the class myDog. If you're further interested in the topic, you'll discover both binary and XML serialization. Binary serialization can save an object to memory, save it to disk or send it over a network. XML serialization saves the object in a format that is human readable, such as the following: <dog> <color>black</color> <size>4</size> </dog> It's a fairly useful technology. Learn more about it in MSDN: http://ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpovrserializingobjects.htm
  12. Mmm hmm! Sing it sista! Heh heh.
  13. ADO.NET thank you very much! ;)
  14. You've got to be kidding me. Just change the names of your objects, table names and fields and post the code. You don't honestly think we could solve this without it, did you? We're not asking for your entire solution, just 3 or 4 lines of it.
  15. strSQL = "UPDATE myTable SET myTable.myField = 'FALSE' WHERE myTable.ID = 1" Then create either a OleDbCommand object or a SqlCommand object, depending on your database type, associate it with a connection object and call ExecuteNonQuery().
  16. You can't cast a VB6 Collection object into a .NET collection object. It just doesn't work that way. Two entirely different types.
  17. Copy the contents of the Visual Studio .NET CDs to your hard drive and then reinstall. There's very little chance that the reason for an error like this can be tracked down easily. Reinstallation is your best bet.
  18. http://www.extremetech.com/article2/0,3973,11511,00.asp http://abstractvb.com/code.asp?A=1082
  19. I also had read errors thrown during setup. As divil said, copying the files to your hard drive will save you both errors and installation time believe it or not.
  20. Glad to see you got this working in .NET. It's a good example of passing structure pointers to the Win32 API from a managed environment. Just a quick comment though. You call Marshal.FreeHGlobal() in the class' Finalize method, so keep in mind how long it may take for the Garbage Collector to actually free that unmanaged memory. The only way to ensure that the memory is freed in a timely manner is to call FreeHGlobal directly after AllocHGlobal or at least make sure to call the class' Dispose method after you're finished using it.
  21. sSQL = "DELETE * FROM journal_detail WHERE item_id LIKE '%" & noBox.Text & "%'" Give it one more shot.
  22. [api]GetKeyboardState[/api], [api]GetKeyState[/api]
  23. I have to be honest, either did I.
  24. The Add and AddRange methods of the Items collection take an Object as a parameter, meaning you can create a class that holds whatever you want in it. Just make sure the class overrides ToString() or you'll get a blank item displayed in the ComboBox.
×
×
  • Create New...