|
i have a point.
how to compare this condition
PointF point=new PointF();
point = x.Intersect(y);
first time i am getting (429.5,215) as point
next time i am getting (+infinity,NaN) as point
So I like to have point which is having values in the point(numerice values).but not infinity or NaN
for this only I need to write (If condition).
if(point is not infinite)
{
}
if point is infinite then it not should enter in the if condition.
sometimes i get infinite values in the point.
what is the syntax for the above one.
Please help me out.
Thanks in Advance
Satya
satya
-- modified at 8:07 Friday 25th November, 2005
|
|
|
|
|
PointF holds onto 2 float values... float, like any other datatype, has finite values - what do you mean by the following line
satish0909 wrote: i get infinite values in the point
|
|
|
|
|
Something like this:
PointF point;
if (!float.IsInfinity(point.X) && !float.IsNaN(point.X) &&
!float.IsInfinity(point.Y) && !float.IsNaN(point.Y))
{
}
|
|
|
|
|
After years of development I get to my first multilanguage application, and I have a problem.
The windows forms part is almost ok: create the form with localize true, design it for default, after that load the form for every language, edit every text of every component - quite annoying.... but it works.
The problem is with strings (messages to the user). My first idea was to store them as resource strings, but resource does not have a language so a winforms-like approach not works. Now I store strings in external text files but this way is plain ugly.
Please, please shed some light - what would be the good way...
(using Visual Studio 2005)
|
|
|
|
|
Have you tried creating a resx file for each language using the appropriate name (see the name of the resx files created by Visual Studio for the dialogs to determine the name)?
Sorry I can't say anything for sure, I have only been doing enterprise level localization which involved a home build localization tool compiling the resx files. If you are going to do a reasonable size project, or more than one or two languages, consider buying a localization tool - they work MUCH better than VS (even though the tools you an buy are actually pretty bad they do have basic functionality missing in VS).
|
|
|
|
|
do any one of you know this namespace PointOfService is inherited from which dll. if any one of you know please reply me...its urgent.l
Raheel Iqbal
|
|
|
|
|
POS for .NET consists of two assemblies, Microsoft.PointOfService.dll and Microsoft.PointOfService.ControlBase.dll.
Source[^]
|
|
|
|
|
hi
i need help - i need to save information (STOCKS information)
from this site :
http://today.reuters.com/stocks/Overview.aspx?ticker=msft
i need to write a program in C# that get the information
and print it
Eyal
eyalso
|
|
|
|
|
//I have written the code on button click event.
//You also try the same ..It works
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Net;
private void button_Click(object sender, System.EventArgs e)
{
WebClient Client = new WebClient ();
Stream strm = Client.OpenRead ("http://today.reuters.com/stocks/Overview.aspx ticker=msft");
StreamReader sr = new StreamReader(strm);
string line = String.Empty ;
//listbox1.Items.Clear();
// create a writer and open the file
TextWriter tw = new StreamWriter(@"D:\date.xls");
}
do
{
line = sr.ReadLine();
if(line==null)
break;
//listbox1.Items.Add(line);
// write a line of text to the file
tw.WriteLine(line);
}
while(line!=null);
// MessageBox.Show(line);
sr.Close();
strm.Close();
// close the stream
tw.Close();
MessageBox.Show(@"File downloaded successfully at location D:\date.xls.");
}
Try this ...It works..
ajay_dalvi13@yahoo.co.in
-- modified at 6:13 Friday 25th November, 2005
|
|
|
|
|
|
Hi,
I am using OnSessionEnd Eventhandler in C#.
I am trying to invoke cmd.exe during system shutdown.
Whenever my program tries to invoke cmd.exe it fails and gives following error :
"The application failed to initialize properly (0x0000142)"
Pls find a solution for this ...
ajay_dalvi13
-- modified at 0:11 Monday 28th November, 2005
|
|
|
|
|
actually i want to make a combobox which has same features like combobox used in IE(Address Bar ComboBox). which has same features like AutoComplete and many more....
plz help me to solve this problem how would i make this kind of comboBox.
Amit Grover
|
|
|
|
|
What kind of answer do you expect? Complete source code?
You could start by looking at the various modified comboboxes here on CodeProject.
Clickety[^]
Otherwise just start with it and ask a bit more specific.
|
|
|
|
|
Hi,
Can anybody help me with this,
I want to display the data in the datagrid according to my requirement.Consider the following e.g,
I am a customer i have an unique customer id, i have multiple holdings, similarly there are many more customers.Now i want to display thisin my data grid as the first two column will have only one value i,e the customer ID and customer name, but in the same row the other cells will have multiple rows having details about each holdings of that customer
in short.1 customer will have many holdings, all details i need to show in a single row, but the column customername will have only one value.
Raghavan
-- modified at 1:56 Friday 25th November, 2005
|
|
|
|
|
try this code this might help you, change the code as per your needs.
protected string custid=null;
private void Page_Load(object sender, System.EventArgs e)
{
DataSet asd=new DataSet();
asd.Tables.Add();
asd.Tables[0].Columns.Add("Id");
asd.Tables[0].Columns.Add("name");
asd.Tables[0].Columns.Add("item_bought");
asd.Tables[0].Columns.Add("no_of_item");
asd.Tables[0].Columns.Add("item_price");
object[] qwe=new object[] {"1", "cust1" , "aaaa", "aaaaaa" ,"aaaaa" } ;
asd.Tables[0].Rows.Add(qwe);
object[] qwe1=new object[] {"1", "cust1" , "ssss", "sssss" ,"sssssssss" } ;
asd.Tables[0].Rows.Add(qwe1);
object[] qwe2=new object[] {"1", "cust1" , "ddddddd", "dddd" ,"ddddd" } ;
asd.Tables[0].Rows.Add(qwe2);
object[] qwe3=new object[] {"2", "cust2" , "fffffff", "ffffffff" ,"fffff" } ;
asd.Tables[0].Rows.Add(qwe3);
object[] qwe4=new object[] {"2", "cust2" , "ggggggg", "ggggggggg" ,"gggg" } ;
asd.Tables[0].Rows.Add(qwe4);
DataGrid1.DataSource=asd;
DataGrid1.DataBind();
}
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType.ToString()=="Item" || e.Item.ItemType.ToString()=="AlternatingItem")
{
string tmp;
tmp=e.Item.Cells[0].Text;
if(custid ==tmp)
{
e.Item.Cells[0].Text="";
e.Item.Cells[1].Text="";
e.Item.Cells[0].BorderStyle =BorderStyle.None;
e.Item.Cells[1].BorderStyle =BorderStyle.None;
}
if(custid ==null || custid !=tmp)
{
custid=e.Item.Cells[0].Text;
}
}
}
|
|
|
|
|
Good example, but why would you .ToString() ItemType when it is an enumeration that can be compared using the enum?
|
|
|
|
|
hi, I didn't knew it is an enumeration. thank to addin my knowledge
|
|
|
|
|
Hi,
I used your code.But still my doubt is not cleared. I would like toexplain it again. in your example i would like to display the cust id and cust name only once in the midlle of the first row in the first and second column,in the remaining columns of the first row ,coressponding values for each detail are displayed.
...........................................................................
..........|..........|..._1_....|....fsd....|....dsg....|
..........|..........|..._2_....|....sdf....|....sdg....|
...._1_...|.Raghavan.|..._3_....|....sdd....|....dgg....|
..........|..........|..._4_....|....sdu....|....dsd....|
..........|..........|..._5_....|....dfd....|....csg....|
..........|..........|..._6_....|....nsd....|....bsg....|
..........................................................................
|
|
|
|
|
try this code. I believe if you have multiple custid it would be very difficult to distinguish between them. One suggestion between two cust add a blank row so that you could easily distinguish between them. the variable not.
I hope this satisfies you.
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType== ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
string tmp;
tmp=e.Item.Cells[0].Text;
if(custid ==null || custid !=tmp)
{
custid=e.Item.Cells[0].Text;
cnt=0;
idx=9999;
for(int i=0;i
|
|
|
|
|
hello to every body how i can put image in mssql database????bye c#???
|
|
|
|
|
The Image data type is just an array of bytes. In C# you need to get a byte array version of your image and assign this to a paramter in your SqlCommand object.
|
|
|
|
|
What im trying to do is use the OnPaint Method to draw graphics such as a oval in a panel and not in the default form.
Is this possible? Thanks
Thomas
|
|
|
|
|
Handle the paint event for the Panel. To make it easier, derive a class from Panel, so it's all in one spot, outside the form ( for re-use ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for your help!!! It helped me fix my problem.
It was a very easy fix and not sure why I missed it:
//what I had
Graphics g = CreateGraphics();
//What I Changed
Graphics g = world.CreateGraphics();
Thanks again for your help!
|
|
|
|
|
I'm having troubles in my aspx.cs page, I think...
Anyways, in a button_Click method in my aspx.cs page I have this code...
ViewState["isSubmitted"]="true";
However, when I click the button, the value doesn't get saved.../?! Well, at least I dont' think so. I read the isSubmitted value in my Form_Load method..
string str=(string)ViewState["isSubmitted"];
So, here's the deal. When my page runs I click the button, but the value isn't set to true, but then once I click it again, it is saved to true.
WHY?
/\ |_ E X E GG
|
|
|
|