Jump to content
Xtreme .Net Talk

Jedhi

Avatar/Signature
  • Posts

    128
  • Joined

  • Last visited

Everything posted by Jedhi

  1. Jedhi

    Sd card

    Does anyone know how to set or retrieve information from a Security Digital card or a CF card ?
  2. On a pocket pc under Settings\Connection there is the possibility to add a new modem connection. When do you want to add a new modem connection ? Is it when you have a SD card , CF card ? or is it required when you want to have serial communication to for example a SD card or CF card ?
  3. Jedhi

    Object

    re Object[] Info = (object[]) data; byte id = (byte)Info[0]; Then it works !
  4. Jedhi

    AddMinutes

    Thanks Thanks alot
  5. Thanks Thanks alot
  6. Jedhi

    Object

    I have a timer that is been called every 3 second. As state I add two new objects, but how do I retrieve the information of ID and Line in the Callbackfunction ? report = new System.Threading.Timer(new TimerCallbackthis.Callbackfunction),new object[2]{ID,Line},3000,System.Threading.Timeout.Infinite); private void Callbackfunction(object data) { id = data[0] // Does not work since it is not an array. How do I retrieve data }
  7. Jedhi

    AddMinutes

    long a = DateTime.Now.Ticks; DateTime.Now.AddMinutes(15); long b = DateTime.Now.Ticks; Following example shows that a and b have same value. Instead I have expected that b would have 15 minuttes more than a. How do I make it that way ?
  8. Could you give me an example ? Remember that I have 1 key and 3 values.
  9. I have created a hashtable class with key id and 3 values id, column and error. _hashtable.Add(id,new object[3]{id,column,Error}); To get information about the id and how many Errors the id have, I write Info = (object[])((ArrayList) _hashtable[id])[0]; int _theIdError = (int)Info[2]; _theIdError++ Now the hashtable must be updated to contain the lastest number of errors (_theIdError) for the specific id. How do I do that ?????
  10. I think it depends on your background color of the icon you have choosen to your toolbar. I have given up the image stuff, could not find any solution for it. Instead I have made a transparent icon with text and that works fine.
  11. On my toolbar I have some buttons with images. When I set the toolbar button to enable = false, the image disseapear and instead I see a dark rectangle image on the button. I would have expected to still see the image, but grayed out. How do one make possible to see whats on the button when it is not enabled. I tried to remove the image temporary when the button is disabled and put some text instead without any success. I guess it must be an old fact how to handle this problem, but I have not succeded to see any solution for this. Got any ideas ?
  12. Thanks alot. I'm just doing a windows application without web in C#. I just think I'll make a xml file or txt file, read the file into a hashtable and when exist I'll update the file with the hashtable.
  13. First of all I am a bit confused what to use xmltextreader, xmldocument, FileInfo, Filestream. ......? What would you prefer ? Second I had being thinking of loading information putting the information into a hashtable or something and when closing or adding a new name write the file with the content of the hashtable. But at second thought, if I could operate directly on file, what do I need a hashtable for. But what is more preferable ?
  14. How do you read and write to a file, but in the same makes it possible to get specific data. For example you only want the data of Alfred ? Would it be possible like you do with class like writing Name. and you have the choice to select either Viggo and Alfred ? Name Viggo Address SSS city XXX Name Alfred Address VVV city yyy
  15. Jedhi

    crash

    I have the following code that works fine for the .NET framework 2003, but when I run it on the Compact Framework 2003 (pocket pc) with service pack 1.0 3, It crash in the ReceiveData. Begin and Endinvoke is recognized in SP2, so I can't see there should be any problem. What goes wrong !!! public delegate void DelegateRxHandler(byte []pData, byte length); private DelegateRxHandler RxHandler = null; public constructor () { Initialize(new DelegateRxHandler(DoSomethingWithReceivedData)); } public void Initialize(DelegateRxHandler handler) { RxHandler = handler; } public void ReceiveData { ------------->crash RxHandler(receivedFrame,rxLen); } public void DoSomethingWithReceivedData(byte []pData, byte length) { ... }
  16. Thanks alot Wile, just what I need. I just need to Import the setupapi dll to use the SetupDiGetDeviceRegistryProperty function. I just can not get why nothing alike exist in C#. If anybody reads this, and know how to do it in C# way, please let me know.
  17. In C++ I can use this function to get the device properties. Frankly I am interested in getting the friendly name of the device (fname), so I know exactly which com ports exist. bool bSuccess = SetupDiGetDeviceRegistryProperty(hDevInfo, &devdata, SPDRP_FRIENDLYNAME, NULL, (PBYTE)fname, sizeof(fname), NULL); But I can not find anything that just look alike in C#. Any suggestion ?.
  18. In C++ there is a function called SetupDiGetDeviceRegistryProperty, that retrieves the device property. But in C# I can not find this function. Could anybody help me to tell me what it is called in C# ?
  19. string data = "123 456"; byte[] byteArray = ASCIIEncoding.ASCII.GetBytes(data); I want to convert a string to byte array, but my problem is that I get all the characters in Ascii instead of hex or dec. How do I fix that ??
  20. I have been looking through the help file net_compact_framework.chm Go into namespace System / System.AsyncCallback (module mscorlib.dll) this tells that begin and EndInvoke is both supported by the .NET framework and the .NET compact Framework. Using the .NET compact Framework with begin and Endinvoke the pocket pc crashes. Is the help file incorrect, or do I miss something ???
  21. The last two parameters of begininvoke are System.AsyncCallback and object. The object is used to set the state_of_the_invoke, that you later can verify in your IsCompleted function public void IsCompleted(IAsyncResult ar) { if (ar.AsyncState == state_of_the_invoke) } When I now use invoke, does it mean that I no longer can use state, or do I have to make a global function that keeps track of states ??
  22. How do I combine a delegate with an invoke public delegate void FlowerDelegate(byte color); public FlowerDelegate Flowerchosen; Flowerchosen.begininvoke(...) This will obviosuly works with begininvoke, but I want to make my calls synchrounously instead. How can I do that ?
  23. I tried to set the font, but it did only effect the controls on the form and not the form itself. I you only want to set the font size of the form how do you do it ?. You know the header text that normally has the name of the application.
  24. Is it possible to change the font size of the Winform ? Only on the Winform itself, not all the controls that are on the winform.
×
×
  • Create New...