|
Tools->Options->Coding->Edit Standard Headers
you have something like that?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
musefan wrote: Tools->Options->Coding->Edit Standard Headers
you have something like that?
No, I don't, do you?
|
|
|
|
|
Sorry i use SharpDevelop[^] and as it is very similar to VisualStudio i assumed would be similar options
I have Visual C# 2008 express edition and that does not have many options at all. Are you using an express version? maybe its a limit of that
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
No, that little option only applies to SharpDevelop.
You'd have to edit the "Item Template" files in Visual Studio to do this. I think you'd find them under "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\...".
|
|
|
|
|
|
how to set the border Line of the winForm in C#?
and set the border line color ?
Thanks !
|
|
|
|
|
do you mean the border of the whole form, or just a specific control?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
I want to set the border of the whole form.
|
|
|
|
|
well as far as im aware there is no property for that so you will have to do it some other way, here is a couple of options:
Option 1:
Handle the paintEvent (or override OnPaint)for the form and add some code such as -
e.Graphics.DrawRectangle(...);
Be aware that controls maybe be drawn ontop of the border depending on placement
Option 2:
Create a panel, which will be your 'Main Panel' place this on the form but slightly offset its size and position so the mainForm background color can be set to the desired border color and you should only see a border effect, of course you set the 'Main Panel' backColor to be what ever you want your main backColor to be
Hope these make sense
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Thanks musefan, I'll attempt to handle with your suggestion
|
|
|
|
|
Without adding some serious code to handle redrawing the non-client area (NOT EASY!) of the form, you can't. The window borders are drawn according to the system settings and they are for every window you see, not just yours.
|
|
|
|
|
|
Good day!
I've a question, kindly ask you to help me in this issue.
There is an multidimensional array. Like below
Column1 Column2 Column3 Column4 Column5 Column6 Column7
Row1 DATE 12/2/2009
Row2 Name Surname 01:00 02:00
Row3 LL WL SG LL WL
Row4 Jonh K 1 34 78 0,1 54
Row5 Max A 60 89 32 99 12
Note: LL,WL, SG ( Is lesson names).
How i can put this values to procedure (following format) -> BEGIN INSERT_PROC("DATE + HOUR", "NAME","SURNAME", "Lesson_Name", "Values"); END;
For / example -> BEGIN INSERT_PROC("12/2/2009 01:00AM", "Jonh", "A", "LL","1");END;
Note: The table is previewed on dataGridView.
BR
|
|
|
|
|
if you got in datagridview already then just loop through them rows and call the procedure and pass the relevant columns to it
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
for (int m = 2; m < 8; m++) (There is only 01:00 and 02:00 hours, each of them consist 3 lessons)
{
for (int i = 3; i < 17; i++) (There is 17 students)
{
for(int j=2;j<8;j++){
switch (dataGridView1.Rows[2].Cells[m].Value.ToString())
{
case "Liquid Level":
for (int n = 2; n < 8; n++)
{
switch (dataGridView1.Rows[1].Cells[n].Value.ToString())
{
case "01:00":
formattedValue = dtPicker.Value.AddHours(3).ToString("yyyyMMdd HH:mm:ss");
date_stamp = formattedValue;
name = dataGridView1.Rows[i].Cells[0].Value.ToString();
surname = dataGridView1.Rows[i].Cells[1].Value.ToString();
lesson = "LL";
mark = dataGridView1.Rows[i].Cells[j].Value.ToString();
OracleCommand cmd = new OracleCommand("begin CPF_TANK_DATA_INSERT('" +
date_stamp + "','" + name + "','" +
surname + "','+lesson+','" +
mark + "'); END;", conn);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery()
case "02:00:
.....
....
}
}
}
}
But it gives an errors. Or puts more values. Where is mistakes?
|
|
|
|
|
sorry to say but that is very messy code, does your datagridview already contain the data exactly how you want it to be put in your database? you might want to look into using structs to store lesson info and student info too, that may help with things
If you have errors please post the error messages...
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
First of all, learn some things about variablenames.
I've been told that you could think for 10 minutes about a proper variable name, rather than 1 second for a bad one.
For instance:
for (int i = 3; i < 17; i++) (There is 17 students)
An iterator is fine and if you call it 'i' is sometimes fine to (it's intergrated in our system). But you say as a comment that there are 17 students.... why not call the variable students, or maybe better studentNumber or studentAmount?
Also about the commenting, maybe you allready do this, but you can better make a story in a comment above a function or some tough for loop in stead of writing some small parts behing some code. Do your outline first (in comments) and then start programming.
Don't use strange numbers.
Rather make this code:
int maxStudents = 17;
int minStudents = 3;
for(int studentNr = minStudents; studentNr < maxStudents; studentNr++);
than
for(int studentNr = 3; studentNr< 17; studentNr++);
But ontopic:
What kind of errors do you get?
I think you can't switch case with strings. It's only for numeric types like byte, int etc., at least I think so.
And you miss a lot of ';''s and break
|
|
|
|
|
Thanks for comments.
There is no error. Loops insert too many data,in to this procedure.
BR
|
|
|
|
|
I need to use one report with sub report i am using .Net Reporting.
The report is working without parameter from Master report to Sub Report
But when i pass the parameter to sub Report then it Give Error.
Is There Any Example or Tips Then Thanks
Best Regards,
Chetan Patel
|
|
|
|
|
Copy and paste your report to Bin/Debug Folder for the latest copy of the report because the application is running from that folder
Best Regards,
Chetan Patel
|
|
|
|
|
if you use crystalreport, you set the relation between mainreport and subreport, the crystalreport can work fine.
|
|
|
|
|
Hello,
i would get the name of file in directory, i use this :
<br />
files = Directory.GetFileSystemEntries(@"C:\Documents and Settings\Administrateur\Bureau\input");<br />
<br />
int filecount = files.GetUpperBound(0) + 1;<br />
for (int i = 0; i < filecount; i++)<br />
MessageBox.Show(files[i]);<br />
it show me the full name of my files like C:\Documents and Settings\Administrateur\Bureau\input\doc.txt, i would get doc.txt, thank you verry mutch.
|
|
|
|
|
You could use Path for that.
Like this:
Path.GetExtention(path);
Path.GetFileName(path);
|
|
|
|
|
i need to get all the names of files in a directory, thank you verry mutch.
|
|
|
|
|
then keep the for loop and use the path to get the name and put that name in a list or array
(sorry about the vb.net code but you can translate it)
files = Directory.GetFileSystemEntries(@"C:\Documents and Settings\Administrateur\Bureau\input")
Dim list as new list(of string)
For each s as string in files
list.add(io.path.getfilename(s))
messagebox.show(io.path.getfilename(s)
next
|
|
|
|