Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. What is the name of the class that is the form? Use that name.
  2. Adobe Acrobat Reader comes with an ActiveX control you can put on your form. If you have it, go to your toolbar, Add\Remove Components, then COM components and then look for a name that starts with Adobe.
  3. mutant

    Memory

    CLR is, I guess you could say, the whole engine of the .NET framework. It manages memory of .NET apps and all the .NET applications. CLR stands for Common Language Runtime. Read more about it here: http://msdn.microsoft.com/netframework/technologyinfo/overview/
  4. As far as I know its impossible to put a top level control in a control.
  5. Oh, well I assumed too much :) But maybe that code could become of some use to you in the future. Yes, that would be all you need. Sorry for wasting your time with my assumptions, when I could simply write what you just typed up there.
  6. Btw. for this whole thread I was assuming that you want to work with that instance of the form from the parent too, and from your other child you just wanted to do something to that instance, in other words you wanted to use that instance in both parent and another child. Is that right? If you dont need to work in the parent with that child you show from the other child then there is no need all this, simply showing creating a new local instance and showing it would work. Just thought I would ask :)
  7. Oh, I thought you would have some code in that form that would hide itself. If you dont mind creating new instances then before opening it simply initialize a new instance: DirectCast(Me.MdiParent, Form1).edit = New edit DirectCast(Me.MdiParent, Form1).edit.MdiParent = Me.MdiParent DirectCast(Me.MdiParent, Form1).edit.Show()
  8. I assumed that you already set the MdiParent property for the child, thats why you have to add that line because you probably didnt assign a parent eariler. By using .Close() method of the form you are disposing it. Do you want to preserve the instance of your child so you only have one, or with each opening you want to create a new one? If you want one then instead of closing the form hide it, and then show it when you need it. If you wat new instance each time you want to open it then simply create a new instance on that variable before opening it.
  9. Paint doesnt have that option, I dont think many programs have it. What you can do it to find a website which lists RGB values for colors and then add a custom color to the Paint's list that in the Colors menu.
  10. You could make sure that the variable you create on your parent to call that another child is public, and will be accessible from another class. Then cast the MDIParent property of the current child to an actual class name of your parent form and then access the variable you create for that other child like this: DirectCast(Me.MDIParent, Form1).OtherChild.Show() Other simple way be to store your insatnces of all children as shared in a separate class.
  11. Sorry, I dont get your question. Are you trying to check colors in some drawing program, your program or what?
  12. It should work, are you sure you matched the color? But that wouldnt work the best anyway. Becuase what was behind the form would show. You could do it another way. Get the picture box's image to a bitmap object, make it transparent using MakeTransparent() method and then assigning it back to the picturebox or refreshing the picture box.
  13. Im sorry but you cant use the .NET SDK under Windows ME, but you can run the .NET programs on ME. Quote from SDK download page:
  14. Dim text As string = "Some : Text" Dim texts() As String = text.Split(":", 2) 'split the text with ":" and then you can specify how many string can be returned As the Split function an array of string, if you dont want array you will have to assign the values of the array members to your variables.
  15. If im understanding correctly what you want to do cant be done. You cant pass in a boolean value in place of System.ComponentModel.CancelEventArgs, and you cant change the value like that because you are setting it to true anyway. You could make another boolean value that will be for example set to true and if its true then change e.Cancel to false. All of this is based on assumption :).
  16. You need to translate the cursor position to be relative to the form. Use the PointToClient() method of your form, and pass in the cursor coordinates to it. That will return the values that will corespond to the form.
  17. You can create one, or you can use the one from paint event. To create one do this: Graphics gr = this.CreateGraphics(); //this refers to the form here Now you will be able to draw to the form. or use the one from Paint event: e.Graphics.DrawRectangle(coordinates that you pick);
  18. Its supposed to be WriteLine, C# is case sensitive. :)
  19. I would recommend this website, it contains a lot of interesting topics: http://www.csharp-corner.com/
  20. Application.DoEvents() lets the OS handle its messages, very useful in loops. If you have a loop that does a lot of things the OS can be stuck in the loop and not processing other messages which can cause it to freeze. [edit]:) beat me[/edit]
  21. I dont belive there is an option like that, never seen it.
  22. Never seen that error, if your project has no references when you start a new project, can you add any? Or any files?
  23. OpenFileDialog cannot be inherited, you would have to create one from scratch.
  24. You need to have a Select Case or If Then statement to check what VK it is.
  25. Are trying to use Sub Main to start the program? If not, go to your projects properites and I think (dont have VS.NET available now to check where excatly it is) then General section and set your form as the startup object.
×
×
  • Create New...