Jump to content
Xtreme .Net Talk

kejpa

Avatar/Signature
  • Posts

    321
  • Joined

  • Last visited

Everything posted by kejpa

  1. Hi, How do I save my favorite color to the Registry and then use it for the color of a textbox?!? I tried oRegKey.SetValue("FavoriteBackColor", txtFavorite.BackColor.ToArgb, RegistryValueKind.DWord) txtFavorite.BackColor = CType(oRegKey.GetValue("FavoriteBackColor"), Color) but it doesn't work. "Integer can't be converted to Color" I'm told.... TIA /Kejpa
  2. Thanx! I'll have a look at it at once! /Kejpa
  3. The schema you suggested will be just fine, still there's the question of how to read it in a flexible manner?!?! What if I have an old settings file w/o some of the new sections (eg. "Parameters")? As of my current implementation that generates an error. Yes, dealing with XML is a problem to me. It's not as flexible as I find using Registry keys or ini files, but I've realized that I have to abandon my prejudices about this "thingy" that I rejected as a hype back in '98 Regards /Kejpa
  4. Yes, I have had a look at it and it's messy. And I get the feeling that in .NET2005 (which I use) it's even more complex. There are too many almost the same classes and you get no help in choosing. As for the time being I've decided that there can only be two IO:s (no more, no less)but I know my manager won't like that limitation. Regards /Kejpa
  5. Hi, I trying to make a flexible config file using XML, but I'm not sure how I should read it... This is the way it looks: <Settings> <ComPorts> <IO1> <PortName>COM2</PortName> <BaudRate>19200</BaudRate> </IO1> <IO2> <PortName>COM4</PortName> <BaudRate>4800</BaudRate> </IO2> </ComPorts> </Settings> There can be any (up to 10) number of IO:s and for each IO I need to create a SerialPort. My Q is how I read a file with unknown number of IO:s? Should I add an element that contains the number of IO:s? XML is supposed to be so simple and flexible. I only find it confusing, what have I missed?!? :( TIA /Kejpa
  6. That's nice! With Option Strict turned on you're into some nastier looking code with CType... But I guess it pays off in the end ;) Thanx a bunch! /Kejpa
  7. Hi, I have a couple of Enums I save as strings (ie, hsNone for Handshaking) when I read back what I've saved I'd like to set the enums to the string value. sSavedValue as string = "hsNone" ocom.Handshake= sSavedValue How do I do this? Do I have to loop and check if strings match? TIA /Kejpa
  8. Hi, does anyone know of a IDE like textbox where you can colorize your commands? We have a set of commands for controlling some external devices and it would be soo nice if I could make the commands appear colorized and maybe also indented. Is there such a contol available (for free ;)) ? TIA /Kejpa
  9. Hi, Unless you use parameters for your updates you have to provide the dates the (US) standard way "mm/dd/yy". That's as localized as it gets. HTH /Kejpa
  10. :o It was that simple. I ought to be ashamed of myself for not figuring it out.... Thanks anyway! /Kejpa, somewhat embarrased
  11. Hi, I have a textbox that shows the trace output of my app. After the text is updated I always see the first line. I'd really like it in another way. If the caret is at the last position of the textbox I want to see the end of the text box. If it's in another position I'd like to keep it there and have that row visible. I can't find any methods for scrolling the textbox to the caret position, help please! /Kejpa
  12. Very good idea, searching for 3rd party controls and books would be much easier and you'll get relevant reviews as well. Go go go! /Kejpa
  13. Hey! I guess that's the reason, there are some old (3rd party) dll's and ActiveX componenets that we must rely on. Dealing with automation systems isn't exactly cutting edge technology, most of those guys are still into NT4 and VB5/6. Thanx a bunch! /Kejpa
  14. Of course I can, but the rest isn't going to give you any further information :( " A first chance exception of type SensorNotPresentException occurred in MyApp.exe" Nothing more, no line number no class or thread name, no method information. I throw SensorNotPresentException when a sensor isn't present. And just for testing I've unplugged them all. My question is why I get the line in the output window, and not so few of them... All exceptions catched are put in a TraceOut-file and there is no lines like that in the TraceOut-file. :confused: /Kejpa
  15. Hi! I get this message in the output windo all the time. Any one know what's wrong or just how to get rid of it? TIA /Kejpa
  16. Hi, I have made a custom control without any user interface (extended the System.Timer...) and I want to be able to have it licensed. Somewhere I read that there can only be licensing on forms components and not to those sitting at the lower part of the design time window. Anyone know? TIA /Kejpa
  17. So basically you're asking how to get the text from a combobox. You'd better hurry to windows forms or ASP subforums ;) I'm not familiar with c# :( But in vb combo_CaseNo.text returns the text of the combobox. HTH /Kejpa
  18. Send the characted for the button pressed to the textbox: pseudo code EventHandler for A_button_clicked { textbox = textbox + "A" } HTH Kejpa
  19. True! I tried it a couple of times too but then I told my manager that this wasn't polite and ever since I always use two fields for this. (Or three if the middle initials are important) /Kejpa
  20. No not Windows OS, I want to install Adobe Reader silently and without the user needing to interfer. In order to do that I need to change a few properties in one of the files (abcpy.ini) inside the selfextracting CAB archive. Currently it looks like I have to extract all files, make the changes and ship all of the files instead of just a single one. Takes a whole lot of more place too :( /Kejpa
  21. Component One I think it's about £400. /Kejpa
  22. Hi! Anyone know how to replace files in a selfextracting CAB archive? I'd like to tweak an installation but I can't write the cahnges back neither with WinZip or WinRar. TIA /Kejpa
  23. There are two ways of securing a Access database. One is to set a password the other is to make your own system database (system.mdw). The first option is the simplest and easiest. If you want some users to be able to open the database using Access you just supply them with the password. On the other hand you then give them total management of the database.... The second option is more complex, you have to first create the system database, then you need to create the database using that system database (the other way around doesn't work....) If you want some users to be able to open the database using Access they have to set this special system.mdw as their default system.mdw and connect with username and password. In this system.mdw you can have many users with different levels of management and keep the total management to yourself. Sooo, the bottom line. The first option is simple and safe, the second is complex and safer. Which is better? Sparkling or still spring water? Depends on your taste and preferences. HTH /Kejpa
×
×
  • Create New...