Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Why roll your own ProperCase function .Net provides a perfectly usable and culture aware one. Dim s As String = "helLo woRld" s = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(s) as to the original code I would tend to do it like Dim ti As System.Globalization.TextInfo = System.Globalization.CultureInfo.CurrentCulture.TextInfo If TextBox1.Text.Trim <> String.Empty Then ttext = ttext.Replace("", ti.ToTitleCase(TextBox1.Text)) If TextBox2.Text.Trim <> String.Empty Then ttext = ttext.Replace("", TextBox2.Text) If TextBox5.Text.Trim <> String.Empty Then ttext = ttext.Replace("", ti.ToTitleCase(TextBox5.Text)
  2. You would probably find using either a stored procedure or a parameterised query would be both easier and more secure / robust. Search these forums and you should find a few examples / reasons why.
  3. You may want to look at using a System.Threading.Timer instead of the timer component - I think the problem lies with the service not having a wnidow and therefore not responding to the WM_TIMER message windows should be sending.
  4. Not entirely sure where your problem lies - any chance you could post some code to give a better idea what you are doing?
  5. Although enums are of an integer type (byte, int16, int32 etc.) they can easily be converted to and from a string representation. You can always convert to the string representation by using the .ToString method and click gives a short sample of how to go the other way.
  6. You need to tell DirectX to manage your Z-Buffer - then it can handle depth correctly. clicky has a good tutorial on Z-buffer use. I've updated your game.vb class and attached it - if you compare this one to your copy you will see the differences mainly 'added to your initialize routine D3Dpp.EnableAutoDepthStencil = True D3Dpp.AutoDepthStencilFormat = DepthFormat.D16 and 'Used to clear the device D3Ddev.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, bgColor, 1, 0) and also 'following line modified in SetupMatrices D3Ddev.Transform.Projection = Matrix.PerspectiveFovLH(Math.PI / 3.0F, 1.0F, 1.0F, 10.0F) GameClass.zip
  7. You would need to cast data to an array of objects - then it should work.
  8. http://www.xtremedotnettalk.com/showthread.php?t=83092
  9. How are you calling the OnPaint method from the other thread? You need to be very careful causing UI updates from anything other than the applications main thread. IIRC the recomended way to repaint is to invalidate the region in question using the form's Invalidate method.
  10. You will also need to re-register asp.net with IIS - from a Visual Studio command prompt run aspnet_regiis /i and things should be okay.
  11. Have you tried putting a between them?
  12. Downright bizarre suggestion but at the very bottom of this page it suggests running ssh from a batchfile (no reason given mind :confused: ). Try creating a batchfile to run the ssh / scp and call that from your service. Might be interesting to see if that fixes anything.
  13. Rather than using public (global?) variables you may want to look at this link. As a general rule multiple users / forms / connections can cause problems if they re using the same globals.
  14. You can sometimes get problems if the problem is raised on a different thread to the one your Try ... Catch block is on; don't have MSDN / VS.Net installed on this PC at the moment but This and this may offer some pointers on catching all unhandled errors. If the errors raised by the grid are not causing problems then I wouldn't worry - it could be a case that the grid itself is catching and dealing with the errors anyway.
  15. The list box should have a SelectedItems property, could you not use it's .CopyTo method?
  16. Could you post a bit more code - at least show us the constructor of the class and where the error is happening.
  17. Any chance you could post the code that doesn't work?
  18. If you add the schema to a project, open the schema up and right click on it - there should be a menu option to generate a dataset - that will allow you to use the schema as a strongly typed dataset. If you wish to avoid going the dataset route then open up a command prompt and there is a utility XSD.EXE that is installed, XSD /? should get you started.
  19. You can create a key file with the SN utility installed as part of the framework sdk. sn -k nameofkeyfile.snk
  20. http://www.xtremedotnettalk.com/showthread.php?t=81473 covers a similar issue
  21. One possible solution is to use a 3rd party library like this one - it's free and fairly easy to use.
  22. Only one service can use a port at any one time.
  23. Again does the PC have the SMTP service running? If so it will grab port 25.
  24. Is IIS running on the PC? If so then it will be using port 80. Why are you expecting an e-mail on port 80 anyway?
  25. Have a look here, should give you a starting point.
×
×
  • Create New...