Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Try flushing the stream: fileName.Flush()
  2. You could read the whole file into a string, then if you are looking for numbers use Regular Expressions to find any numeric values. First read the file using a IO.StreamReader's read to end method and then use a RegularExpression object to seach the string. Ad then you could use a pattern like: "[0-9]" to search for numbers using Regular Expressions.
  3. Do you want to put the picture in a picturebox? If yes then this is how you can load it: PictureBox1.Image = Image.FromFile("path to the image") 'use a shared method of the Image class to load the picture I believe that Word documents are encoded and simply reading them wont give you good results.
  4. You can find tons of icons with Google :): http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=computer+icons
  5. I would recommend using Forms Authentications instead of doing all this by yourself. Just Google "Forms Authentication" and you will find a lot of good tutorials.
  6. You can find a great tutorial on writing plugin enabled apps here, by Divil: http://www.xtremedotnettalk.com/showthread.php?s=&threadid=49597
  7. They look like this: http://www.xtremedotnettalk.com/t72211/s.html You have to change them so they look like this: http://www.xtremedotnettalk.com/t72211.html Without the "/s" part.
  8. Im not really sure If understanding you right so this maybe not what you are looking for :). You could add a handler to all your textboxes and then another one for comboboxes, handler to event that would indicate that the control has been modified, like TextChanged for TextBox. And have a boolean value which would be set to true if anything is modified. Then you check when the person hits cancel what the value is and do what you have to do when the value equals true or false. And when you save the state just set it back to false.
  9. Both PHP and ASP.NET require runtime files on the server. If you are getting hosting on Windows platform then ASP is a better choice as PHP was mainly developed for and optimized to work with Linux/Unix. Php was optimized to work with MySQL as the main database for the lanugage. If you want maximum preformance for ASP.NET then I would suggest using MSSQLServer.
  10. See if putting this under #include statements gives you errors: using namespace std; std is a namespace that contains all the standard functions.
  11. If you are just reading a plain text file then use the IO.StreamReader class. :)
  12. Ah, sorry, I didnt notice that you were using binary access. Thanks VolteFace. Dim reader As New IO.BinaryReader(New IO.FileStream("Path to the file", IO.FileMode.Open)) 'new binary reader, you have to create a filestream as the BinaryReader 'itself doesnt take file paths but streams 'then you can read reader.ReadChar() 'or other methods like that reader.Close() 'close the stream
  13. You shouldnt use the old VB6 methods. Use System.IO.StreamReader class for reading files and System.IO.StreamWriter for writing to files. Here is how you can a file into a variable and then assign it to a textbox: Dim reader As New System.IO.StreamReader("path to the file") Dim textfromfile As String = reader.ReadToEnd() 'use the ReadToEnd() 'method to read the whole file TextBox1.Text = textfromfile 'assign the variable to the textbox's text
  14. Sorry that I cant help you much now, but I can tell you that this not a problem with DirectDraw. I remeber solving this problem but now I dont remeber what caused it and how to fix it, Ill try to reproduce this.
  15. Congratulations :). I think that you once had in your signature that that if they came as planned you would share birthdays, didnt work out I guess :). Cool names btw.
  16. conversion is a char so you need to use ' instead of ": if (conversion == 'b') Also, you dont need to include stdio.h as you dont use anything from there in your code :D. Also, if you want your program to not stop running after executing all code, so the person can see results you need to add something that will wait for the keyboard input. You could add this: int y; std::cin >> y; Right before return 0;. You wont need this if you plan on running your program from command line.
  17. Yeah, its a version for DirectDraw, ive been working on it lately. I need to add scrolling if the text is longer then the control and some other minor things. (building controls from nothing is a little frustrating :) ) :)
  18. You can also use the IndexOf method of the string object, and look for quotes. IndexOf returns the number of characters at which the string you are looking for starts. So you could have two of IndexOf calls that will look for a quote and then use SubString method to get the string from between the quotes.
  19. You can search for a quote using a double quote: "" Double quote stands for a single quote when used in string. So you can use it in split: Dim str As String = "COM:""Some text""" DIm strs() As String = str.Split("""")
  20. The thing I like about Google toolbar is that it shows the PageRank which is interesting sometimes.
  21. That explains it :). Your project and solution are called ComboBox, which makes the rootspace of your project to be "ComboBox". It was interpreted as a namespace, thats why it wanted a type, because it was getting a namespace name.
  22. I think you are right VolteFace, if the full namespace path works, that must be the cause.
  23. :) But still, what you did should work because I see that you use TextBox without the full namespace name so it must be imported and TextBox is in the same namespace as ComboBox so if it works, ComboBox should work too.
  24. What you could do is to either create a class wth shared members that you will assign an instance of your mdi children or create public variables in your parent and assign the child instances to those variables and then access them from children using the MDIParent property. If you want to use the class with shared members then make a new class and make it look like this: Public Class SharedInstances 'you can call this whatever you want Private Shared _childoneinstance As ChildOneForm 'private variable of the child type Private Shared _childtwoinstance As ChildTwoForm 'then have properties to modify those variables Public Shared Property ChildOne As ChildOneForm 'property of the form's type Get Return _childoneinstance End Get Set (Byval Value As ChildOneForm) _childoneinstance = Value End Set End Property 'and then for the second one Public Shared Property ChildTwo As ChildTwoForm 'property of the form's type Get Return _childtwoinstance End Get Set (Byval Value As ChildTwoForm) _childtwoinstance = Value End Set End Property Then when you create those two children from your parent set those properties to the instances your created in your parent. SharedInstances.ChildOne = variablewithinstance SharedInstances.ChildTwo = variablewithinstance Then you can access the shared class like this from any other form in that project: SharedInstances.ChildOne.SomePropertyormethod()
  25. Thats a weird error, never had it before. Does ComboBox show when IntelliSense pops up after "Is"? Did you try using Windows.Forms.ComboBox, as this is the full path to it.
×
×
  • Create New...