|
I want to open my executable file on a system has no (dot net framework) istalled on it. Should I install dot net framework every system I copy on? Please I need a solution
Yasser Abu Elmakarm
|
|
|
|
|
There are some very expensive applications which will "bake" the .Net runtime into your executable so they will run without .Net being installed. However, it is fairly trivial to include the .Net redistributable as a dependency in an installer so that it will be installed if it is not present.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Can you help me about textbox control?
I am a student from Macedonia who is new in c#.
The problem is
I am enter number 54324 in textbox control.
when I press button "count"
I want label.text to get this value from textbox= 5+4+3+2+4
I need this help immediatly so if you can, help me
Thank you!
kpp
|
|
|
|
|
You will need to extract every character from the textbox, convert it to int and add to a variable which will be counting sum of the digits. You can access individual characters like this: mystring[i]. Use Int.Tryparse to convert it to integer.
|
|
|
|
|
I will help yopu a bit, but its homework and you need to do it yourself.
convert to string
split string
convert each character to number
add numbers
you may want to use a loop.
|
|
|
|
|
Thank you for your support & help, I am new in c# and, I already solve this problem, sitting 23 hours in front of my machine!
I use function substring!
I would be like this:
for(i=0;i<textbox.length;i++)
{
sum="sum" +="" textbox.substring(i,1);
}
thank="" you="" again,="" but="" my="" application="" still="" is="" not="" finished.
can="" i="" ask="" for="" help,="" next="" time,="" when="" needed?
sorry="" bad="" english="" in="" some="" parts="" the="" text!
ciao...="" now="" maybe
=""
<div="" class="ForumSig">kpp
|
|
|
|
|
i have a datagrid and its column name is Session.
I have a table in that 3 fields are there.They are Morning ,Evening,and Afternoon.They are checkboxes.These fields are saved as YES/NO in database.I want to retrieve data from database to datagrid in a single cell like Morning ,Evening,Afternoon .........I want to retrieve ColumnHeader in table instead of checkbox
if u need more clarification pls ask me?
|
|
|
|
|
|
Just wondering if it is possible to set the following using .Net 1.1
- Registry Auditing
- Registry Permissioning
- NTFS Auditing
Any sample code will be of real help, thanks!
h.
before c# there was darkness
|
|
|
|
|
In Net 2.0 you can use System.Security.AccessControl namespace for various options but in .Net 1.1 the only option is using P/Invoke
|
|
|
|
|
Hy
I have a ListBox and I want to make a selection of a item but I don't want to see the selected item with an fill rectangle, I want like in C#. If I press "dad" in C# Visual Studio 2005 I see a listbox with a selection and the rectangle is no fill.
thx
|
|
|
|
|
uh...I think this is what you want
use the selecteditem event or similar to unselect your selection
|
|
|
|
|
Dear sir:
I have written one test page for up-loading the large file.
In this page:
上传
In my HttpModule, I call the function
HttpWorkerRequest.GetPreloadedEntityBody for testing.
But I cann't get the correct pointer. Null is returned from this function.
I donn't know the reason, Do you know this reason?
Thanks!:
|
|
|
|
|
Hi,
I have designed some programs on SWT and Swing using Java. There are many similar features that both c# and java have. When programming with Java I was using just one window(form) and than embed a necessary panel to it. Panels are designed seperately and named differently. For example one panel named SavePanel.java is used to save an entry(think about an address book). When the saving process is done, other panel named SearchPanel.java is called to the window. So when the user presses a button, a panel that is related to that process is called to the form.
In C# I can't find any feature like this. When I create a panel, I cannot add buttons or textboxes to them. The visual editor cannot show them.
I don't want to design one form for saving and one form for searching. Just one form is enough. According to the process that user wants some part of the form will be change. And changing part have to be designed easily using visual editor.
If any of you made something like this before, or any idea similar to this problem, please help me. Any articles, documents or related websites will be helpful.
Thanks
|
|
|
|
|
You have to add and remove UserControls to your main Form. A UserControl for Save and one for Search. Depending on what to do, add either of them to the Form.
UserControls can be designed with the Designer (Editor).
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi Friends,
I need to create a service(windows) in c#.
The service has to monitor the database,(a purticular Port)
If any changes are made in Database(insert,delete etc), it has to show a
popup message (like Record inserted).
How can I approach for this.If possible send the required code.
Regards
Lakshmi
Lakshmi
|
|
|
|
|
|
I need some code to prevent my application from running if it is already running. c# visual studio 2005
|
|
|
|
|
Google for single-instance application
|
|
|
|
|
barbarini wrote: I need some code to prevent my application from running if it is already running. c# visual studio 2005
There is more than one way to attempt to solve this problem but I would encourage you to log a little time with the Mutex class.
Have fun,
Matt
It isn't enough to do well in life.
One must do good when and where one can.
Otherwise, what's the point?
|
|
|
|
|
Hi,
i am trying to add dataRow to dataTable which in turn poulates a datagridview.
But the dtaGridView shows the lattest row added.
I want to show all the data Using datatable.
someone plz help....
Sangram
(A battle with self)
Life is simple, we are the ones makes the living difficult
|
|
|
|
|
Post your code. This will help others answer your question.
Paul
|
|
|
|
|
code<
protected void btnSlabAdd_Click(object sender, EventArgs e)
{
DataSet ds = new DataSet();
DataTable dt= new DataTable();
DataColumn dc1 = new DataColumn("StartAmount", typeof(double));
DataColumn dc2= new DataColumn("EndAmount", typeof(double));
DataColumn dc3= new DataColumn("AccountShare", typeof(double));
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);
DataRow dr = dt.NewRow();
if (dt.Rows.Count == 0)
{
dr["StartAmount"] = 1;
dr["EndAmount"] = double.Parse(txtEndAmount.Text);
dr["AccountShare"] = double.Parse(txtAccountShare.Text);
//dt.Rows.Add(dr);
}
else
{
//dr["StartAmount"] = 1 + double.Parse(dt.Rows[dt.Rows.Count - 1].Table.Columns["EndAmount"].Caption);
dr["StartAmount"] = 1 + double.Parse(gdvDistributorSlab.Rows[gdvDistributorSlab.Rows.Count - 1].Cells[2].Text);
dr["EndAmount"] = double.Parse(txtEndAmount.Text);
dr["AccountShare"] = double.Parse(txtAccountShare.Text);
//dt.Rows.Add(dr);
}
dt.Rows.Add(dr);
gdvDistributorSlab.DataSource = dt;
gdvDistributorSlab.DataBind();
}
>
As in the above code I was trying to add datarows to a dataTable and viewing it in gridView But Everytime I can see only One row in gridView......
I want to see all the rows added to the datatable....
help please
Sangram
(A battle with self)
Life is simple, we are the ones makes the living difficult
|
|
|
|
|
Each time the event fires, you are creating a new DataTable object, adding a row to it and binding it to your control. This means that you are discarding any data that you had previously bound to the control. If you want to append your new row of data to the data you have already created you should replace
DataTable dt= new DataTable();
with...
DataTable dt = null;
if (gdvDistributorSlab.DataSource == null)
{
dt= new DataTable;
}
else
{
dt = (DataTable)gdvDistributorSlab.DataSource;
}
Paul
|
|
|
|
|
I have two forms. Form1 with a listbox (with 3 items) and a button. When this button is clicked form2 should open. On Form2 there is a tabcontrol with 4 tabpages. When Form2 loads I want it to show with just 3 tab pages. So on Form1 i have the following variable defined:
public int countItems
{
get { return listBox1.Items.Count; }
}
On form2 I have made form1 public ( public Form1 frm1; ) and in the form2 load event i have the following:
if (frm1.countItems == 3)
{
tabControl1.TabPages.Remove(tabPage4);
}
This complies with no errors but when the application is run and the button is clicked to bring up form2, the following error appeas for the line if (frm1.countItems == 3):
Additional information: Object reference not set to an instance of an object.
Can anyone tell me where I am going wrong?
Lucy
|
|
|
|