|
Thank You sir.
I made an installer with NSIS, which features everything i need.
NSIS is a good and powerfull tool.
bb
~humppa
|
|
|
|
|
I am trying to add checkbox to the DatagridView programmertically. Can anyone help me out here. Here is the sample of my code.
DataSet ds = new DataSet();
string sql;
sql = @"SELECT lastName,firstName,MiddleName,LoginName,Passwd,ReadOnly,Updates,Deletes,Inserts,OTCPriviledge FROM Users ";
SqlDataAdapter da = new SqlDataAdapter(sql, conString);
da.Fill(ds, "Users");
//dataGridView1.DataBindings.Clear();
dataGridView1.DataSource = ds.Tables["Users"];
DataTable dt = ds.Tables["Users"];
CheckBox chkbox = new CheckBox();
------------------------------------------------------------------------------
I want the following columns to be checkbox when loaded into the dataGridView.
ReadOnly,Updates,Deletes,Inserts,OTCPriviledge
-- modified at 13:21 Friday 13th April, 2007
|
|
|
|
|
msogun wrote: dt.Rows[0]["Inserts"] = chkbox.Visible = true;
First what is this ?
|
|
|
|
|
That line should not be there. I was testing for something. The line is out now.
|
|
|
|
|
Try to change the property of the column to boolean
like DataGridview.Columns[index]
you can change the type of this column to boolean
My small attempt...
|
|
|
|
|
Index is not part of the context. Here is my code.
DataSet ds = new DataSet();
string sql;
sql = @"SELECT lastName,firstName,MiddleName,LoginName,Passwd,ReadOnly,Updates,Deletes,Inserts,OTCPriviledge FROM Users ";
SqlDataAdapter da = new SqlDataAdapter(sql, conString);
da.Fill(ds, "Users");
dataGridView1.DataSource = ds.Tables["Users"];
DataTable dt = ds.Tables["Users"];
CheckBox chkbox = new CheckBox();
dataGridView1.Columns[index] . ......;
What should be next?
|
|
|
|
|
try to change the datatype i mean value type of the column to boolean
My small attempt...
|
|
|
|
|
I'm having some problems incorporating a date range in a SQL SELECT expression when I use the dates as strings. The SQL expression doesn't return the correct data. I assume the SQL comparison of dates as strings is not accurate, but I assume that if I switch the data to date/time variables, then it will produce the correct results, but I'm experience a data criteria mismatch error, which I assume is due to syntax. How would I express:
"SELECT * FROM Results WHERE TestDate Between X AND Y"
WHERE X AND Y are Date/Time variables?
Thanks.
|
|
|
|
|
There is nothing wrong with your query per se, but it's better to avoid using strings as dates in your code when talking to databases - if the date formats are different, you will land in trouble.
It would be better still to avoid queries and use stored procedures.
Cheers,
Vikram.
"But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia."
- Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Hello all,
I am rather new to .Net and c# and I'm involved in a project using ip cameras to acquire video in asf/MPEG4 format. I would like to convert these videos to avi. I don't really want someone to give me an entire application to do this, but rather to point me in the general direction which I should take. I have already searched a bit on the net, but I haven't found a lot of interesting stuff.
Thank you in advance for any help you might give me.
Erik Ekhaugen
|
|
|
|
|
I remember a hosted service like Media-convert.com
|
|
|
|
|
A program that I use that I do not believe has a programming interface that you can use with C#, is Super Video Converter. It converts video/audio of any file format to that of another. However, as said, I do not believe it can be used programmatically.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
How do you create a mesh file with the .x extension?
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
Use a 3D modelling package to design your objects and export them to DirectX .X format.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
What I am attempting to do (Probably isn't possible) is get a filled System.Configuration.Configuration object based on the executable or dll location\\name. I want to get the user settings from the configuration file. I found a function called System.Configuration.ConfigurationManager.OpenExeConfiguration() that seems to do ALMOST what I want. You can EITHER send in the exe location\\name OR a configuration user level. It would be great if I could send in both the exe location\\name and the user level. Basically what I want to do is have App1 change the user configuration settings of App2, App3, and App4. Is there anyway to do this?
Chris
|
|
|
|
|
Hi,
Do you people know when you click once in a treeview node in explorer for example?
We can then rename directly that item.
What do i need to do in order to implement that?
Thx,
Nuno
|
|
|
|
|
You may create a custom control that on the rename shortcut converts the node head to a textbox and take the text and set it .
OR
Handle the F2 shortcut for example, and pop a custom messagebox up, take the new name, and set the text to it.
|
|
|
|
|
Here is some code, you can refer,
string
selectedNodeText;
private void RenametoolStripMenuItem_Click(object sender, EventArgs e)
{
TreeNode node = this.treeView.SelectedNode as TreeNode;
selectedNodeText = node.Text;
this.treeViewTestplan.LabelEdit = true;
node.BeginEdit();
}
void treeView_AfterLabelEdit(object sender, System.Windows.Forms.NodeLabelEditEventArgs e)
{
TreeNode node = this.treeView.SelectedNode as TreeNode;
this.treeViewTestplan.LabelEdit = false;
if (e.Label.IndexOfAny(new char[] { '\\', '/', ':', '*', '?', '"', '<', '>', '|' }) != -1)
{
MessageBox.Show("Invalid StepName.\n" +
"The step Name must not contain " +
"following characters:\n \\ / : * ? \" < > |",
"step name Edit Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
if (string.IsNullOrWhiteSpace(e.Label))
{
MessageBox.Show("Step name is Invalid");
e.CancelEdit = true;
return;
}
string label = (!string.IsNullOrEmpty(e.Label) ? e.Label :selectedNodeText);
if (null != e.Label)
{
(node.ExecutionObject as Step).Name = label;
}
}
void treeView_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.F2)
{
this.RenametoolStripMenuItem_Click(this, null);
}
}
|
|
|
|
|
I am experimenting with a GUI for a character based application.
The existing program has a field that accepts F1, F2, etc to go
from menu to menu. What I would like to do is create a form that
upon clicking a button would pass the corresponding function key
to the field in order to have the application progress.
I don't know if what I want is even possible so just pointing me
in the right direction would be appreciated. I guess this is more
of a general "how do I" kind of question.
Thank you in advance!
|
|
|
|
|
It seems like what you are asking for is the API sendmessage command. It allows you to emulate key presses to another application/window/process.
techydog wrote: What I would like to do is create a form that
upon clicking a button would pass the corresponding function key
to the field in order to have the application progress.
I am a bit confused with this part, otherwise I may be able to be more specific.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
What I would like to do is create a button in my app labeled F1 and when pressed the other app would recieve the F1 as if a user had actually pressed the key. My goal is a GUI for the orginal app if that makes sense.
When you say API sendmessage command, is there something I need from the orginal app or is this a .NET component I'm not familiar with?
|
|
|
|
|
The API sendmessage is actually a native command of Windows. I have not used sendmessage to emaulate keypresses but I know it is possible to do so. You may consider googling the subject. To help narrow your search first look for API Viewer and API Guide, these programs will help you in determining parameters and syntax for API calls.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Your help is greatly appreciated. I had now idea as to what to look for but you have pointed me in the right direction. I found a few examples of implenting API and sendmessage here and am now on my way.
Thank you very much for help.
Techydog
|
|
|
|
|
Hi!
i'm trying to list drives on pc. i used System.Management namespace for this purpose.
But i don't want to hear the disgusting noise while listing A: drive.
Does anyone help me?
|
|
|
|
|
If you are using .net 2.0 you can use the new driveinfo class. There is a getdrives method. That doesn't appear to make the A: drive make noise.
If you are using .net 1.1 I guess you could always disable your a: in the bios or something.
Hope that helps.
Ben
|
|
|
|