Jump to content
Xtreme .Net Talk

aewarnick

Avatar/Signature
  • Posts

    1052
  • Joined

  • Last visited

Everything posted by aewarnick

  1. It was the view. The only one that works right is Small Icon.
  2. Only horozontal scroll bars.
  3. How can I use vertical scrollbars in a ListView? There is no option for it in VS.
  4. I had no idea. Thank you.
  5. Your own Browse for Folder Dialog! I did not download it becuase it is VB not C#.
  6. File Dialog only to choose a directory. How can I do that?
  7. Ok, now I remember. DialogResult is a property, not a variable. It works now. Thank you very much.
  8. // // PassForm // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(194, 80); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.TB, this.label1}); this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "PassForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Security"; this.TopMost = true; this.ResumeLayout(false); this.DialogResult=DialogResult.No; } #endregion private void TB_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if((int)e.KeyChar==(int)Keys.Enter) { string pass=""; pass=CommunicationLog.aaa.GetValue("aaa").ToString().ToLower(); if(pass==this.TB.Text.ToLower()) { //CommunicationLog.Access=true; r=DialogResult.Yes; this.Dispose(); } else {//MessageBox.Show("Access Denied"); r=DialogResult.No; this.Dispose();} } -------------------------------------------------------------------------------- PassForm P=new PassForm(); DialogResult r= P.ShowDialog(); if(r==DialogResult.Yes) MessageBox.Show(r+""); else MessageBox.Show(r+"");
  9. Ok, I have it set up. But no matter what I get the result "Cancel" returned because I need to close the form with this.Close(). Even when I use Dispose I get the same thing.
  10. Having a form send back a DialogResult value. Is that possible? If so, how do you do it? I'll tell you what I am doing so that you understand better. I have a tab control that is password protected by another password form that pops up. If the password is correct I want to send back "access" if it is not correct I want to send back "noaccess".
  11. Here is how I ended up doing it: SetValue("LogBoxColor", ColorTranslator.FromHtml("#fff8f9d9").ToArgb());
  12. These are both red CommunicationLog.RegColors.SetValue("LogBoxColor", 0xffff0000); //TBLabelsColor CommunicationLog.RegColors.SetValue("TBLabelsColor", -65536); but the top is the one seen in the registry and it does not work in the code. I don't see any way to get that bottom number for unknown colors (unlike red). I don't see how those 2 numbers are alike because in the registry it says that 0xffff0000 is 4294901760 and not -65536. Can someone help? By the way, I am using the FromArgb methods to get the colors.
  13. Nevermind, the integer equivalent is too big. And even when I put it in my code like this: CommunicationLog.RegColors.SetValue("LogBoxColor", 0xffeeecd7); It still saves as a string and not a dword. I am stumped.
  14. Nevermind. You just save it as a number. All I need is how to get the integer equivalenes of these color values: fff9fbdd ffe7e8d0 ffbfe0f2 ffe7e8d0 ffd5e2ec
  15. All I can save so far is regular values in the registry using SetValue. How can I save DWord values?
  16. I have this test to see which control the contex menu pops up for but the problem is that it works for labels but not for Rich text boxes. In other words, when I right click on a text box no control is displayed in the messagebox but for labels it does. private void contextMenu1_Popup(object sender, System.EventArgs e) { MessageBox.Show(""+this.contextMenu1.SourceControl); } Is that normal? I have in VSC# the Context menu section set to the same context menu for both.
  17. Why can't I append to this: for(int i=0; i<textBoxCount; i++) { send+=RTBArr.Rtf; }
  18. I tried to do those 2 things but could not. Does anyone know how? Or do I need to give more detail?
  19. Thank you Nerseus. You were very helpful.
  20. Nope, it is not an explorer like inteface at all, the user will not even know what is going on, it will run about every 2 minutes and open files to read them and add to them a certain mark when the time is right. It is a security thing. So I need them all at once. It will not be near as long as windows but I think it still needs to be faster.
  21. Yep. I understand it now after playing with it for a while I see how it works. But it pretty much locks up when I try to get windows. I left for over an hour and it still was not done. Do you think that is normal or is my code just extremely inefficient? I wanted a way to immediately put it into an array instead of a huge string but I could not see any way to do it because I don't know how many files are in all those directories so that I can size the array properly. Also, when the computer is processing it it barely works! Is there any way to make it really work hard to speed the process up? Maybe putting the method on a separate thread? My other post is about that.
  22. Can I do those 2 things and how?
  23. Static methods are more convenient and eisier to use but I have seen that when I try to create a thread for the method I cannot. Or at least I don't know how. I will post a new post right now about threads.
  24. Oh! Great! I'll try it out! I like your quote, it's witty.
  25. Are there any disadvantages to making static methods for classes instead of just public?
×
×
  • Create New...