Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Try using AddRange instead of Add, to add them all at once.
  2. Haha, that sounds like fun. Haven't played Monopoly for years, but when I did I was the ship.
  3. You can only do this if you're responsible for drawing everything under neath the "panel" yourself. Then you can just create a brush with a semi-transparent color and draw a rectangle, simple as that. But if you're trying to draw over windows control I'm afraid you're pretty much out of luck. Maybe you could fake it by using a form without a titlebar and showing that over the top.
  4. Yes, Microsoft will remove all support for everything that isn't written in .net, they'll install trojans all over your computer and will make it necessary to pay them a fee every time you need the bathroom. It's all a giant conspiracy.
  5. You are using the correct way of obtaining an instance of the container your component is hosted on - rootComponent is always this container. It doesn't return a different object during the load state either - if you are designing a control that derives from Form, you will always get Form (or whatever the base class is) because the designer cannot instantiate a partially-designed class. So if your component is relying on the designed form actually being of a derived form type, you're out of luck - unless you have derived twice, in which case you'll get the first derivation being instantiated for the design surface.
  6. Thanks guys! Could someone post the MSDN flash thing? I haven't seen it.
  7. Nope. You'll have to get in to drawing the titlebar completely on your own, which is not a trivial task.
  8. No, VB.NET and VB6 are nowhere near compatible.
  9. That is correct.
  10. Yes
  11. I just had to knock up a subroutine which draws simple 3d balls using PathGradientBrush so I thought I'd post it here for anyone to use. To use this code, just paste these two functions in to your existing form and the drawing will take effect. Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint e.Graphics.Clear(Color.White) Draw3DBall(e.Graphics, New Rectangle(10, 10, 250, 250), Color.FromArgb(227, 239, 254), Color.FromArgb(129, 169, 226)) Draw3DBall(e.Graphics, New Rectangle(300, 50, 20, 20), Color.FromArgb(227, 239, 254), Color.FromArgb(129, 169, 226)) Draw3DBall(e.Graphics, New Rectangle(320, 150, 100, 100), Color.FromArgb(236, 240, 213), Color.FromArgb(184, 198, 147)) End Sub Private Sub Draw3DBall(ByVal graphics As Graphics, ByVal bounds As Rectangle, ByVal color1 As Color, ByVal color2 As Color) 'Enforce anti-aliasing Dim oldSmoothingMode As SmoothingMode = graphics.SmoothingMode graphics.SmoothingMode = SmoothingMode.AntiAlias 'Create the path used for drawing our ellipse Dim path As GraphicsPath = New GraphicsPath Dim ellipseBounds As Rectangle = bounds ellipseBounds.Offset(-Convert.ToInt32(bounds.Width * 0.2), -Convert.ToInt32(bounds.Height * 0.2)) ellipseBounds.Inflate(Convert.ToInt32(bounds.Width * 0.3), Convert.ToInt32(bounds.Width * 0.3)) path.AddEllipse(ellipseBounds) 'Create our brush and fill ellipse Dim brush As PathGradientBrush = New PathGradientBrush(path) brush.CenterColor = color1 brush.SurroundColors = New Color() {color2} graphics.FillEllipse(brush, bounds) brush.Dispose() 'Restore old smoothing graphics.SmoothingMode = oldSmoothingMode End Sub
  12. http://www.divil.co.uk/net/controls/eyefinder/
  13. There are non-programming related webpages?
  14. Ah, those were indeed the days. I spent more time designing and working on Duke3D levels than I did programming, surfing or chatting back in those days. Hmm, I probably still have them somewhere... Hog: I have an xBox, but I'd still rather play Duke3D, Transport Tycoon or other old favourites of mine than most of the games I've seen for it!
  15. reboot: yes, I think you can disable them in the compiler options. Whidbey introduces the concept of "developer profiles". If you pick "vb developer" instead of "c# developer" when you install it, everything will seem a little alien to established vb.net users. More advanced features will be hidden, menu layout will be changed, etc. The way I see it, competant VB developers will get irritated by these things and eventually drift over to C# which is in no danger of getting this treatment. It's not the way it should be, but I think it's what's going to happen. Disclaimer: Of course, all this released information about Whidbey is subject to change in the coming year before it's released. It hasn't even gone in to beta yet.
  16. Global hooks need to be implemented with standard c dlls, and lightweight ones at that. .NET is not suitable. Also, even if it were, the guidelines on this forum prohibit discussion of such things as they can clearly be used for malicious purposes.
  17. I'm not talking about hide advanced members. The problem is, Microsoft itself regards vb as the "beginner" .net language. And they choose not to stand up to the morass of vb6 programmers who whine that their language is changing. VB.NET 2.0 will therefore contain a number of things that will "baby" up the language a bit.
  18. DiverDan, he asked for a suitable program to write html with. Not an application to create chm files with.
  19. Yes, you're quite right. There are a _lot_ of features being introduced in VB.NET 2.0 to make it more like VB6. It's almost sickening. For instance, default instances of forms are back in. The code editor starts hiding things from you like attributes that it thinks are too advanced for you to see. Of course, it's still at the pre-beta stage so anything could change.
  20. Having two hyperthreaded processors should not report four processors being there.
  21. Notepad. Or Visual Studio.
  22. My thoughts would be to not use MDI at all. If there will only be one form showing at one time, don't use a form - use a control instead and just add it to your first form. It'll be cleaner, faster, and save resources.
  23. SystemInformation.CaptionHeight
  24. The compilers are part of the .NET framework distribution. Nobody will complain about you writing your own IDE that uses the compilers that are part of the framework.
  25. Are you sure the exception isn't being thown by EndAccept when you call it from your async handler, because you've just shut down the socket? In which case you'd want to just trap the exception and move on.
×
×
  • Create New...