Jump to content
Xtreme .Net Talk

penfold69

Avatar/Signature
  • Posts

    135
  • Joined

  • Last visited

penfold69's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. http://www.sharpdevelop.com MonoDevelop forked from SharpDevelop some time ago - I still consider SharpDevelop to be the superior product. You can download and compile it under Mono to run on Linux, iirc. P.
  2. Each user on the computer has their own "library", so I'm guessing that the ASPNET user's WMP library is empty. Try running your site as the user on the computer that has all the tracks in 'their' library - if this fixes the problem that you can either leave the site running as that user, or import all the music into the ASPNET user's music library (log on as the ASPNET user and 'scan computer' in WMP) B.
  3. This information is generally known as EXIF information. A quick google turned up http://www.codeproject.com/vb/net/exif_reader.asp I've not used it personally, but it looks like it should do the job! B.
  4. Just a thought - what user is the website running under, and are the tracks in *that* WMP library? B.
  5. You can (should?) also look into the ICloneable interface, which forces you to implement a Clone() function to your class (the implementation is up to you) Public Class MyClass Implements ICloneable Public StringA as String Public StringB as String Public OtherClass as MyOtherClass Public Function Clone() as MyClass Implements ICloneable.Clone Dim newClass as MyClass newClass.StringA = StringA newClass.StringB = StringB newClass.OtherClass = OtherClass.Clone() ' this nested class needs to be cloned too return newClass End Function End Class
  6. concept code, untested. Dim myDrive As System.IO.DriveInfo = Nothing For Each d As System.IO.DriveInfo In My.Computer.FileSystem.Drives If d.DriveType = IO.DriveType.CDRom Then Dim di As System.IO.DirectoryInfo = d.RootDirectory If di.GetFiles("MyUniqueFileName.txt").Length > 0 Then myDrive = d Exit For End If End If Next If myDrive IsNot Nothing Then ' Yay! I found the right CD drive, and it contains my CD DoSomeStuff() Else MsgBox("Please insert the application CD-ROM into one of your drives") End If
  7. This method can fail if there are multiple CD drives in a machine. When would be a good idea is to scan each drive, and look for the presence of a particular file in the root of that drive. This should ensure that you can uniquely identify *your* CD. It also handles the fact that your user removed your CD and replaced it with "Goldie Looking Chain's Greatest Hit". P.
  8. Re: Dispose and scope I did some testing with the garbage collector, (specifically with respect to using Excel automation, where I was doing something similar to: Dim objApp As Excel.Application objApp = CreateObject("Excel.Application") ' ... do some work ... objApp.Quit() I found that the COM resources were not being specifically released until I exited the program. In the case where I re-used this function, the resource usage would increase linearly. Task manager would also display an EXCEL.EXE running which would not actually terminate until I did so manually (even after my application was terminated) The solution to my problem was: System.Runtime.InteropServices.Marshal.ReleaseComObject(objApp) followed by a System.GC.Collect() The releasing of the COM object seems to trigger the equivalent of a .Dispose(). I forced the GC.Collect, (the discussion for whether this is appropriate or not has been made before) to ensure that the EXCEL.EXE application in the task manager was terminated immediately. P.
  9. Re: Thanks! Glad I could help. I work for a manufacturing company and we've deployed touch-screen computers onto the shop floor, running monitoring software that has been developed in .NET We use this method for exactly the reasons above - the monkeys on the shop floor can't play around. They're limited to our software and nothing else. The technicians have access to the main explorer.exe from a set of password protected forms within the app. Its a lovely solution, and because it uses commodity hardware and software it's reasonably cheap, compared to embedded touchscreens running CE. P.
  10. in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon look for the key: "Shell" and change it to point to your application instead. This will run your application instead of explorer.exe when windows logs on. YMMV, and it may bork you rmachine ;) P.
  11. I would agree with Denaes here - either Mono or SharpDevelop are likely contenders. Both are open source. P.
  12. Extracted from our system, so may not work completely as-is Dim pd As New PrintDialog pd.Document = New Printing.PrintDocument pd.AllowSelection = False If pd.ShowDialog = DialogResult.OK Then Me.Cursor = Cursors.WaitCursor Dim rpt As New rptProductionSchedule Reporting.SetDatabaseForReport(rpt) rpt.SetParameterValue(0, Prodate) rpt.SetParameterValue(1, Hours) rpt.PrintOptions.PrinterName = pd.PrinterSettings.PrinterName rpt.PrintToPrinter(pd.PrinterSettings.Copies, pd.PrinterSettings.Collate, pd.PrinterSettings.FromPage, pd.PrinterSettings.ToPage) rpt.Close() rpt.Dispose() End If pd.Close() pd.Dispose()
  13. Insert a CR "Group" that groups by Col1 Move everything from your "details" section into the header or footer of that group. P.
  14. http://support.microsoft.com/default.aspx/kb/175261 is worth a read. Its in VB6, but the basic premise is there to convert. Also, a little testing by this guy gives some more info. P.
  15. The OLE Header is 78 bytes and, (from memory) it starts with a static string. The basic premise is to read the image data from the database, check for this static string at the beginning of it, and advance forward 78 bytes if it is present. Then decode the "remaining" bytes as an image. I have some code somewhere that does it in VB.Net. I'll see if I can grab it and post it. P.
×
×
  • Create New...