|
Exelioindia wrote: I am confused with the 2 and 4th point.
If you have a client, ask them. If you're doing this for yourself, ask yourself how you want it to work.
If it's homework, either ask your teacher, or assume they'll accept anything that literally meets the spec.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Some basic ideas?
It could implement a calender, and possibly remind the user when something he planed comes up...
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Hi guys
Using WebBrowser object to open an email attachment in win form(C#), I am facing given below probs, Can any one help me on this?
Issue: If an excel or word document is already opened in your system and at the same time you try viewing an email with an attachment of MS Office(Excel/MS Word) through my application (win form), It gets opened in the Form as well as it creates and open a separate instance of the same attached document in already opened MS Office(Excel/MS Word), resulting the opened document(MS Word/Excel) hangs and there is no way out to make the MS Office document(word/Excel) active unless you close my application.
The given below is the code to open the attachment
if (filePath.EndsWith(".doc"))
{
wbExcel.Visible = false;
wbOthers.Visible = false;
wbPDF.Visible = false;
wbWord.Visible = true;
wbWord.BringToFront();
if (wbWord.Url == null || !filePath.Equals(wbWord.Url.ToString(), StringComparison.InvariantCultureIgnoreCase))
wbWord.Navigate(filePath);
}
else if (filePath.EndsWith(".xls"))
{
wbWord.Visible = false;
wbOthers.Visible = false;
wbPDF.Visible = false;
wbExcel.Visible = true;
wbExcel.BringToFront();
if (wbExcel.Url == null || !filePath.Equals(wbExcel.Url.ToString(), StringComparison.InvariantCultureIgnoreCase))
wbExcel.Url = new Uri(filePath);
}
Where wbExcel and wbWord are object of type WebBrowser
Hints: It seem the default behaviour of MS Office which throw some exception which need to be tackled.
Thanks & Rgds.
Mahtab
|
|
|
|
|
Hi
I am doing an application in which I am using a XML file to populate a datagrid.
In that XML file I have one like.....
<>
1.To generate leads efficiently and profitably.
2.To ensure that all details are collected in one call.
3.To provide email and chat support.
4.To manage Work Basket reports as required.
5.To meet targets for both quantity and quality.
<>
When I am trying to populate this column onto datagrid, all these lines or sentences are getting combine and displaying like a paragraph.
I want to know how to format this column to get them in the a new line
Thank u
Chandu
|
|
|
|
|
Your text is all one node, so to break it into lines, you need to write some code to split the string. If it contains newlines, you can split on those ( use the string.split method )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i am studying on a hotel reservation prject. i use an access file and a table which has fields resstart and resend. we dont make reservations directly on rooms. the system determines the room number of a guest who's checking in from empty rooms at checkin time. the hotel has 45 rooms. so my problem is getting how many reservations include days between the given resstart and rezend values.
suppose that a customer has a reservation between 23/05/2007 and 29/05/2007. and a new customer want to make a reservation between 26/05/2007 and 28/05/2007. so if i make a query based on resstart and rezend values than the first reservation will be ignored and second reservation will be accepted even if there will be no empty room between those days.
please help me,sorry for my english
|
|
|
|
|
anyone help ?
|
|
|
|
|
Hello,
I write a method in a class for connection to database and this method call in Login_Form
Code :
namespace DuryHouse
{
class Genral_Class
{
public string conection_string;
//Define Method for connect to Database
public string Conect_DataBase(
string servername,
string userid ,
string password
)
{
conection_string = "Data Source = " + servername +
";Network Library = DBMSSOCN;Initial Catalog = uryHouse;"
+ "User ID = " + userid + ";Password = " + password+"";
return conection_string;
}
}
}
In Login Form after pressing OK button I can not connect to DataBase :
private void button1_Click(object sender, EventArgs e)
{
Genral_Class Conection = new Genral_Class();
Conection.Conect_DataBase(ServerBox.Text, IDBox.Text, PassBox.Text);
sqlConnection1.ConnectionString = Conection.conection_string;
sqlConnection1.Open();
try
{
sqlCommand1.CommandText = "Login";
sqlCommand1.CommandType = CommandType.StoredProcedure;
sqlCommand1.Connection = sqlConnection1;
sqlCommand1.Parameters.Add(IDBox.Text, PassBox.Text);
}
catch (Exception ex)
{
Messagebox.Show(ex.message);
}
you think in which part I make mistake???
thanks
|
|
|
|
|
What error are you getting?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
After this line this error occure => sqlconnection1.open();
Sqlexception was unhandle:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
|
|
|
|
|
See if your server allows remote connections.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
|
|
For some reason I can't figure this out
Let's say I have an ArrayList of a class that has a string productName and an int called count. I want to basically combine the duplicates in the following way.
productName | count<br />
-------------------<br />
Product1 | 1<br />
Product2 | 1<br />
Product1 | 1<br />
<br />
After combining I'd want it to look like<br />
<br />
productName | count<br />
-------------------<br />
Product1 | 2<br />
Product2 | 1<br />
<br />
What is my best bet?
|
|
|
|
|
Hello,
Let me suggest a redesign.
Instead of ArrayList you could use a Hashtable (or Dictonary .Net>1.1).
Your "Value" would be the full instance of the class, and the "Key" would be the productName.
You could than make an "Add" Method which controls if the Key already exist.
If no -> add the instance to the Collection.
If yes -> increase the count of the existing instance.
Hope it helps!
All the best,
Martin
|
|
|
|
|
I am making a game that is built of a tiled map and the character can move from tile to tile, or will be able to. As of now each tile is a PictureBox, 15 x 15, or 225 PictureBoxes, a total hack.
I want to be able to use DirectX to display all the images the same way, then I have the full screen options and framerate and other cool options as well. I know how to setup part of the DirectX, I have done tutorials on displaying a triangle and stuff like that, how do I display a square with a image on in? More importantly, how do I recognize which square has been clicked, and make it call the apporpriate event handler?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
I have found these tutorials to be good. They have tutorials on DirectX and XNA and start form the very beginning to fairly advanced. They do show you how to draw a shape and how to add textures, use Meshes and even do some introductory tutorials on HLSL (high level shader language).
http://www.riemers.net/[^]
Also check out the directx tutorials on codeproject.
|
|
|
|
|
|
Hi balanjingot,
You can use CellDoubleClick event instead of DatagridView DoubleClick.
Here is the code snipet:
private void Form1_Load(object sender, EventArgs e)
{
DataTable dtable = new DataTable();
dtable.Columns.Add("SNo");
dtable.Columns.Add("Name");
for (int i = 0; i < 5; i++)
{
DataRow dr = dtable.NewRow();
dr[0] = "1" + i.ToString(); ;
dr[1] = "Name " + i.ToString();
dtable.Rows.Add(dr);
}
dataGridView1.DataSource = dtable;
DataTable dtable2 = new DataTable();
dtable2.Columns.Add("SNo");
dtable2.Columns.Add("Name");
for (int i = 0; i < 5; i++)
{
DataRow dr = dtable2.NewRow();
dr[0] = "2" + i.ToString(); ;
dr[1] = "Name " + i.ToString();
dtable2.Rows.Add(dr);
}
dataGridView2.DataSource = dtable2;
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
dataGridView2.CurrentRow.Cells[0].Value = dataGridView1.CurrentRow.Cells[0].Value;
dataGridView2.CurrentRow.Cells[1].Value = dataGridView1.CurrentRow.Cells[1].Value;
}
Please let me know if this helps.
Thanks,
S.Gopal.
Gopal.S
|
|
|
|
|
hi,
thanks, it works. the value from datagridview1 will be transfered to datagridview 2.
but what if i want it this way...
dataGridView2.CurrentRow.Cells[5].Value = dataGridView1.CurrentRow.Cells[0].Value;
dataGridView2.CurrentRow.Cells[6].Value = dataGridView1.CurrentRow.Cells[0].Value;
if i select Cell 5 of dgv2, the selected value of cell 0 of dgv1 will displayed on cell 5 of dgv2
if i select cell 6 of dgv2, the selected value of cell 0 of dgv1 will be displayed on cell 6 of dgv2?
thanks..hoping for a reply
jing
|
|
|
|
|
Hi,
Please use this code:
dataGridView2.CurrentCell.Value = dataGridView1.CurrentCell.Value;
instead of,
dataGridView2.CurrentRow.Cells[5].Value = dataGridView1.CurrentRow.Cells[0].Value;
dataGridView2.CurrentRow.Cells[6].Value = dataGridView1.CurrentRow.Cells[0].Value;
Thanks,
Gopal.S
|
|
|
|
|
hey,
thank you so much...it works!
regards
jing
|
|
|
|
|
Here's my problem. I don't know how to compare a range (because .NET does not support the BETWEEN clause) and return a single row based on that range.
Here's an example of a working query that is being executed on a specific table in a dataset.
---
query = "Name = 'jim' AND Address = '123 Lane' AND Age = '25' AND Homes = '2'";
---
Here's what I want to do: (does not return anything, but compiles)
---
query = "Name = 'jim' AND Address = '123 Lane' AND Age >= '23' AND Age <= '27' AND Homes >= '1' AND Homes <= '3'";
---
In this example I'm trying to return this row if the user entered any age in between 23 and 27, and any amount of homes in between 1 and 3. You could say the age threshhold range is set to 2 and the home threshhold range is set to 1.
Our test subject jim falls into this range, so I would want him returned, yet it does not work. I tried using () around certain parts and it doesn't work as well. Little help?
|
|
|
|
|
Try the query by itself first, but it should just be something like:
where Name = 'jim' AND Address = '123 Lane' AND (Age >= '23' AND Age <= '27') AND (Homes >= '1' AND Homes <= '3'")
Or are you doing a rowfilter on the dataview?
Still it should work.
Ben
|
|
|
|
|
That is exactly what I tried before, it returns nothing (row count is 0).
Here's the exact steps of what my app is doing:
1. On load, it fills a datatable based on an xml file (we'll call this a log file).
2. A user enters in information, and submits it (aka. logs it).
3. When a user enters something into one of the fields in my app, it runs the select query posted above on the datatable.
If it finds a row, it will modify the info the user entered (based on params the user entered when he logged the info initially).
|
|
|
|