Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. If I understand you correctly, the easiest method would be to pass a Form object/window handle to the DLL's constucter.
  2. Well, that's the thing. You're much better off installing the additional 10MB's of IE while you're at it. Heck... what's that tacked onto the base 20MB plus your application anyway? I use dial-up (connected at 21Kbps), and once I see that a file is larger than 500KB I know I'm going to have to wait.
  3. Does this have anything to do with .NET?
  4. I like to be explicit. Who knows what garbage you'd get if you input something non-numeric.
  5. Call FormPrint in Form1_Paint.
  6. You have a table named "table"?
  7. No, there is no way to shrink the size of the .NET Framework Redistributable, and yes, you need Internet Explorer 5.01 installed. The .NET Framework Redistributable is being released at the Windows Update site and with up-and-coming versions of Windows. Until .NET Server and Longhorn are released (2003, 2005 respectively) .NET really won't proliferate all that well.
  8. That's an error on my part, which wyrd had correct. strResult = String.Format("{[b]0:[/b]###-###-####}", Decimal.Parse(hpformat))
  9. There isn't an equivalent. Just redraw what needs redrawing in the control's/form's Paint event.
  10. It's expecting a numeric data type.strResult = String.Format("{###-###-####}", Decimal.Parse(hpformato))
  11. So basically what you're asking for is a cheesy-looking interface? PictureBoxes work remarkably well for things like this, or you could invest some time in System.Drawing. Either way you'll get that 100% annoying interface that you're looking for. :)
  12. Do '*Smacks head against desk* Loop
  13. A recursive function utilizing System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() should work quite well.
  14. Well, now that I'm looking at the correct declare in MSDN, I might have a solution for you. lppPrinterNotifyInfo is looking for a pointer to a structure, correct? Correct. Now, after thinking this through, one can't expect the Win32 API to be able to access a managed structure using a pointer, so what you have to do is marshal that structure to unmanaged memory using Marshal.StructureToPtr(). You can use the Marshal.SizeOf method to get the size of the managed structure, and then allocate the neccessary memory using AllocHGlobal before you call StructureToPtr. This'll give you a pointer which you can then pass to FindNextPrinterChangeNotification, hopefully. Then just call Marshal.PtrToStructure to get the managed structure back. God I hope this works... [edit]And yeah, I'm sure you have a better method Divil. So feel free to make me look bad. ;)[/edit]
  15. There's a problem with the connection between the web server and the database server. A "clog" of the sorts. Bob had it fixed for a few hours, but obviously we're right back where we started.
  16. Err... Visual Studio .NET comes with a project type called "Setup". Add it to your current project's solution. And just to make sure, you're not trying to distribute System.dll, System.Windows.Forms.dll, etc. are you? That's a huge no no.
  17. Reasons like this are exactly why data binding is such a poor technology. Save yourself the trouble they cause and set the TextBox/CheckBox info using the OLE or SQL data objects found under System.Data.
  18. To think... you actually can buy something with Canadian money...
  19. You can do it either way. Robby was just suggesting one method.
  20. You don't actually use the delegate once you declare it. It's sole reason for existance (when it comes to using Win32 API callbacks) is for .NET to be able to expose the function to unmanaged code in a familiar format.
  21. System.Diagnostics.Process.GetProcesses() (returns an array of Process objects) Process.CloseMainWindow() or Process.Kill()
  22. Well, after reviewing the documentation on MSDN, it appears its looking for a pointer, not the actual array. With that said, change the structure to read "pFields As IntPtr" and use the Marshal.AllocHGlobal method I suggested to you a few threads back.
  23. Class yourClass Private iNumber1 As Integer = 10 Private iNumber2 As Integer = 10 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click iNumber1 += 1 iNumber2 -= 1 Label1.Text = iNumber1.ToString() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click iNumber2 += 1 iNumber1 -= 1 Label2.Text = iNumber2.ToString() End Sub End Class 'yourClass
  24. Which Win32 API function are you trying to use this with?
×
×
  • Create New...