Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. It works for me.
  2. Im sorry but could you now that I see it tell me to what you are referring as the unwanted effect? :)
  3. You would have to draw a rectangle that is one pixel big using the DrawRectangle method, or FillRectangle.
  4. To send a form to back you would use its SendToBack method. If you just want to make inactive you would set focus another one using Focus() method the form.
  5. You could do this the following way: Create two variable that will hold instances of your two additional forms: (somewhere at the top of your form) Dim formOne As FormType Dim formTwo As FormTwoType 'just subsititute this with the names you are using : ) Then, each time you want to show the form you would do something like this: formOne = New FormType 'now the variable will contain a new instance of the form 'and you will be able to access the form using that variable This will prevent the error that you are getting. Using the Close() method also disposes of the from if its not shown as a dialog so the instance is no longer available. So next time you want to show it, it will create a new one. If you only want to have one instance of the form without creating new ones, you could always hide it instead of closing it.
  6. Oh, sorry I misread a part of your post (I dont know why :)). You would first need to eliminate the DataSource, by setting it to Nothing.
  7. First you have to make that method Public. Then you need an instance of that form to actually call its method. Dim SomeForm As New FormType 'create a new instance of the form SomeForm.DoSomething() 'call its method If you already have an instance of a form and dont want to create a new one you can do it by creating a class with shared members that will hold the instances. Or by passing the instance between the forms using constructors. If you need examples on those two just say :)
  8. To clear a list box of all items use this: ListBox1.Items.Clear() This will remove all items from it.
  9. Dim b As Bitmap = PictureBox1.Image 'create a bitmap object b.MakeTransparent(color you want transparent) 'set a color transparent PictureBox1.Image = b 'reassign modified picture to the pixbox The key in this code is the MakeTransparent method of the bitmap object. Which will make any color you specify transparent on the bitmap. :)
  10. VS.NET 2003 will automatically prompt you to change the solution to a new one. If not it wont work. But it should automatically procude a backup file with the old solution called something like this: solutionname.sln.old. There is also some tools that will let you convert between both formats but unfortunately I dont rmeber the name.
  11. Could you show the code that you use, and maybe a pictuire of the form when the images are drawn if you can.
  12. Dim b As Bitmap = PictureBox1.Image Dim pixelcolor As Color = b.GetPixel(x coord, y coord) You simply put the image into a Bitmap object and then use the GetPixel method of the Bitmap object to get the color. In this example the variable pixelcolor will now contain the color of the pixel at the specified point.
  13. Yes it indeed is very helpful :). Now that you know how to use it, it will help you with a lot of things like that.
  14. You can start stepping through code by usnig Step Into command from the Debug menu. Or pressing F11. But first set a breakpoint on the first line of your sub that handles the button, you can do that by clicking on the gray area just left of the code editor. Then start your program. When the program reaches the breakpoint, the execution will stop. Then keep pressing F11 to step through the code.
  15. If the application just hangs then my guess is that it hangs on one of the loops. Did you try stepping through the code to see at what point in the method it hangs?
  16. I would say that you should introduce some kind of an academic license. If its for education then many people can benfit from it. My 2 cents :)
  17. Why would you get trouble? You didnt say what you would do to combine them or anything like that, without that I dont know what to say :).
  18. Yes it is, Managed C++ refers to writing C++ application using the .NET Framework.
  19. The tabs have the paint event fired everytime you switch back to them. So what probably happens is that when you switch to it everything gets earased because of the paint event. If what Im talking about is not the case please correct me :).
  20. Try using AutoSize instead of Stretch.
  21. What is the code that causes it to hang?
  22. I wouldnt recommend a book on syntax as much as a book that covers the Framework itself. If you want to lean about the syntax then simply reading several pages from MSDN collection will get you up and running with the syntax,
  23. You dont need any special combo box for it. You simply have to store the key name that the user chooses into registry or some file and then load it when you need to.
  24. MFC and Window Forms are two different technologies. Both for working with user interface but different. Windows Forms projects are projects for .NET Framework, because Windows Forms is part of it.
  25. Does the application show you any errors and stops responding or just hangs? If there are errors tell what they are.
×
×
  • Create New...