|
This is an Excel formatting issue. You should set the cell format for the field in question to display a fixed number of digits for any numeric values.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
AFAIK, csv files do not support formatting.
|
|
|
|
|
I did not say that they did.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I want convert word doc or word file to image such as tif
|
|
|
|
|
Why would you want to do that? There may be better approaches.
|
|
|
|
|
hey guys i need help plz
i want when i press enter in cell cursor go down to the the cell in same column but when i press tab go to next cell in the same row how ?
|
|
|
|
|
I have just tried this and added a new datagridview to a windows form, and what you want is the default behaviour.
What appears to be the problem that it is not doing this?
|
|
|
|
|
Hi ,
I have a webservice FindStates()which return XML of all the states.
My webservice returns data in a dataset.
1) How to fetch the data from this webservice and put the same data in my database table.
Note: I have the same table structure.
Thanks,
Sandy
|
|
|
|
|
Hi what have you tried (in client)? Is the web service returning Json or xml?
[edit] changed icon [edit/]
Frazzle the name say's it all
|
|
|
|
|
|
Actually the code looks like below
DataSet ds = Webserviceobj.GetStates();
/// from here i want to insert the data which is returned by GetStates in to my table.
For example Getstatus webmethod return
Id state
1 karnataka
2 tamilnadu
3 andhrapradesh
So this data is there in the dataset ds. Now i want code to pass this dataset data in to my database table.
Can any one help me in this regrad.
Thanks,
Sandy
|
|
|
|
|
Create a data adapter to the destination table and update the adapter as -
DataAdapter.Update( dataSet ).
|
|
|
|
|
If the XML is produced from DataSet.WriteXml, you can reconstruct it at the other end using DataSet.ReadXml. It's probably a good idea to emit the schema so that if the web service is updated to have extra columns or tables, it doesn't just crash existing clients.
|
|
|
|
|
I have a project wiht 3 tabs.
When I push the 2nd tab, I want to up pop a messagebox.
How can I do this?
Kiter
|
|
|
|
|
|
Maybe a TabControl has a bunch of Events, and fires one or more of them when you switch to another tab? That is what I have come to expect from WinForm Controls.
Did you bother reading some of the documentation?
|
|
|
|
|
hi
For Example My Tabcontrol name is TBC1
so
1. select TBC1 and go to Events on Propertes windows
2. Click the SelectedTabPageChanged events
3. and this step write the flowing code
....
if(TBC1.SelectedTabPageIndex==1)
MessageBox.Show("You select 2nd Tab of Tab Control");
//The First Tab index=0
|
|
|
|
|
|
I'm creating a program in C# that do not allow intersecting lines. How will I modify my code? Thank you.
I've already uploaded the whole source code of my program HERE (http://www.mediafire.com/?2g52fiqanma3hkx[^]) for you to check the other class I've included.But here's the code for the drawing process:
<pre lang="c#">
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form3 : Form
{
private Boolean _calculateDouglasPeuckerReduction = false;
private List<WindowsFormsApplication2.PointEnhanced> _amerenPoints = new List<WindowsFormsApplication2.PointEnhanced>();
public Form3()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
List<System.Drawing.Point> drawingPoints = new List<System.Drawing.Point>();
foreach (WindowsFormsApplication2.PointEnhanced point in _amerenPoints)
{
drawingPoints.Add(new System.Drawing.Point(Convert.ToInt32(point.X), Convert.ToInt32(point.Y)));
}
if (drawingPoints.Count > 2)
{
e.Graphics.DrawLines(new Pen(Brushes.Black, 2), drawingPoints.ToArray());
lblOriginal2.Text = drawingPoints.Count.ToString();
if (_calculateDouglasPeuckerReduction)
{
List<WindowsFormsApplication2.PointEnhanced> points = Utility2.DouglasPeuckerReduction(_amerenPoints, Convert.ToDouble(nudTolerance2.Value));
drawingPoints = new List<System.Drawing.Point>();
foreach (WindowsFormsApplication2.PointEnhanced point in points)
{
drawingPoints.Add(new System.Drawing.Point(Convert.ToInt32(point.X), Convert.ToInt32(point.Y)));
}
e.Graphics.DrawLines(new Pen(Brushes.Red, 2), drawingPoints.ToArray());
lblSimplified2.Text = drawingPoints.Count.ToString();
}
}
base.OnPaint(e);
}
private void Form3_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
_amerenPoints.Add(new WindowsFormsApplication2.PointEnhanced(e.X, e.Y));
this.Invalidate();
}
}
private void Form3_MouseUp(object sender, MouseEventArgs e)
{
_calculateDouglasPeuckerReduction = true;
this.Invalidate();
}
private void Form3_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
_amerenPoints.Clear();
_calculateDouglasPeuckerReduction = false;
}
}
private void nudTolerance2_ValueChanged(object sender, EventArgs e)
{
this.Invalidate();
}
private void Form3_Load(object sender, EventArgs e)
{
}
}
}
|
|
|
|
|
Please give more detail about what problem you are trying to solve, and why your code does not work.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You need to find a solution for two equations with two unknown variables.
here's a sample[^].
If it has a solution, they intersect, if not they don't.
Hope this helps.
V.
|
|
|
|
|
One negative sentence does not constitute a program specification, so I can't help you out; please explain what your program is supposed to do, and how it deviates from your expectations.
BTW: you should keep Paint handlers as simple as possible, since it probably will be called a large number of times when some window activity occurs on your system. Whatever needs to be calculated, should be calculated in advance. And memory allocations in there should be minimal too, example: don't call ToArray() in a Paint handler. Finally, objects that offer a public Dispose() method should be disposed of, which you don't in e.Graphics.DrawLines(new Pen... ; it is much better to create such small objects once, and keep them around as class members (say "blackPen2" and "redPen2").
|
|
|
|
|
hello word of Codeproject!
i have windows app (C#) with sql server 2008 and wanna to convert it to android so i can use my program on my htc.
what is the solution ?
thanks!
|
|
|
|
|
Two simple steps:
1. Learn Android
2. Convert the program
Done!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
do we have some app that can convert it to android (monodroid)?
|
|
|
|