Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. RESTORE DATABASE dbname FROM DISK = 'c:\dbname.bak' WITH REPLACE should do the trick
  2. Dim s As String = "Public Servants Airfare" If s.ToLower.IndexOf("servants") >= 0 Then MessageBox.Show("Match found") End If bit of a hack but it should work.
  3. Shouldn't be any problems - asp has nothing to do with asp.net so I can't forsee ny problems using VS as a text editor rather than InterDev.
  4. Glad to see you got a solution, nice work.
  5. If project2 compiles to a classlibrary (DLL) then you can add a reference to project2 from project1 - you should then be able to access project2's public functionality.
  6. What do you mean by 'more automatic'? It only took 2 lines of code to get the control in jspencer's post
  7. Are you doing this under windows or asp.net?
  8. ProductName is the Assembly name (under properties), product version is the assembly version (set through assemblyinfo.vb.
  9. In the form load event you could try the following lines of code and see if that helps Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True) Me.SetStyle(ControlStyles.DoubleBuffer, True)
  10. You probably want to put that code (or rather the version below) into the form's Paint event. System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red); System.Drawing.Graphics formGraphics = e.Graphics; formGraphics.FillEllipse(myBrush, new Rectangle(0,0,200,300)); myBrush.Dispose();
  11. Hmmm, been looking into this a bit more and all I've discovered is I'm not sure what the is supposed to do :confused: Although i did hit a few pages that seemed to suggest avoiding it and implementing the locking yourself. If you look at the ildasm output for a method with that attribute it decoreates the function but doesn't provide any explicit locing code :confused: (again) looking at the following class Friend Class Class1 Private objLock As Object = New Object _ Protected Sub Test1(ByVal i As Integer) i = i + 3 End Sub Protected Sub Test2(ByVal i As Integer) System.Threading.Monitor.Enter(objLock) i = i + 3 System.Threading.Monitor.Exit(objLock) End Sub End Class Test1 produces the following MSIL .method family instance void Test1(int32 i) cil managed synchronized { // Code size 6 (0x6) .maxstack 8 IL_0000: ldarg.1 IL_0001: ldc.i4.3 IL_0002: add.ovf IL_0003: starg.s i IL_0005: ret } // end of method Class1::Test1 and Test2 produces this .method family instance void Test2(int32 i) cil managed { // Code size 38 (0x26) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld object VB_WinApp_2.Class1::objLock IL_0006: call object [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::GetObjectValue(object) IL_000b: call void [mscorlib]System.Threading.Monitor::Enter(object) IL_0010: ldarg.1 IL_0011: ldc.i4.3 IL_0012: add.ovf IL_0013: starg.s i IL_0015: ldarg.0 IL_0016: ldfld object VB_WinApp_2.Class1::objLock IL_001b: call object [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::GetObjectValue(object) IL_0020: call void [mscorlib]System.Threading.Monitor::Exit(object) IL_0025: ret } // end of method Class1::Test2 although Test1 is much shorter the only thing it seems to do is decorate the function with the 'synchronized' attribute. It may be worth removing the attribute and implementing your own locking code (similar to the stuff in Test2) if for no other reason than to see if that fixes the problem. I have a feeling this will bug me for a while so if it solves the problem could you let me know? :)
  12. If you wave your mouse over the blue line what does the tooltip say?
  13. I've been playing around with this on and off for the last week or so (one of those nagging problems that won't go away...) The only problem i found with this method is the console is always visible behind the form itself.
  14. Never done it but you could create an 'Empty Web Project' under VS.Net and only add .asp pages to it, that may do the trick.
  15. Try the following (assuming ExpNeeded is a numeric variable) ExpNeeded = Target - Current 'Stores how much exp is needed for target lblExpNeeded.Text = ExpNeeded.ToString("N") 'Displays needed exp in label
  16. Dim i As Integer = 1999999 Label1.Text = i.ToString("N")
  17. You can always use Application.ProductName and Aplication.ProductVersion to get at some of the info.
  18. If you want to run anything but a web application then the client will require the .Net framework. For a asp.net web application only the server requires the framework.
  19. You could call the NotifyIcon's Dispose method in the catch block
  20. Are you opening the same filename anywhere else in you code and failing to close it? A good tool for finding what files are open is FileMon from http://www.sysinternals.com. Also could you avoid posting large screenshots unnecessarily as some people access this site from dialup connections and a 90K attachment is a little large when the text could have been cut and pasted for less than a couple of K.
  21. Under the windows or system32 directory there is a folder called dllcache - this is the 'backup' windows uses to repair damaged or corrupted files - if a core system file is damaged then both the installed and this backup versions would have to be corrupted. Mismatched versions of DLLs and applications is a far more common problem than corrupted files - in fact this is one of the areas .Net is attempting to rectify by it's side-by-side versions deployment. Out of curiosity what version numbers did you get for the server and your client? (Feel free to PM me the details if you would rather not post this information publically)
  22. Easiest way to get the newest version is apply the latest service pack. Trust me though if the version numbers differ then that stands a good chance of being the source of the problem, if a DLL as critical as msvcrt.dll was corrupt then you would encounter major system instability problems as it is used by core system processes like explorer.exe, services.exe, lsass.exe and winlogon.exe to name but a few.
  23. There is no direct WinInet support / one-to-one mapping in .Net. However .Net does provide the System.Net and System.Net.Sockets namespaces, you will find a WebClient class - this is a wrapper around a lot of HTTP functionality (upload / download etc). Also search these forums or places like http://www.codeguru.com and you will find several FTP implementations in .Net. Out of interest was there a specific piece of functionality from WinINet you were after?
  24. When did this problem first occur? After a particular piece of software was installed? Easy thing to try is right-click on the dll and bring up the properties tab - you should be able to get the DLL's version from here. Compare the version on the server against the version number on your laptop and see if they differ.
  25. Doesn't sound like it's corrupt - probably just a version mismatch. It may be worth checking the read me for this program and see what OS versions / Service packs it supports. Failing that it may be worth building a test platform and seeing if a newer service pack fixes the problem.
×
×
  • Create New...