Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. What would be the point of an enumeration without members?
  2. Try Environment.CommandLine
  3. Did that really surprise you? :P I love 2003, it even installed quicker than 2002.
  4. Hang on, You're saying you don't want to use the OnPaint method (which will draw when needed, the most common method of doing it) because it's efficient, but you're trying to draw it 50 times per second? You should be using DrawImage. You could interop with GDI, but why? .NET uses GDI+.
  5. If I type Me.BindingContext, put the cursor on it and press F1, I get a page about the Form's BindingContext property. There isn't much information there but it says it overrides the Control's property of the same name, with a link to that topic. I click on it, and it seems to have a wealth of information on the property.
  6. .NET applications use up memory extensively when it is there to be taken. If you're short of memory, it will take less. It does this because garbage collection is expensive cpu-wise. Rest assured if you get short of memory it will be reclaimed. The only thing you actively need to do is to remember to call Dispose on those objects that support it when you're done with them, assuming you created them.
  7. Here's an example sub that toggles a font style on and off for a selected piece of text in a richtextbox control, maintaining any other styles the selection has: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ToggleStyle(rtb, FontStyle.Bold) End Sub Private Sub ToggleStyle(ByVal rtb As RichTextBox, ByVal style As FontStyle) If (rtb.SelectionFont.Style And style) = style Then 'Turn off rtb.SelectionFont = New Font(rtb.SelectionFont, rtb.SelectionFont.Style Xor style) Else 'Turn on rtb.SelectionFont = New Font(rtb.SelectionFont, rtb.SelectionFont.Style Or style) End If End Sub
  8. Ouch, that sucks. I have no idea what could have happened. I've fixed your postcount and join date, but you'll have to wait for one of our Administrators to come along before your old account can be fixed properly.
  9. You need to either paint your squares in the Paint event so they'll be painted whenever needed, or paint them on an offscreen bitmap and set the picturebox's Image property to that bitmap.
  10. It's always WM_PAINT sent to paint it, but that's not much use without the other messages that _you_ send to the control to get or set the bounds of everything so you know where to paint.
  11. Here's how to make the selection bold but keep any existing style it has (italic, underline etc): rtb.SelectionFont = New Font(rtb.SelectionFont.Name, rtb.SelectionFont.Style Or FontStyle.Bold)
  12. The best way is to just pass an instance of the form to your procedure, like so: MyProc(Me) 'And in your class... Public Sub MyProc(f As Form1) f.MyCheckBox.Checked = True End Sub
  13. The keys reach Windows before they reach your application. As you said, for security reasons, this will not be possible in any recent incarnation of Windows. It might be possible in Windows 98, but I don't know how and wouldn't tell you if I did due to policies on this forum.
  14. Try the Sleep method of the Thread class.
  15. I have no experience ownerdrawing tabcontrols, perhaps someone else will chip in. If you're after a way to make the tabcontrol client background gradiented properly under windows xp, there is a replacement control out there which does it correctly.
  16. That control is drawn by Windows, not any .NET code, so overriding that method is pretty much useless unfortunately. To draw it yourself you would have to intercept the WM_PAINT message and send the control various messages to find out the bounds of everything.
  17. The scrollbars are standard windows ones and either on or off. If you want an invisible column, try just settings its width to 0.
  18. You shouldn't use it. It's part of the VB helper runtime and not a core part of the framework, and as you have discovered, has its disadvantages.
  19. You need to install the .net framework runtimes (21 meg) on any platform that you want your app to run on.
  20. Show the form before the Application.Run() call, that ought to do it.
  21. You're a final year student in computing and you don't know what a content management system or a webservice is?
  22. GMT - 8, where's that? California?
  23. May I ask why you would want to do this?
  24. You'll want to use a method other than the web browser control to download the data. See the WebClient, and in particular its DownloadData method.
×
×
  • Create New...