Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Strange, I downloaded it from the site and it contains full source. Also I haven't tried using the control at design time, only runtime.
  2. Your line <Assembly: AssemblyKeyFile("c:\inetpub\wwwroot\appl3\comp1.snk")> is incorrect. You should not be specifying the full path of the key file. Instead, use this: <Assembly: AssemblyKeyFile("comp1.snk")> It will find it because the compiler will have embedded it.
  3. It could be a hundred times faster, depending on what type of animation you're doing. For double-buffered scrolling animation, you will benefit greatly by using DirectX in fullscreen mode because of page flipping.
  4. Use the last link I posted, it does exactly what you're looking for and is better than the webbrowser control (far more lightweight).
  5. This is the last time I'm going to tell you this. I've told you twice already. You need to add the /keyfile parameter to your command line. vbc component1.vb /t:library /r:system.dll /r:system.data.dll /keyfile:mykeyfile.sn
  6. divil

    Ms Sql...

    Thinker - VS.NET comes with a cut-down version of enterprise manager in the form of the Server Explorer. I guess it's intended for people who install MSDE with Visual Studio. It's actually pretty good.
  7. Go in to your project properties and turn Option Strict on. You'll suddenly get a whole load of build errors, because Option Strict doesn't let you do silly things like assign strings to integers.
  8. What command line are you using to build the component?
  9. You have to add it to your toolbox. Right-click on toolbox, Customize Toolbox. And no, it can't really take an input stream. I discovered this today, which may be exactly what you're looking for.
  10. You can show the second form with its ShowDialog method: Dim f As New Form2() f.ShowDialog(Me) Then from the second form, you should be able to access the Owner property, cast it to the correct type and run a subroutine on it: DirectCast(Me.Owner, Form1).MyMethod()
  11. I don't know how you came up with that code, but I wouldn't touch it. I see you're trying to assign a string to an integer property.
  12. Did you not read what I told you in your other thread? I guess you can't have, because you aren't doing what I said. You need to add the following parameter to your command line to compile your component: /keyfile:mykeyfile.sn That compiles your strong name file (which you need to have generated first) in to your assembly. THEN you should be able to add it to the GAC.
  13. There's nothing like that in .NET, no. Your best option is probably to use the webbrowser control.
  14. divil

    Threading

    You can't pass parameters to a thread because that's just not how they work. I haven't used them much myself, so I can't really comment further on that. As far as an exception being raised, I can help you with that. You shouldn't (and cannot) interact with UI controls from a thread other than the one they were created on. You need to put the code you want to run in the UI thread in a procedure that matches a delegate, and use Control.Invoke to run that delegate. Sounds tricky I know, and it is until you've done it, then you get used to it :)
  15. It doesn't make much difference whether you override OnPaint or listen for the Paint event, usually. The OnPaint function in the base class will do whatever default painting the control has, then it raises the Paint event. If you override OnPaint, the Paint event will never be raised. This is usually only an issue if you want people to be able to listen for your Paint event. You can use .Refresh or .Invalidate to make your control redraw. I prefer Invalidate, because it doesn't force an immediate redraw, it just marks the surface as invalid so when windows next gets round to it, it will initiate the redraw itself. Also, you can pass a region or rectangle to Invalidate, and only that bit of the surface will be redrawn. This can increase drawing speed.
  16. I always use Return to exit the current procedure, whether it's a sub or a function.
  17. Goodness, what a lot of misunderstandings :) Here's the code you're looking for, in this example it looks through all processes until it finds notepad.exe, and when it does, it closes it. Dim processes(), p As Process processes = Process.GetProcesses() For Each p In processes If Not (p.MainModule Is Nothing) Then If System.IO.Path.GetFileName(p.MainModule.FileName).ToLower() = "notepad.exe" Then p.CloseMainWindow() Exit For End If End If Next
  18. Classes that implement IDisposable have a Dispose method.
  19. You would have to open the file and read its contents in to a string, then use the .IndexOf method of the String class to get the position of the substring.
  20. Make sure you're calling .Dispose on any objects that support it, when you are finished with them.
  21. Dim i As Integer For i = 0 To UBound(userManagement.names) If userManagement.names(i) = nameTf.Text Then MessageBox.Show("Name already present in the database" ) Return Next Next nameDis = nameTf.Text userManagement.AddUserPass(firstChar, nameDis)
  22. They are, but you try using one in VB. By using, I mean actually performing arithmetic with one.
  23. No, I can't think of a reason why that would happen if your drawing code is correct.
  24. Follow your code through, you should see the problem. Stepping through with the debugger would probably help too. Your loop should come first, and do nothing except go through looking for duplicates. If it finds one, it displays the messagebox and exits the entire function (not just that loop). The code after the loop will only be reached if no duplicates were found, and that will simple add to the array.
×
×
  • Create New...