Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Can you show your constructor of second form and how you call it, and where you use the instance?
  2. Thats why I showed you how to pass instances to use it in other form :)
  3. Didnt think of that :D Thanks!
  4. If you start your program from sub main just declare your form as public beofre starting it. If you start from a form you can either pass the instance around through constructors or make some public variable in a module. To pass instance through constructors: Let say Form1 is your main form and Form2 is some other form. In Form2: Dim formmain as Form 'some variable to hold the instance 'pass in the form instance Public Sub New(byval mainform as form1) 'get the variable that 'contains the form's instance MyBase.New InitializeComponents() formmain = mainform 'get the instance to a variable that 'can be used in this throughout this class End Sub 'in some other sub public sub DoSomething() formmain.sometextbox.text = "some text" 'use the variable with 'that instance to access the textbox on the form. end sub You can do that, or declare a public variable.
  5. Kepp an instance of your main form or the textbox in some public variable or pass it around your forms.
  6. Framework has been improved, more classes, IDE is better, you can write apps for mobile easily, and things like that :) It is a good investment.
  7. How does your code look currently?
  8. Ok, thanks! :)
  9. How would I register my nick? I tried the NickServ thing but I dont think im doing it right :) :rolleyes:
  10. You dont need inheritance for that, you just need some functions to accept parameters that you need. Those should easily be implemented in your form class. Database connections dont require any special inheritance.
  11. Inheritance in .NET plays a huge role :) For example every control inherits from the base Control class. If you put functions in a module you will not be able to inherit at all. If you want to inherit from something create another class. What are you trying to do? It will be easier to explain and get to what you need if I know what you are trying to do :)
  12. If it doesnt inherit from form than the class will not be a form. You cant inherit from anything else if you want to have a form. Create another class and inherit from whatever you need.
  13. I recently started a ASP.NET project. I have a ascx file which I put on my web form. This is a part of my ascx file: <div align="center"><%#COPYRIGHT%></div> Then I drag the ascx onto my form. How can I let the ascx control know of variable copyright from the page? I never worked with ascx files before :rolleyes:
  14. You cant compile Framework 1.1 with VS 2002. You need VS 2003 or use command line compilers. Considering the price you should get yourself that special upgrade for 29$ :)
  15. SetResoltuion of the Bitmap class should work.
  16. Wow, that book is old :D ;) I think you made a good decision. It looks like it has a lot of useful info. I myself had a book day today :), im tired of going through those tutorials that come with the DX SDK :). And this looks like a pretty good introdution to D3D. http://www.amazon.com/exec/obidos/ASIN/0672324989/
  17. I never really worked with Crystal Reoprts but I noticed your poll. I wouldnt recommend buying a MS Reference. It contains things that you can find in your help files. Go with something thats not a core reference. You would be better buying some other book to learn then reference.
  18. :) Nice article. Informative :)
  19. To me it seems like they will concentrate everything now on developing the SQL server. SQL server hosting CLR? Wouldnt that add more trouble than the .net syntax is worth?
  20. Your own-made form, shown as modal, and with dialog properties set for buttons.
  21. That was just an example of what you can add, you have to type in the actual values :), like: graphpath.AddEllipse(100, 100, 100, 100) 'just an example values
  22. Use this: textboxname.Text = InputBox("whatever you have here") You said you make a simple interface, but when you get into more complicated stuff dont use InputBoxes, they are old, not part of the .NET framework and look ugly :)
  23. I think an XML file would be great for this kind of thing. Its a lot easier to navigate than normal files. Im still not sure about the rest becuase you didnt answer my question :).
  24. Did you try setting KeyPreview property of the form to true?
  25. Put this in PropertyValueChanged event: If e.ChangedItem.Label = "nameofyourproperty" Then Try Integer.Parse(e.ChangedItem.Value) Catch ex As Exception MsgBox("No numbers!") End Try End If
×
×
  • Create New...