|
Standard question #2:
What error message do you get?
Standard question #3:
What does your code look like?
---
b { font-weight: normal; }
|
|
|
|
|
miftha wrote: // default constructor
public Cylinder()
{
// implicit call to Circle4 constructor occurs here
}
Oh no it doesnt!!
public Circle4():base()
<br />
{<br />
}
-- modified at 3:35 Monday 20th February, 2006
|
|
|
|
|
If you want two different constructors they have to have different parameters. What you have now is two constructors with the same parameters that do the same work, so I don't even see the reason for having both of them.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I'm binding an ArrayList of Structures to the DataGrid. The Arraylist is binded to the Datagrid but the column sequence changes (ie. the column sequence in the SP and the column sequence in the Datagrid differs). I'm using Datareader to fill the ArrayList and then bind it to the Grid. Can anyone tell me how to maintain the same column sequence in Datagrid as in the SP.
Regards,
Shah Adarsh.
|
|
|
|
|
I have to paint the menu background...
I alredy have a dll which sets the .net style for menu's.
This I want to do with toolbar. To paint just a background.
I want to do all this to match the GUI.
All other controls are in different colors. I want to paint this two controls (perhaps statusbar, but it's not very important) in more appropriate color to match the other controls.
Can I somehow paint the toolbar background, but to keep the buttons drawn by the OS?
I've asked Google, but no luck.
-- modified at 11:35 Monday 20th February, 2006
|
|
|
|
|
Hi,
I was wondering if Visual Studio 2003 supports reading XML file generated by saving Word Document 2003 as XML?
I was trying to read word doc xml into an empty dataset just like a regular xml file but DuplicationNameException error persists. The word XML is basically well-formed but the data view for the xml is unable to display the structures.
Could someone help explain to me the reason why? Im still working on Visual Studio 2003 and if this is a new feature of word document 2003 that is not supported in VS2003, then I have no choice but to acquire VS2005.
My goal is to be able to load a word document xml in a server (maybe sql server) and then be able to read back that xml, load into a dataset, display in a view keeping all the formatting properties of the contents of the word document.
If anyone has any idea to do this within the boundary of the Visual Studio and C#, I would really appreciate the help.
Thanks so much!
Teddy
|
|
|
|
|
Create a Microsoft Word document using MS Word editor. Apply your formatting, font & paragraph styles, page setup, etc. When you save your file, specify "Xml" as the file type. Now exit Word and open the WordML (XML) file in Notepad. See how and where the data is placed. You'll simply have to write an XSLT which takes in an XML (documnet) data and produces the output -- similar to what MS Word produced.
- Malhar
|
|
|
|
|
I've never used the datasets and tableadapters in visual studio before and I'm having some trouble trying to figure them out. Right now it's going like this. I have a strongly-typed dataset on my form, I also have a bindingsource that's bound to the dataset and my database table, this created a tableadpater for me. Now because some columns in the database are just id's that the user doesn't need to know about I don't have controls for them on my form. My question is how to I update this information in the dataset so that it's populated back to the database? I'm trying something like this, but I know it's not right.
Guid guid = Guid.NewGuid ();
myDataSet.myDataTable table = myTableAdapter.GetData ();
table.idColumn = guid.ToString ("N");
myBindingSource.EndEdit ();
myTableAdapter.Update (this.myDataSet.eps); I think the basic question is how to I update/insert/delete on a strongly-typed datatable from within code?
Thanks for any and all help
- Aaron
|
|
|
|
|
Hello, how can i make a C# function throw a certain exception? Thanks very much!
|
|
|
|
|
If you didn't write the function (i.e. if you can't change the source code), you cannot change what exceptions it throws, all you can do is throw whatever seems appropriate to you based on what the function returns.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If you have written the function, to throw an exception you do this:
<br />
private void someFunction()<br />
{<br />
throw (new Exception());<br />
}<br />
But adjust the type of exception accordingly.
Is that what you wanted?
Hope that helps.
|
|
|
|
|
'throw (new Exception());' must be inside the function block:
openFileClicked() { throw (new Exception()); }
|
|
|
|
|
I am doing a project for school I have to wirte a code for a login page if the user enters a vaild username and passwrd is should tell me how much is in my back accouont if the login is invalid it should say invalid password I am using visual studio can anyone help me
Heather
|
|
|
|
|
Hi, Heather. I'm sure tons of people here can help you, but first you need to ask a question. Right now, this looks suspiciously like 'do my homework for me', which is a whole different story. Is this a windows application ? That is, do you need a login *dialog*, or will the login just appear as text in a scrolling window ? If the former, then you need to start by creating a login dialog. If the latter, then the job is trivial, you just need to accept input, check a password/username combo and print some number. In either case, you should start doing your own homework, and ask some questions when you're stuck on specifics, and have some code to post so we can see what's going on and help from there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
it is a windows application I am not asking anyone to do my homework I am asking for a helping hand to get it started, I am not sure how to get it to look for the correct usernames and passwords
Heather
|
|
|
|
|
this is what I have so far but I know it is not right
cant figure out how to fix it
int lgflg = 0;
SqlConnection conn =
new SqlConnection( ConfigurationSettings.AppSettings["DSN"].ToString() );
SqlCommand cmd =
new SqlCommand("SELECT ID From [User_tbl] Where Pass = '" + Pass.Text
+ "' And Login = '" + Login.Text + "'",conn);
conn.Open();
SqlDataReader myReader = cmd.ExecuteReader();
while (myReader.Read()) {
lgflg = 1;
}
myReader.Close();
conn.Close();
if (lgflg == 1) {
Response.Redirect("default.aspx");
}
Heather
|
|
|
|
|
To make things a little easier to read you could rewrite it like this:
<br />
bool validAccount = false;<br />
<br />
SqlConnection conn = new SqlConnection( ConfigurationSettings.AppSettings["DSN"].ToString() );<br />
SqlCommand cmd = new SqlCommand("SELECT ID FROM User_tbl WHERE Pass = \'" + Pass.Text + "\' AND Login = \'" + Login.Text + "\'",conn);<br />
<br />
conn.Open();<br />
<br />
if(cmd.ExecuteNonQuery() > 0)<br />
{<br />
validAccount = true;<br />
}<br />
<br />
conn.Close();<br />
<br />
if (vaildAccount) <br />
Response.Redirect("default.aspx");<br />
else<br />
Response.Write("Authentication Failed.");<br />
Were you getting an error with the code you wrote It seems ok.
|
|
|
|
|
You can use Hashing algos to create user passwords and compare your login infos with the hashed ones.
Enjoy coding
|
|
|
|
|
This is awful advice for the posted homework question.
1!
|
|
|
|
|
Hi! I really don't know why I get this error--> System.Runtime.InteropServices.COMException everytime i try to import excel files into my application. When I tried using the sample code directly calling it from the main function, it worked. But when I put the sample code in an area where the user will be the one to choose if he/she wants to import excel files or not, I have that error...I really don't understand why... Thanks!
|
|
|
|
|
Hello everyone,
Greetings from Brazil! Please help! I have a DataGridView in a windows form with three columns:
Column1 is TipoComboBoxColumn
Column2 is QuantidadeColumn
Column3 is SementeComboBoxColumn
I need the SementeComboBoxColumn to display values according to the value I select in the TipoComboBoxColumn.
How do I go about accomplishing that? The code below works in part, BUT when I'm editing the value of SementeComboBoxColumn, the other values in this column disappearin the other rows.
private void tabBAdetDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (tabBAdetDataGridView.Columns[e.ColumnIndex].Name == "EspecieComboBoxColumn")
{
this.tabSementesTableAdapter.FillByTipo(this.sascrDataSet.tabSementes, tabBAdetDataGridView.Rows[e.RowIndex].Cells["TipoComboBoxColumn"].Value.ToString());
this.EspecieComboBoxColumn.DataSource = this.tabSementesBindingSource;
this.EspecieComboBoxColumn.DisplayMember = "Semente";
}
else
{
this.tabSementesTableAdapter.Fill(this.sascrDataSet.tabSementes);
this.EspecieComboBoxColumn.DataSource = this.tabSementesBindingSource;
this.EspecieComboBoxColumn.DisplayMember = "Semente";
}
}
Thanks in advance,
JC Carmo
|
|
|
|
|
I need help using windows hooks. Specifically, I want to hook the actions in a program I did not write. In testing, I set up a program that displays its ThreadID. I then try to install a Hook on that ID but it does not work.
|
|
|
|
|
Hi,
Is it impossible to embedd resources into other namespaces than root? The problem is that I cannot find my resourses from classes that do not belong to the default namespace. Please help.
Thanks.
Magnus
|
|
|
|
|
Uh, change the filename form SomeFile.txt to SomeNamespace.SomeFile.txt ? That's the way i always do it...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
Thanks Marc!
But...then I can't put the resources in subfolders (in Solution Explorer), since the resource name gets wrong, i.e., <subfolder_name>.<namespace.original_filename>, with the namespace after the subfolder name. E.g., then I can't access the resource with
bmp = new Bitmap(this.GetType(), filename);
which otherwise would be a convenient and natural way.
Well, maybe I have to live with this, but I think it's strange that you can't assign resources to namespaces in the same way as classes. I mean, it's all about having structure and order in your work.
Magnus - Javaman
|
|
|
|