|
Hello,
I convert the pdf to JPEG picture using IMAGEMAGICK, but how i can have the best quality, beacause the picture was blur, thank you verry mutch.
|
|
|
|
|
check ImageMagick's documentation or forum.
Yusuf
|
|
|
|
|
I suggest you hire someone to do this for you, you really don't seem to have any semblance of a clue.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have problem
at c#
i created interface that have signature OtherFrame(ref Byte[] data) and build for create dll
at visual c++
i use dll interface from c# I dont know function that have same signature interface
virtual void FirstFrame(array<Byte>^% frame)
{
unsigned char *tmp = new unsigned char [frame->Length];
for(int i = 0; i > frame->Length; i++)
tmp[i] = frame[i];
changepicture(tmp);
delete[] tmp;
}
i create function. it work but It cannot past by referrence becase of
a picture on picture box at c# it not change.
any one can help me
thank you
|
|
|
|
|
|
you did not specify your framework, so assuming you working with 3.5 see here[^]
Yusuf
|
|
|
|
|
I am using .Net Framework 2.0 sorry I should have included that in my original post.
|
|
|
|
|
When using this class how come the examples I see on the internet do not include statements for port number, username and password, and servername?
I'm going to be using this class on a client app and I think I need to supply this information but do not know how to code it.
|
|
|
|
|
|
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient([Host], [Port]);
smtp.Credentials = new System.Net.NetworkCredential([UserName], [Password]);
If you prefer, use the config file (web.config, app.config).
<system.net>
<mailSettings>
<smtp>
<network host="" port="" userName="" password="" />
</smtp>
</mailSettings>
</system.net>
|
|
|
|
|
I have seen many that give examples, but they wont give you real working one.
See here[^] and here[^] for code examples
Yusuf
|
|
|
|
|
The code file in the second link is very cool. Thanks!
|
|
|
|
|
use it responsibly.
Yusuf
|
|
|
|
|
|
Hi,
I have following function below but is not populating values from the table product?
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
database = new OleDbConnection(connectionString);
System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("Select * from Products", database);
database.Open();
System.Data.OleDb.OleDbDataReader dr;
dr=cmd.ExecuteReader();
while (dr.Read())
{
comboBox3.Items.Add(dr["ProductName"]);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
regards,
|
|
|
|
|
- you probably want to clear out the old values from the combo box before you populate it with new data
- don't forget to close dr and database after you're finished using them otherwise you'll leak resources
- what happens when you step through this in the debugger? does your while loop properly iterate through all the rows in the DB?
- if the only column you're using from the DB table is ProductName then doing a Select * is rather inefficient.
- just for my own curiosity, why are you doing this in the SelectedIndexChanged event handler for the combo box?
Last modified: after originally posted -- grammar correction
|
|
|
|
|
Hi Jimmanuel,
...What else method or way u recommend instead of SelectedIndexChanged ? can u pls gimme example?
... I have 3 fields in that table so why it is inefficient?
i have changed code and following is here: to include dr.close method..
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
database = new OleDbConnection(connectionString);
System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("Select distinct ProductName from Products", database);
database.Open();
System.Data.OleDb.OleDbDataReader dr;
dr = cmd.ExecuteReader();
while (dr.Read())
{
comboBox3.Items.AddRange(new Object[] { dr[1].ToString() });
}
dr.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
please help
|
|
|
|
|
How often is the DB Table going to change? If it doesn't change or rarely changes then you really only need to populate the combo box values once - when the form loads. If it does change frequently then there are lots of good ways to keep the combo box up to date. You could use a timer to reload the values every so often, put a button on the form that allows the user to refresh whenever they want or work out some way of receiving a notification any time that the table changes.
database.Close() is just as important. That closes the connection to the DB, otherwise it gets orphaned. A using[^] statement would be helpful in making sure that everything gets cleaned up whether an exception is thrown or not.
Say your table has 10 rows; that means that all you want from it is 10 product names but a select * statement is giving you back the 10 product names plus 20 other values that you aren't using. That's 3 times as much network traffic as you actually need. It might not be a big deal now but what if there were 10,000 rows? What if later on the table changes and more columns get added? For each column that's added that's more unnecessary traffic between your app and your DB and more time and memory required to handle your select . Select distinct ProductName is the way to go here. In fact, I can't recall a time that I've ever used select * .
|
|
|
|
|
why are you populating comboBox3 from db when something got selected on the same combobox?
You know showing any other thing except populating your combobox. You need to do this only once or when ever the data changes.
Yusuf
|
|
|
|
|
thanks Yusuf, i just want to see the product names in this comboBox thats all..and which will come from Products Table...
regards,

|
|
|
|
|
Good afternoon.
I am trying to reference the cell on a datagrid.
The Description column is hidden, but I want the description to populate a text box when the user clicks on a specific row.
I have the following so far:
rtxtDescription.Text = DataGridView1.Rows[index].Cells[2].Value.ToString();
The column is 2 and the row would depended on which row is selected.
I am using Visual Studio 2008.
Any suggestions?
WHEELS
|
|
|
|
|
CellClick event?
Time is the best teacher; unfortunately it kills all of its students.
जय हिंद
|
|
|
|
|
It is actually in a method:
public void PopulateDataGrid()
{
ds = new DataSet();
ds = d.FillDataGrid(this.cboDepartment.SelectedValue.ToString(), this.txtAcronym.Text);
DataGridView1.Columns.Clear();
if (ds != null && ds.Tables.Count != 0)
{
BindingSource bs = new BindingSource();
bs.DataSource = ds;
bs.DataMember = ds.Tables[0].TableName;
DataGridView1.DataSource = bs;
//return;
}
foreach (DataGridViewColumn col in DataGridView1.Columns)
{
if (col.HeaderText == constrDescrColumn) { col.Visible = false; }
}
//MessageBox.Show(DataGridView1.CurrentRow.Cells.IndexOf(.ToString());
int index = 0;
rtxtDescription.Text = DataGridView1.Rows[index].Cells[2].Value.ToString();
}
|
|
|
|
|
Wheels012 wrote: It is actually in a method:
In your first post you asked for suggestions and the reply was "CellClick event"
Now I could be wrong, but if I am correct it appears you have completely missed the point.
|
|
|
|
|
Good afernoon led mike.
I am very new to C# (huge VBA background).
My first hurdle is to populate the text box with the discription from the first cell from the description column.
Secondly I need to add this to the click event once a user changes from record to record.
WHEELS
|
|
|
|