|
|
I think in the States students are used to seeing
M T W R F S
8-9
9-10
10-11
11-12
...
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi!
I have a problem, if i have a treeview which is filled with allot of TreeNodes and for some reason i need to restart the treeview, can i restart it to the same visible mode that it was before, i mean if i opened node one and its chield and its chield, and now i restart it, i mean create it again can i visibly show the same childs as it was before the restart, this is of corse when the treeview does not change.
Thanks
|
|
|
|
|
You can, but there's no magic way to do this. When you clsoe the TreeView, record the node hierarchy and each node's expanded state. When you want to restore your nodes, you'll have to do this manually based on the information you previously recorded.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: And in this corner, the Party of Allah
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
|
Hi.
I want to catch the audio from modem when somebody calls my computer by phone.
i.e that must convert the analog sound that arrives to modem, to digital in the form that I can get it.
Now I can establish a call via modem commands.
I prefer that do this in managed code in c#
-- modified at 11:31 Tuesday 15th August, 2006
Best wishes
|
|
|
|
|
i use list view that have control in this page
http://www.codeproject.com/cs/miscctrl/ListViewEmbeddedControls.asp
* if i have database with 3 recode ex:
------
field 1
------
5
7
8
-----
i want to add 3 row in the listView with first colum must be button(ClickMe)
the problem new
-----------------
1 - how i make my app when i click in the fisrt (ClickMe) button -> open new Form with 5 as parameter - > new Form(5);
and second button new Form(7);
Palestine
|
|
|
|
|
First, you need to get the data out of your database. To do that, use ADO.NET. If you have an ADO.NET-specific question, ask in the ADO.NET forum[^].
Once you've got your data out of the database, you can provide a constructor that takes an integer for each form you want to pass:
class MyForm : Form
{
public MyForm(int integer)
{
...
}
}
You can then construct it like
MyForm form = new MyForm(5);
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: And in this corner, the Party of Allah
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
hello Judah Himango
i know how to connect to database
and i know how to open form with parameter
the probelm now if i want to generate button on form load what i must do to get parameter 5 on Click on the second button ...
Palestine
|
|
|
|
|
Let me make sure I'm understanding. You want to get parameter 5 once the button is clicked?
To generate a button from code and listen for a click event:
Button b = new Button();
this.Controls.Add(b);
b.Click += new EventHandler(OurClickHandler);
...
void OurClickHandler(object sender, EventArgs e)
{
}
Does that answer your question?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: And in this corner, the Party of Allah
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
thankssssssssssssss
Palestine
|
|
|
|
|
|
|
Hi,
I have a Typed DataSet that is bind to some winform controls. TextBox, Labelx etc....
At some point, my dataSet values are updated being the scene. The probleme is that my binded controls are not updated automatically when DataSource is updated.
What I have to do to force the rebind of my controls ?
..Etienne Lefrancois
|
|
|
|
|
Hi guys,
I need some help, please.
I am trying to get the sum of two columns in a dataset table.
Here is what I have so far and it seems to be giving me a aggregate error.
SqlDataAdapter adp= new SqlDataAdapter();
SqlCommand cmd= new SqlCommand();
cmd.Connection=cnn;
........
adp.SelectCommand=cmd;
DataSet ds=new DataSet();
adp.Fill(ds,"tbACJE");
System.Data.DataRow rd= ds.Tables["tbACJE"].Rows[0];
Double fTemp=Double.Parse(ds.Tables["tbACJE"].Compute("SUM(rd[0]+rd[1])", "").ToString()); //this doesn't seem to be working.
if(fTemp==0.00)
{
MessageBox.Show(this,"Error");
}
Please help.
sasa
|
|
|
|
|
Why don't you let the database do the calculation, instead of first fetching all the data and make the Table object loop through it?
Example:
cmd.CommandText = "select sum(field1 + field2) as total from tbACJE";
---
b { font-weight: normal; }
|
|
|
|
|
Because I am doing a lot more than just this calculation to the data.
sasa
|
|
|
|
|
(double)ds.Tables["tbACJE"].Compute("SUM(rd[0]+rd[1])", "") probably works as good.
DataTable table = ds.Tables["tbACJE"];
rd[0] and rd[1] are not fields in your db so try
SUM(" + table.Columns[0].ColumnName + "+" + table.Columns[1].ColumnName + ", "")
might work
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi there,
I tried both your methods and I still get the same error which says,
Syntax error in aggregate argument: Expecting a single column argument with possible 'child' qualifier
Any ideas please will be highly appreciated
sasa
|
|
|
|
|
Hi there,
I finally got the error message not to show by doing this, but I am worried if my logic is correct, any suggestions?
Double fTempCR=0.00;
Double fTempDB=0.00;
Double fTemp=0.00;
DataTable table = ds.Tables["tbACJE"];
object sumObjectCR;
object sumObjectDB;
sumObjectCR = table.Compute("SUM(AmtCr)",string.Empty);
sumObjectDB = table.Compute("SUM(AmtDb)",string.Empty);
fTempCR=Double.Parse(sumObjectCR.ToString());
fTempDB=Double.Parse(sumObjectDB.ToString());
fTemp=fTempDB-fTempCR;
if(fTemp==0.00)
Show message
sasa
|
|
|
|
|
Hi everyone
I'm pretty new to visual studio 2005 in combination with C#... I did some GDI+ research en tried to make my own User Control (which contains a circle, a pin and a rectangle that simulates te rotations of a DC motor).
The control works fine (motor rotates, you replace te motor bij an image of an motor...) But when I place this User Control (named MotorGUI) on a form, visual studio shuts down!!!
I have a solution with 2 projects
- client (test form)
- Simulation.Motor (Motor User Control -> compiled into an DLL)
When I drag the Motor User Control which is displayed in the toolbox after building this solution on the form, VS shuts down. Also when I finally got the control on the form by luck... When this control received a focus (in visual studio @design time... VS shuts down too
Can anyone help me? Or give me a suggestion? May be I am making a critical mistake? I can always copy/paste the code of my motorGUI user control.
Thanks in advance!
Rising Sun
|
|
|
|
|
VS itself shuts down ? What if you write code to create the control dynamically and run the exe ? Does the exe work ?
VS2005 kind of sucks, it now will crash with user controls that work perfectly at run time, for example, your rendering code needs to always work, even if no properties have been provided.
There is a property you can use, but I forget it's name. IsDesign, or DesignMode, something like that. That will allow you to write code that doesn't get run in design mode, which is where the problems are.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Creating the control dynamically solved the problem half. When compiling/building the solution, VS still shuts down
After a deeper search -it must be somewhere in the code- the shut down problem arised because one property of my motor hasn't a instance variable and the name of the accessing get/set method was the same name as the veriable!
(I added the method with the class designer (I would say: dangerous)).
But after all, strange that VS just shut down on that kind of a problem? (VS kind of sucks, indeed) I guess when dropping my motor control on a form, VS 'activate' the control and shuts down because the problem above .
Is is always so that a control is running (getting active?) at design time(like my motor DLL component)? It is not a static view I guess? But a sort of 'runtime' view?
Thanks for the DesignMode property hint! That's how I came upon this solution. Everyting works fine after fixing the get/set method.
Thanks Christian!
|
|
|
|
|
Dear gurus,
I'm dealing for a while now with Enterprise Library 2.0 (EL). I'm almost totally lost.
If I search for samples I always find the same samples which seem to be created by exactly three gurus (Alois Kraus, Tom Hollander and David Hayden). This shows me that I'm not the only who does not understand this stuff. It's a greaty pity, because I think EL is nice and interesting. It seems to me as if Microsoft had created EL only for themselfs
Ok, enough complained.
Can somebody help me with classes as FileConfigurationSource or IConfigurationSource in concert with ConfigurationManager and reading from different configuration files.
Thanks a lot in advance
-- modified at 10:15 Tuesday 15th August, 2006
|
|
|
|
|
Yes, there is certainly a lack of good samples for working with enterprise libraries. Most dev shops that need an enterprise framework probably already have one in-house, so adoption of entlib is kinda low. I'm a fan of entlib but not much chance to use it. Perhaps if you post a specific question this forum can be more helpful.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|