Jump to content
Xtreme .Net Talk

aewarnick

Avatar/Signature
  • Posts

    1052
  • Joined

  • Last visited

Everything posted by aewarnick

  1. How would I initialize this instance variable reading from a text file or xml file? int SmallRTBResizeH=??FromFile()??; I tried that, it does not work. This is one of the user defined settings in my program. Is text or xml the best way to go?
  2. Why does this not work? ContextMenu C=new ContextMenu(); C=contextMenu1; if(MouseButtons==MouseButtons.Right) C.Show(); When I put the . in after C nothing pops up, it is not recognized. Something is wrong.
  3. Ok. Then I'll just use DES Encryption.
  4. Most everything I saw was web stuff and the one I found that could be used to encrypt my text files needed NT to work. Is there anything else?
  5. How can I encrypt my text files easily with my program so that they can only be read by the program? Or better yet, entire directories?
  6. Never mind, I found that you cannot have any statements after the if structure. if else if expected first thing.
  7. if(File.Exists(FileArr[0])) { LArr[i].Text=FforL; StreamReader SR=new StreamReader(FileArr[0]); RTBArr[i].Text=SR.ReadToEnd(); SR.Close(); } string file2= house+"\\"+"CommLog"+"\\"+"Names"+"\\"+(i+1)+".txt"; else if(File.Exists(file2)) { MessageBox.Show(file2); StreamReader s=new StreamReader(file2); LArr[i].Text=s.ReadToEnd(); s.Close(); } I get an error underlining if else and it says ivalid expression, term else.
  8. Could I also put the right click in the Click event and even right click event?
  9. What about right click events, how can I configure those, the menu and everything.
  10. I pretty much knew how to do it but I would think that double clicks are common and VS would have them like the rest of the Events. But I guess not. If anyone knows where that event would be please let me know. Maybe I have a cheap version of MSVC#? I got it from office max for 100 bucks.
  11. This page: It is not there on mine.
  12. In the designer, when you click on the lightning bolt for Events there is usually a Click event but I never see a DoubleClick event. I want to put DoubleClick events in my code (my program).
  13. If so, where is it? I can't find it.
  14. Here is what I wrote: And I need something that will not return any file name in any folder I specify no matter what the folder is. I think that can be done with Batch files like this: c:\folder\..\folder\.. Actually, that probably won't work, but you should get my point.
  15. Panels work exactly the way I wanted them to. Thanks, guys!! (or girls).
  16. It is not a sentence. It is a file. I am removing the extention.
  17. int start=FileArr.LastIndexOf('.'); file=FileArr.Remove(start, FileArr.Length - start); That works perfectly.
  18. int start=FileArr.LastIndexOf('.'); file=FileArr.Remove(start, FileArr.Length); In bold is the problem. I cannot figure out a way for Remove to just go to the end of the sting, without going through alot more trouble. There should be some kind of method to do it but what is it. .Length returns the length of the whole string and an error is produced.
  19. Had to jump though some hoops for this one! FileArr=Directory.GetFiles(directory); MessageBox.Show(FileArr); string[]file=FileArr.Split('.'); int start=file.LastIndexOf("\\"); file=file.Substring(start+1); MessageBox.Show(file); Does anyone know the answer to the question posted in my other post above, about how I can say "any folder or file" in my code?
  20. The program saves the documents as the names of the labels. That is why I need the names of the files and only the files (no extention) because I will use it to name the labels when the files are opened.
  21. That is VB not C#. And I need something that will not return any file name in any folder I specify no matter what the folder is. I think that can be done with Batch files like this: c:\folder\..\folder\.. Actually, that probably won't work, but you should get my point.
  22. string directory=house+"\\"+"CommLog"+date+"RTB"+(i+1); FileArr[0]=Path.GetFileNameWithoutExtension(directory); It only returns the name I already know(RTB1,RTB2,RTB3...). It does not return the names of the files in the folder. Another topic: How can I say "Get anything"? Ex: "c:\\folder\\"Get anything"\\file".
  23. That returns a string with the path as well. I need just the file names.
  24. I need a method that will enable me to get only the file names in a directory and put them as strings into a string array. Does anyone know something like that or close to it?
  25. I wouldn't mind using panels but I didn't think that they would act the same as they will my way, will they?
×
×
  • Create New...