Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. It's human nature to resist change. Every halfway competant vb6 programmer who has successfully made the change agrees it was well worth it.
  2. Haha, how true.
  3. I don't think you can. Who uses that resolution any more?
  4. The TreeView has a Sorted property.
  5. Yeah, sure.
  6. Yes, this could theoretically cause a problem. The handlecreated event can fire more than once, as controls handles are often recreated on the fly as their properties change. To get around this, make sure you check the RecreatingHandle property in the event - make sure it's false if you're starting your thread. You could also use the Application.Idle event which is fired whenever your application enters its idle state after processing. You'd have to make sure you unhooked the event as soon as it was first fired though.
  7. What about the Shutdown and/or Close methods?
  8. Yes, you use string manipulation to get the directory name from the full path.
  9. You can use the various properties of the Assembly class to find out the codebase of the dll that started your process, or the dll the currect method is running in. It's in System.Reflection.
  10. You should decrease the width and height of the rectangle by 1 before drawing the border - it's just the way rectangles and pixels work on windows.
  11. True is equal to 1 in C# and -1 in VB.
  12. This is the typical practice. One could argue that if this were a demanding situation, you wouldn't be working with winforms controls in a loop :)
  13. The first thing I noticed is that you're creating the delegate once, at the beginning and then using it later on. While I can't see what difference this could make I've always created it on-the-fly as I call Invoke. As I said, this probably won't make a difference though. The other thing is that there should always be a call to inspect the InvokeRequired property before you Invoke. It's surprising how often this comes back False even when accessing from another thread. if (this->InvokeRequired) this->Invoke(disableButton); else DisableButton();
  14. Search the forum, this is a very popular question.
  15. divil

    debugger

    Maybe you're running in Release mode instead of Debug mode.
  16. If you are having the same problem, but you could not solve that problem using the answer I gave above, then you probably have a different problem. It looks like we have a problem.
  17. Firstly, I disagree that games are what drive technological advancements in the PC and operating system software insustry. Longhorn is not built on .NET - it has just replaced two of the three core windows dlls - user32 and gui32 with the managed Avalon presentation layer, and lots of communications stuff too. Considering that games don't use these two anyway (sure, they do, but only as intensively as Notepad does) and they use C++ and DirectX, I don't see that it'll make a blind bit of difference.
  18. Have you tried fiddling with CompositingMode, CompositingQuality and InterpolationMode?
  19. .NET includes a full-fledged Version class. Version oldVersion = new Version("1.0.0.1"); Version newVersion = new Version("1.0.0.2"); if (newVersion > oldVersion) blah; Dim oldVersion As New Version("1.0.0.1") Dim newVersion As New Version("1.0.0.2") If Version.op_GreaterThan(newVersion, oldVersion) Then 'Blah End If
  20. TB has no events. What you mean is TB(x).Click.
  21. Windows is not guaranteed to be a realtime operating system.
  22. Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = Win32.WM_MOUSEACTIVATE Then 'We don't want to be activated m.Result = New IntPtr(Win32.MA_NOACTIVATE) Return End If MyBase.WndProc(m) End Sub The value of WM_MOUSEACTIVATE is &H21 The value of MA_NOACTIVATE is 3
  23. It will be fully backwards compatible. Look at recent versions of Windows, which still support running Win16 programs. Microsoft can't affort not to include that compatibility. The only issue that'll come up with Longhorn is the new apis. All future additions to the api (this excludes fixes obviously) will be under WinFX, not the win32 api. Programs that interact with the shell might break since it's been completely rewritten in managed code, but then again, they might have made that backwards compatible too.
  24. Same way you add anything to your toolbox. Right-click it, select customize or add/remove, whatever is there.
  25. Voca, what is this System.Windows.Forms.ReBar of which you speak? Windows forms does not have a rebar control. Malfunction; the standard toolbar is very limited in what it can do - if you want it to display anything other than normal buttons and separators you're out of luck, you'll have to implement it manually. There are many good third-party toolbar/menu replacements which have this functionality built in (like my own - see my signature).
×
×
  • Create New...