|
Hi,
I am definitely new to .NET and I have purchased Visual C# .NET some time ago. I was wondering if it is possible to build plugin applications, such as Cloudmark or Plaxo for Outlook entirely with Visual C# .NET, as opposed to building COM plugin with MFC and Visual Studio C++ 6.0.
Is there a loss of features doing so? Basically is everything that is possible with Visual Studio C++ 6.0 possible with .NET or are there some limitations.
I am trying to determine if I have to forget about trying to use C# for the purpose of a plugin app and use C++ as before or if it worth using C# and .NET. I would like to avoid trying .NET and realizing that I am better off doing it as before in mid course, but then again, that might be wishfull thinking.
Thanks in advance
YorgZero
|
|
|
|
|
|
Hi everyone,
Could u please help me to code one simple(may be for you) but critical
portion of my project!!. I need to know how do I trace, say detect when
a windows system is being locked?? I need to trap the time and date
when the system is being locked and also when it resumes from the
locked state. This is Urgent. Please reply ASAP.
Thanx a lot 4 taking pain to share this problem with me.
|
|
|
|
|
Hi all
I have a table that contains four attributes (testVersion, qnum, answer, weight).
Now I want to display this table in a datagrid using C#. The user then should be able to change the value of the weight attribute of any record and then that value should be updated in the table. I am using MS Access database.
How can I code it easily?
I hope that u understand my question.
please help me I should finish the project very soooooooooooooooon.
thanks
|
|
|
|
|
I think you have 2 ways to do waht you want :
1) make a button in the corner of the window whitch has the dataGrid that updates the database with the contnets of the grid
or
2) catch every changed row in the dataGrid and update it in the database after the complete change
I would recommand option 1 because when a mistake is made it can be undo.
I hope you know something about asp.net in order to do what I wrote...
ps: when a value is changed in a dataGrid, the dataTable that is the source is modified too.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
would u provide me the code here. I visited the site but did not find any thing related.
it is better if someone provide me the C# code with the MS Access.
|
|
|
|
|
This is my code to display the table into the datagrid.
private void btnShow_Click(object sender, System.EventArgs e)
{
try
{
//set SQL query
oleDbDataAdapter1.SelectCommand.CommandText = "SELECT * FROM KeyAnswers";
//clear dataset
dataSet1.Clear();
//Fill dataset with information
oleDbDataAdapter1.Fill(dataSet1,"KeyAnswers");
//bind datagrid
dataGrid1.SetDataBinding(dataSet1,"KeyAnswers");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally {
}
}
This is when I click the show button.
Now I want to create a "Update" button . what should be the code?
Should I update the whole table wheras only one record has been changed?!!
waitting.....
thanks
|
|
|
|
|
pleasehelp me
|
|
|
|
|
I think that when you click the show button the call of SetDataBindingis is not necesarry.
And at the update you code should look like this :
<br />
private void btnShow_Click(object sender, System.EventArgs e)<br />
{<br />
...<br />
oleDbDataAdapter1.SelectCommand.CommandText = "SELECT * FROM KeyAnswers";<br />
<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(oleDbDataAdapter1);<br />
...<br />
}<br />
<br />
private void btnShow_Click(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
oleDbDataAdapter1.Update(dataSet1,"KeyAnswers");<br />
MessageBox.Show("Changes saved successfully!");<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("There was an error while saving the changes : ex.ToString());<br />
}<br />
<br />
finally {<br />
}<br />
}<br />
PS: my code is not 100% correc in the way i haven't got an .net compiler right now, but that is the algorith you shoul use.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
I have a C# Class Library Project in VS 2003. How do I import and make use of a .tlb file to that project?
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi every body , from day i have a problem that i can't solve , how i can pass a STRING variable by using a matlab program dll .
The document 1,2,3 ways offer just a double variable
Plz i need it ,
thx
|
|
|
|
|
Not sure at all what you are asking, but if you just need to convert a string to a double try:
double myDbl = double.parse("123.45");
|
|
|
|
|
Hi all,
I'm resizing an image in C# and when I use InterpolationMode.HighQualityBicubic and SmoothingMode.AntiAlias (and many other combinations) I get a 1px wide border all around the image. This is ok for the project I'm working on expect for the bottom border. I have tried to overcome this by drawing the pixel above the bottom border over it, like this:
<br />
for ( int i = 1; i < width; i++ )<br />
{<br />
bitmap.SetPixel( i, height, bitmap.GetPixel( i, height - 1) );<br />
}<br />
where width and height are bitmap.Width and bitmap.Height, respectively.
But I'm obviously missing something since this isn't working. Any ideas?
|
|
|
|
|
Bicubic interpolation uses the values of the surrounding pixels, it's possible the GDI+ implimentation uses the values of the pixels on the other side of the image to interpolate the edges.
You should never use GetPixel/SetPixel unless time is not critical.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, thanks for the answer. This doesn't only happen with Bicubic interpolation though. What are my options if I don't want to use get/setpixel? In this particular project, the images are tiny and time is of no importance, but I would like to know the better alternatives.
best regards,
FAC
|
|
|
|
|
Read my image processing articles for info on how to lock/access/change bits of a bitmap.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
So, I have this WebBrowser control that everyone knows about, and I have popups disabled, per NewWindow2() event, which is really cool. However, there do exist certain sites that use windows.alert("message digest") that doesn't count as a pop up, since it opens a messagebox window instead of another webbrowser window . So I want to disable scripting in my control. The best answer I've found so far was "look at MS's WALKALL example (http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/browser/walkall/default.asp)." Well aside from the fact that MS is really good at using unmanaged c code that I have almost no experience reading, they also excel at providing really crappy documentation . So basically I've read the code over and over and all that's done is hurt my head . Does anyone know how to disable scripting in a webbrowser control ***IN C#***?
|
|
|
|
|
I am writing an application that monitors users' bandwidth and disables their network connection if they have downloaded/uploaded to much data. For users with a DHCP IP address this is simple but I am having troubles with people with Static IPs. The best idea I could come up with is to just disabled the network card, but I don't know how to.
Can anyone give me some ideas?
Thanks,
Eric Sanders
Purdue University
|
|
|
|
|
Hi all,
I'm missing a simple disable property bit which prohibits the change of data in all input controls.
control.enable = false;
Is there an other way than to jump to an unvisible dummy-control when enter/change/cut&paste... is triggering ?
It would be useful to make an expansion of the form/controls base class from which I can inherit all input controls.
Does someone have an idea how to do that ?
Thanks for your ideas !!
Regards
Frank
|
|
|
|
|
You're right. It's a missing feature what would be nice. Some controls have a ReadOnly property which you could use. Making a base class will not be so easy. You could define an interface and try to inherit from every control you need and implementing this interface. But you will nevertheless have to implement the ReadOnly behaviour yourself in most controls.
|
|
|
|
|
Hi. I’ve managed to call a unmanaged c++ dll function into a C# project using the DllImport attribute. Now I like to Import a hole class that my old dll exposes. Is that possible and how do I do that?
_____________________________
...and justice for all
APe
|
|
|
|
|
Heya!
I'm using databinding to an object. I'm binding a txt box to the object's Name property. The Name property is a string of length no longer than 10 chars. In the Name property's set accessor method, I check if the string value's length > 10. If it is I throw a FieldLengthException(my own).
The problem:
In the UI I want to catch this exception but I'm not sure where this exception can be caught (or for that matter where to put the try clause)
Eg.
<br />
public class Person<br />
{ <br />
private string _Name = "";<br />
<br />
public string Name<br />
{<br />
get { return _Name; }<br />
set <br />
{<br />
if (Name.Length > 10)<br />
throw new FieldLengthException("Field restricted to 10 characters");<br />
else<br />
_Name = value;<br />
}<br />
}<br />
}<br />
<br />
Person p = new Person();<br />
<br />
Binding bName= new Binding("Text", p, "Name");<br />
tbName.DataBindings.Add(bName);
<br />
|
|
|
|
|
|
Sorry please help me out
I got this error when doing SQL INSERT.
"Object reference not set to an instance of an object."
This was my coding:
string connStr = ConfigurationSettings.AppSettings["ConnectionString"];
string desc = txtMailing.Text;
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\testing_K_\db1.mdb");
OleDbCommand cmd = new OleDbCommand();
OleDbDataAdapter oleDbDataAdapter1 = new OleDbDataAdapter(cmd);
oleDbDataAdapter1.InsertCommand.CommandText =
"INSERT INTO Mailing (MailingField)" +
"VALUES ('"+ desc +"')";
//open the bridge between the application and the datasource
con.Open();
oleDbDataAdapter1.InsertCommand.Connection = con;
//execute the qurey
oleDbDataAdapter1.InsertCommand.ExecuteNonQuery();
//close the connection
con.Close();
The underlined sentence is the error. Please give me tips or advice to solve this.
Thanks
fire85.
|
|
|
|
|
Hi.
To make an update you do not need the data adapter.
Write like this and you will be happy:
<br />
SqlConnection con = ...<br />
try {<br />
using (SqlCommand cmd = new SqlCommand("INSERT ...", con)) {<br />
cmd.ExecuteNonQuery();<br />
}<br />
catch (SqlException ex) {<br />
}<br />
if (con != null) {<br />
con.Dispose();<br />
con = null;<br />
}<br />
By the way, using is nice, it runs Dispose() on your command-object automatically.
/M
|
|
|
|