
Jedhi
Avatar/Signature-
Posts
128 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Jedhi
-
toolbar How do I in C# ASP, make a toolbar that is always visisble how matter how many aspx pages I have. Do I have to make the same toolbar at all the aspx pages I make ??
-
I have a problem with eventhandler, to be more exactly it is in my form where I get the AddNodeEvent. If the thread is not right I want to invoke the function again so that I get it right, but when it try to invoke it make a cast.
-
Thank you so much. Your help has really been a big help for me. Thank you so much.
-
Let say that I have a Hashtable ht = new Hashtable() My hashtable consist of a key and a value. The value is a Queue. Everytime a command is being saved for this key the queue will be increased. Until a command has been executed and it will there after be decreased. Since I can only add a key to the Hashtable once, how do I then solve this problem ?
-
the object _value is [0] [0] class [1] command Please let me know what you would suggest to follow the 00 Practices. This is what I have to do: I have a device that can sleep and later wake up. When I ask the device to operate a command and it is sleeping, I want to save its number, it class and command, so that when it later wakes up it reads from the hashtable or whatsoever to fullfill the command. How would you suggest me to do that ?
-
I have a hashtable where I have added something into it. hastht.Add(no, new object[2]{class, command} IDictionaryEnumerator myEnumerator = cmdqueue.GetEnumerator(); myEnumerator.MoveNext(); _key = myEnumerator.Key; _value = myEnumerator.Value; The _value contains class and command that I wish to get, but if I try object[] xxx = (object[])_value; I get the error that the cast is invalid. How do I solve this !
-
public Queue exQueue = new Queue(); cmdQueue.Enqueue(new object[3]{byte n1, byte[] data}); Later ..... object packet = cmdQueue.Dequeue(); Now I want to extract the n1 and data from the packet, but It does not seems that I have any luck with that. Any suggestions ?
-
I have a ListView on Form1 that I update on different times. My problem is that when I am in function Test() I need to call the function UpdateListView. The only way I can this is to make UpdateListView static, but then I get the error "An object reference is required for the nonstatic field method". How do I solve this problem Class Form1 { X x = new X(); TestListView() { x.Test() } UpdateListView() { listView1.Items.Add } } Class X() { Test() { How do I call UpdateListView } }
-
Thanks Thanks all I did what code mechanic suggested, and now it works. Thanks.
-
I have made an editor that should read text files. When I am in the editor and press the open file, It opens text file without problem. when I double click on txt file I would expect that this editors open the file, but instead it opens the editor, but it never show the cotents of the file. It is like the openfile function never get called. Somebody experience the same ? What function does it jumps to, when I double click on a txt file ?
-
I can not use a single delegate since one delegate use 1 parameter and the other use several parameters.
-
The only reason to do it, is to avoid multiple functions that do the same things except for its delegate type. So be able to choose between type of delegate to transfer multiple functions could be limited to one.
-
Are there a way to have typeless delegates ? For example delegate void VoidDelegate() delegate bool BoolDelegate(bool parm1, bool parm2) Take for example you want to call a function ProcessDelegate. and the parameter you want to transfer could either be a VoidDelegate or a BoolDelegate. Instead of writing two function with exactly the same contents except for one of the function has the type VoidDelegate. Is it possible to make the delegate typeless ? void ProcessDelegate( delegate could either be VoidDelegate or BoolDelegate) { }
-
Thanks I'm downloading a beta version to give it a try. Do you know why EnumPorts does not find the two COM port that you find in a USB to a RS232 converter. Device Manager finds it !
-
Could you be more specific. What do you like in 2005 that does not exist in 2003 ?
-
IO.Serial.Port Thanks alot. I was wondering if It was not supported by .NET 2003. Yet nothing was written, so I thought that it might maybe be something else. I was actually enumerating my ports on the system with EnumPorts, but then I discovered that I did not showed all my COM ports. For example I have an USB to RS232 converter, where it did not find my COM port, so I tried to look for another solution. Have any ? Besides IO.Serial.Port are there any other great things in .NET 2005 ?
-
I use .NET 2003 and I wanted to use "using System.IO.Ports" which is in the System.dll of Network Framework 2.0. I have downloaded Network Framework 2.0, and when I try to add the new System.dll as reference, I get the Error, see picture. Somebody experience the same thing ? And what to do ? I have not read that it could not be used for NET 2003... Environment.bmp
-
I have an application using Thread that is writing data to an excel sheet. Sometimes I experience that data is not been written to the excel sheet, so that an empty gab appear. How can that be ? Anyone experience the same ? Do you use InvokeRequired for excel sheet ?
-
I am making a test that by every 4 hours report an excelfile. While running the test I want to be able to look in the present and previos excel file. But somehow it would not let me do it, it is like the previous file is not released. Could anyone tell me what I am doing wrong ? private Excel.Worksheet ws; private ExcelClass logfile; ws = logfile.Activate(); // 4 hours has gone save file and make a new if (timesp.Hours > 4) { logfile.Save(); logfile.Close(); System.Runtime.InteropServices.Marshal.ReleaseComObject(ws); ws = null; StartNewReport(); // Waiting for a new worksheet is generated. while (ws == null){}; } } ----------------------------------------------------- ExcelClass() { Excel.Workbook wb; Excel.Application _excel; public Worksheet Activate() { { string Filename = DateTime.Now.Month.ToString("00") + DateTime.Now.Day.ToString("00")+ "-" + DateTime.Now.Hour.ToString("00") + "_" + DateTime.Now.Minute.ToString("00")".XLS"; // Create a new workbook if (_excel == null) { _excel = new Application(); } wb = _excel.Workbooks.Add(Type.Missing); wb.SaveAs(Filename,Excel.XlFileFormat.xlExcel9795,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Excel.XlSaveAsAccessMode.xlNoChange,Type.Missing,Type.Missing,Type.Missing,Type.Missing); Excel.Worksheet ws =(Worksheet) _excel.ActiveSheet; return ws; } catch(Exception ex) { Console.WriteLine(ex.ToString()); } return null; } public void Save() { wb.Save(); } public void Close() { // Need all following code to clean up and extingush all references!!! wb.Close(null,null,null); _excel.Workbooks.Close(); _excel.Quit(); System.Runtime.InteropServices.Marshal.ReleaseComObject(_excel); System.Runtime.InteropServices.Marshal.ReleaseComObject(wb); wb = null; _excel = null; GC.Collect(); }
-
Is it possible to have a ListView looking like a comboBox with the dropdown menu ??