Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. Instead of calling Application.DoEvents(), which is a very heavyweight API you might want to use [api]PeekMessage[/api] to get better performance. Just a thought.
  2. Yeah, the nimrods that call themselves Web hosts seem to have misplaced any sign of intelligence. I'm working on getting it up again. I've replaced it with a link straight to the MSDN class library reference. [edit]MSDN7ITR is working again. Link reverted.[/edit]
  3. [msdn]System.Windows.Forms.OpenFileDialog[/msdn]
  4. It's an academic version. It's meant for learning, not commercial use. If you intend to sell or redistribute a product purchase the Professional Edition for a few hundred dollars more. If your intent is simply to learn .NET then the academic version will suite you just fine, although I don't see the point in purchasing a product you ultimately can't use for commercial reasons.
  5. As a private user, I wouldn't like the idea of a program using Access. MSDE is a 68.4 MB download, something I, as a dial-up user, would gladly suck up for a decent program.
  6. If by "spell" you mean utterly annoying, then yes, "woowoo" it is.
  7. The examples that I have looked at from MSDN and the 101 Code Samples for Viusal Basic .NET download are coded incorrectly as far as I'm concerned. There are various steps that need to be taken when it comes to COM interop, and they simply aren't addressed in those samples.
  8. You'll need to create a file handle to access the port using the API function [api]CreateFile[/api]. Then use the returned handle to instantiate a [msdn=System.IO.FileStream]FileStream[/msdn].
  9. I am having trouble with my aviators. Too much alcohol consumption as of late... In all seriousness though avatar uploads probably aren't (or weren't) working as a result of Bob moving the site over to a new server, as brought up by VolteFace in a thread over in Suggestions, Bugs, and Comments.
  10. Private Declare Ansi Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" ( _ ByVal lpstrCommand As String, _ ByVal lpstrReturnString As StringBuilder, _ ByVal uReturnLength As Integer, _ ByVal hwndCallback As Integer) As Integer Dim sReturn As StringBuilder = New StringBuilder(128) Dim sInput As String = "play C:\Test.wav" Dim iReturn As Integer = mciSendString(sInput, sReturn, sReturn.Capacity, 0)
  11. You need to set write permissions on the server.
  12. Copy the DLL into the /bin directory of your web application's root. If the directory doesn't exist, create it. Then simply import the namespace. <%@ Import Namespace="MyCompany.MyProject" %>
  13. You shouldn't be using an OS "serial number" for security. OS changes are made all the time, and that would invalidate your security and aggravate your user. Period. Instead, use hardware-based identifiers, such as a network card's MAC address and/or a hard drive's serial number.
  14. Did you compile the class? Web Matrix does not do this for you, as its meant to be used with Active Server Pages (.NET) that lack code-behind files.
  15. Constant or no constant the variable will be replaced with its value prior to execution. The JIT (just-in-time) compiler does an excellent job of optimizing code. Any slow downs in .NET are caused by poorly written algorithms, not minor issues such as constants.
  16. Use a For/Next loop.
  17. Use [msdn=System.Data.OleDb.OleDbDataReader]OleDbDataReader[/msdn].IsDbNull(), not Visual Basic's IsDbNull() function.
  18. That's interesting. I've yet to use a DataAdapter or DataSet in a production-level environment. I consider them a very poor solution when code needs only to request data or even when rows need to be inserted or updated. The DataSet is overused, something I attribute to the Microsoft documentation pushing its use far too much. Used under the correct circumstances, a DataAdapter/DataSet pair can alleviate a lot of coding, I won't deny that, however to use them as an end-all solution to data access is rather lazy. If you've ever implemented a DAL that returns business objects you're absolutely kidding yourself if you think a DataSet is an easier method of populating those objects. And that's just one piece of evidence against the DataSet's use.
  19. That will work for JavaScript, but certainly not a server side .NET code block.
  20. Use a long date and avoid the problem altogether. Dim dt As DateTime = DateTime.Now MessageBox.Show(dt.ToString("MMMM dd, yyyy"), String.Empty)
  21. The point is there is no such thing as directory size. Only files have size. Period. Open up Windows Explorer, right click a directory with numerous files in it and select "Properties". Watch as Windows increases the "directory size", as it enumerates each file and requests its size. You'll need to use the method JABE mentioned, above.
  22. When a session starts write out its associated ID to a cookie and poll it from the secure server when need be. You will not be able to keep the session across the servers, however the ID you wrote out to the cookie will be accessible from the secure server, allowing you to create a new session and continue the user's transaction seamlessly. Realize this isn't elegant, but session nature is the inhibitive factor in this case.
  23. Can a new user profile field, .NET Framework Version, be added? I'd like to see it set as required, along with all the other .NET related profile fields, but I'm probably asking too much.
  24. If you set the Domain property of the cookie to "mydomain.com", you should have no problems reading it from "secure.mydomain.com". Sessions cookies are invalidated when the browser is closed, not when the user leaves the site.
  25. You can not stop a DataReader with predictable results (if any). Period. You need to use two or more connections as JABE has mentioned.
×
×
  • Create New...