Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Bit shifting doesn't gain you quite as much as you'd hope though, since VB can't deal with unsigned numbers.
  2. No, that's a connection string for a database. It's possible that you could write some ASP that would write files to the webserver depending on information passed to it, but the best way would be to go in via FTP if possible.
  3. Once you've opened the file you can read it in line by line, but it's going to be up to you to write the parsing logic to handle the context within the file. To open a file and read it line by line you do this: StreamReader sr = new StreamReader(@"c:\myfile.txt"); string line; while (sr.Peek != -1) { line = sr.ReadLine(); // Do what you like with the line } sr.Close(); Dim sr As New StreamReader("c:\myfile.txt") Dim line As String Do While Not sr.Peek = -1 line = sr.ReadLine() ' Do what you want with line Loop sr.Close() There are other methods of StreamReader you could use, such as ReadBlock, ReadToEnd and Read.
  4. I've never tried doing this, but you could try overriding OnLayout. I guess that would be called when the user scrolls, amongst other things.
  5. Yes, the purpose of the manifest file is to tell windows to use Common Controls 6 if it's available, regardless of what version then application was compiled with. And regarding quwiltw's comments, adding a manifest file to the IDE is a very bad idea. It actually changes the way the IDE serializes resources, so you'll never know there's a problem when you open your solution on your computer, but as soon as you give it to someone without that manifest, they won't be able to read the serialized resources properly.
  6. The RadioButton class has a Tag property you could use to store information in. I don't really understand why you need to store answers, it looks like you're using different radio buttons for each question so presumably they retain their state anyway?
  7. The answer is probably. The Toolbar in the .NET framework is not a complete control in itself, it only wraps the win32 common controls toolbar. This won't always be the case, but that's how it is at the moment. That means that you almost certainly won't be able to owner draw it in any elegant way. The only way you'd be able to owner draw it is to override its WndProc method and listen for the WM_PAINT message. You might be able to do some more stuff specific to the toolbar by sending it messages and creating win32 brush objects for it when it asks for them. Creating your own toolbar from scratch will probably be about as much work, and give you far more control (obviously). I've written my own, which works well. It does more than the win32 one does. You might want to read the article I wrote on writing collection-driven controls like this, it goes in to the best way to design them. The sample project that comes with it could be converted to a functioning toolbar quite easily. Read it here
  8. You can enable XP theming on your applications by giving them a manifest file. There is information in MSDN on how to do this.
  9. No, you can't create ActiveX controls with .NET that you can use with VB6 etc.
  10. divil

    Events

    I believe that first AddHandler line should be something like this: AddHandler aIECtrl.ShowHistory, New ShowHistoryHandler(AddressOf mMethod) It's probably because it's Friday evening but I'm not sure I fully understand what you're trying to do. If that doesn't help, could you outline it again with the code you have so far?
  11. I'd use FillRectangle instead, still with a width and height of 1. I've done it in the past and it's worked.
  12. monkeybiz, you have me really confused. How do you expect anything to be able to save to a webserver? They are inherantly read-only. Otherwise, I could just save my work to http://www.microsoft.com. :P
  13. divil

    Events

    The type you are looking for is Delegate. You might well get further with that, you should certainly be able to pass Events around as type Delegate anyway.
  14. I have no idea how uploading files via http would work, anyway. Web servers are meant to provide pages for download, not serve as a way to upload files. That's pretty much where you want FTP.
  15. I just said... with the Bitmap constructor and Graphics.FromImage. Dim b As New Bitmap(100, 100) Dim g As Graphics = Graphics.FromImage(b) g.DrawLine(whatever) g.Dispose() myPictureBox.Image = b All untested of course but should work.
  16. The WebClient is pretty much the .net replacement for that control, only it doesn't do FTP by default. You can, however, get plugins for it that let it do FTP (I'm told).
  17. No, you could still do it. You'd have to put Shadows on all your LoadList methods in the new class, and not use Overloads at all. That should work.
  18. I'm not entirely sure what you're trying to do, and why you need Shadows. Is it that the baseclass isn't written by you? If it is, you could do this: Class BaseClass Public Overridable Sub LoadList(ByVal dvView As DataView) End Sub End Class Class HeikosClass Inherits BaseClass Public Overloads Overrides Sub LoadList(ByVal dvView As DataView) End Sub Public Overloads Sub LoadList(ByVal dtTable As DataTable) End Sub Public Overloads Sub LoadList(ByVal myTablename As String) End Sub End Class
  19. Yes, the .NET 1.1 SDK will be available for download as well as the new runtimes.
  20. myListView.SelectedItems(0).Index 'Or myListView.SelectedIndices(0)
  21. You'll have to draw your image in an offscreen bitmap instead. You can then assign that image to a picturebox or draw it wherever you like. Use the Bitmap constructor to create the image, and use Graphics.FromImage to get a Graphics object from it to draw on it.
  22. I'm surprised you committed yourself to a project with a deadline a week away, not knowing how to do the task. You can use the WebClient class to easily download and upload data from and to a webserver. Check it out.
  23. To give your assembly a strong name, you need to use the /keyfile:mykeyfile.sn parameter. This is all in the Framework SDK documentation.
  24. No, you can't just put any object in to a byte array.
  25. Not that I know of, you'll probably have to code this yourself.
×
×
  • Create New...