|
nice words but...that's not the only reason..
i'm curious and i want learn the C#..
i think the first step is to make the programs which i need (i'm speaking generally).
so if u want to to help me i'll be glad..on the contrary no problem..
|
|
|
|
|
What you want is probably impossible without using low level API calls. This is not a good way to learn a language, even if you were already familiar with the relevant api from C/C++ work.
|
|
|
|
|
ventomito wrote: If u have any suggestion...
2 keystrokes instead of one. Alt-f4.
|
|
|
|
|
Hi guys!
XmlSerializer is giving me troubles again...
I have a custom collection (derived from CollectionBase ) that I want to serialize.
In addition to just holding the items I want the collection to have additional properties like a name, for example:
[Serializable]
MyCollection : CollectionBase
{
public MyCollection() {}
public MyCollection(string name)
{
this._name = name;
}
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
... overrides for CollectionBase methods ...
}
The problem is that XmlSerializer serializes the items, but doesn't serialize a single of my additional properties.
Does anyone know what I can do?
TIA,
mav
|
|
|
|
|
|
Thanks for the reply.
Unfortunately, I didn't find anything on the topic that XmlSerializer doesn't serialize additional properties for ICollectionBase -derived classes.
While searching for a solution, I found a workaround somewhere else, though: By putting the additional properties in a separate class and having the collection as another property I could get the XmlSerializer to serialize the new class with the collection and an additional name.
[Serializable]
public clss MySettings
{
public MySettings() {}
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
private MyCollection _items = new MyCollection();
public MyCollection Items
{
get { return _items; }
}
} Regards,
mav
|
|
|
|
|
You have to use Arrays with the XMLSerializer. Dont even try other collections :p
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Hi,
Is it impossible to rotate a form/control to vertical or horizontal orientation? If it isn't, show me how please!
Thanks in advance
TV
|
|
|
|
|
Hi guys,
i am using DesignerVerbs to add desing time functionality to my custom TabControl.
No problem to add the verbs.
What i am trying to do, is to add tabs in design mode; in order to do that, i added a verb whose event handler calls my AddTabPage() method.
In design mode the new tab appears, no problem. But in debug mode, it does not.
I saw that in design mode, thanks to the verbs, i am able to change the auto generated InitializeComponent() method, but only the properties.
Is there a way to modify in design time the InitializeComponent() method, in order to call *my* methods?
Cheers!
Montezuma
|
|
|
|
|
im trying to add values into my Arraylist,and i get an Exception,is something wrong with this code
int i = this.txtIntel.SelectionStart;
string currentChar = "";
if ( i > 0 )
{
currentChar = this.txtIntel.Text.Substring(i-1);
try
{
MyArrayList.Add(currentChar);
}
catch(Exception o)
{
MessageBox.Show(o.ToString());
return;
}
}
thanks
regards paula
|
|
|
|
|
Hi,
I've tried to get your code to throw an exception and can't - what sort of exception is it? Are you creating a new ArrayList() ?
BTW - I think your implementation is wrong. When no text is selected i reflects the position of end of the string not zero as your code implies. Strings start at position 0 too, and yet your condition checks i>0 which means if you highlight the whole word, that won't count. The knock-on from this is that you should then use Substring(i) .
Also currentChar isn't the best name for a variable of type string, that threw me at first.
Rob Philpott.
|
|
|
|
|
Hi!
I´m creating a C# application and this applications needs to write some files to the Windows temporal directory. The problem is that I don´t know how to get the Windows´ temporal directory variable that gives me the path to the temporal directory.
Anybody know how to get Windows´ temporal directory variable???
I can´t write these files to an specific directory that I have previously created and later, remove the directory. I need to use the Windows temporal directory.
Thanks in advance!!!
Samuel
|
|
|
|
|
Enviroment.GetFolderPath
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Thank you very much for your help!
|
|
|
|
|
Hi,
Pls let me know how to do the following in a Windows forms data grid (without using a database):
1]. I want one of the columns to be editable. Once the focus is lost after editing I want to check if the value is within the expected range. How to capture this lost focus event on a cell?
2]. I have 1 column of type bool (to have a checkbos). But while adding rows, for one of the rows I don’t want this check box to be seen. How to hide this based on row selection?
3]. I want to change the color of individual cells. How to do it?
4]. How to set the color of a particular row?
5]. How to merge two cells vertically in a data grid?
Thanks in advance
-- modified at 8:13 Wednesday 26th October, 2005
|
|
|
|
|
Hi,
Can someone tell me how to implement a VC++ toolbar like control in C#?
Requirements are as follows:
1. Tool bar should be vertical toolbar
2. It should be dockable within a selected panel
3. It should have buttons and on dragging and dropping of these buttons, a control (e.g. combobox) should get created on the panel.
Thanks in advance.
ckravi
|
|
|
|
|
Hi,
ComponentOne has a Menus and Toolbars for .NET control that meets your needs. It includes a standard toolbar, a main menu, tab, and an "Out Bar"; all of which can be docked. For more information, please see our website, http://www.componentone.com[^].
Suelinda W
Customer Engagement, ComponentOne LLC
|
|
|
|
|
Hello Friends;
I program a software under .net using c#. i try to make comminicate and use RFID kit.(its model is MR100A reader and ANT34-24 antenna)
If you send me .net DLL or .net component for read,write,connect etc. operation i will be so happy. Thanks you
This is Your Life And Its ending one minute at a time
|
|
|
|
|
Generic components like that don't exist. Your best place for an SDK, or some other developement tools and documentation, for this device would be the manufacturer.
For instance, I could send you the SDK's I have for my RFID devices (I can't really because they cost a BUNCH of money!), but I garantee you they won't work with your device. One is a handheld RFID ID gun that runs on a serial port and the other is a pole-mounted RFID ID system that communicates on Ethernet. The two do the same job, but are completely incapable of communication using the same methods.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello
Thanks for your reply. I found only sdk but can you show me the way how can i insert it to my program or directly use it. i need exactly .net component but they sell it over 2.000 $ this is bullshit? i need your helps. Thanks
This is Your Life And Its ending one minute at a time
|
|
|
|
|
How many thread is alowed in app? I have found out that 25 is ok. I am using 6 and the system is using up 100% of processor. All the threads are suspended. I have debugged the app and there is no threads runnng. But when the last thread is suspended, the processor go up to 100%. I thougt that the last thread didn't sysspend, but i did. Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
|
|
|
|
|
hg2705 wrote: How many thread is alowed in app?
I don't know of any fixed limits, but in general, anything above 10 and performance starts to go down. Most of the time will be taken by context switches rather than any useful work.
hg2705 wrote: Iven if I remove the suspend command for the thread and just let it run one empty function. The processor is boosted to 100%
Maybe some other process is running that's taking up the CPU? You can easily check that using TaskManager.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thing is that i create a smal app that starts 10 threads, start them and suspend them at once. The processor is bosted to 100%. The maschine im using is an campaq notebook 600mz. 10 threds thar are suspended should not bee so har do handle...
<br />
public app()<br />
{<br />
mRun = true;<br />
mThreads = new ArrayList();<br />
for(int i = 0; i<10; i++)<br />
{<br />
Thread t = new Thread(new ThreadStart(this.go));<br />
t.Name = i.ToString();<br />
t.Start();<br />
t.Suspend();<br />
mThreads.Add(t);<br />
}<br />
}<br />
private void go()<br />
{<br />
while(mRun)<br />
{<br />
listBox1.Items.Add("run");<br />
Thread.Sleep(10000);<br />
}<br />
}<br />
-- modified at 2:14 Friday 28th October, 2005
|
|
|
|
|
Like I said, did you check if some other process is taking up processor time?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I've created a class containing a method to make a connection with a database and do SELECT, INSERT, UPDATE, DELETE. The class works just fine... only for the first query. The problem occurs when the second query is made. The result of the second query is just fine but at VERY VERY slow rate (almost not responding). Here's my class:
class MyClass
{
public string SQL2KConnStr = "..(my connection string)..";
public object ExecuteSql(string sql)
{
SqlConnection conn = new SqlConnection(this.SQLExpressConnStr);
if (conn.State == ConnectionState.Open)
{
conn.Close();
}
conn.Open();
switch(sql.Trim().Substring(0,6).ToLower()){
case "select":
SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);
DataSet ds = new DataSet();
adapter.Fill(ds, "QueriedTab");
return ds.Tables["QueriedTab"];
break;
default:
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
return cmd.ExecuteNonQuery();
}
}
And this's another class that makes use of the class above:
string SqlSelect = "select * from ...";
MyClass mc = new MyClass();
DataTable tab = (DataTable)mc.ExecuteSql(SqlSelect);
myDataGrid.DataSource = tab;
tab.Dispose();
I display the resultin a datagrid. The correctness of the result is fine. But the speed of the second and after is SO SO slow even though i've disposed the returned table every time. Anybody help me please...
KiT
|
|
|
|