|
Use @echo off on the first line of your bat file.
|
|
|
|
|
Hi
I applied @echo off, but still it is not solved the issue.
|
|
|
|
|
Hi,
In a datagridview, I've included a combobox column in columns collection property.
How to handle combobox selectedindexChanged event.
And how to create combobox object for a particular cell in combobox column.
Please guide me. Thanks in advance.
|
|
|
|
|
Brad North wrote: How to handle combobox selectedindexChanged event.
You can handle the CellValueChanged event for the DataGridView and check if the cell whose value was changed is the ComboBoxCell.
Brad North wrote: how to create combobox object for a particular cell in combobox column.
Why do you want to do this?
|
|
|
|
|
|
|
first of all thank you for ur reply ..
sir u gave me the link in which video convert into another video format .
i want to convert/split the video in JPEG PICTURES..
but again thank you!!..
*Video is consist of Picture in sequence..
i love pRogRamming.
|
|
|
|
|
You can exctract single/multiple frames from a video file with ffmpeg.
from the documentation:
* You can extract images from a video, or create a video from many images:
For extracting images from a video:
ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
This will extract one video frame per second from the video and will output them in files named `foo-001.jpeg', `foo-002.jpeg', etc. Images will be rescaled to fit the new WxH values.
If you want to extract just a limited number of frames, you can use the above command in combination with the -vframes or -t option, or in combination with -ss to start extracting from a certain point in time.
For creating a video from many images:
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
this documentation is for the console app, but the lib should also be able to do it.
modified on Thursday, April 22, 2010 6:36 AM
|
|
|
|
|
ok ,, let me see again deeply !!
and if u have any code example, then please give me that also!!
thanks!!
i love pRogRamming.
|
|
|
|
|
sir i found the way in FFmpeg Document ..
but i am totally confuse that how to RUN this Command Line arguments ??
*i knw how to run COMMAND LINE PROGRAMS.. but where is the EXE of the ffmpeg??
i love pRogRamming.
|
|
|
|
|
you can:
a) 1. download the ffmpeg source code from svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg with a SVN client like tortoiseSVN or AnkhSVN.
2. Then compile the source using MinGW.
b) google around for "Unofficial ffmpeg windows build"
For the implementation you basicly have 2 chooses:
a) using the ffmpeg dll files, and p/invoke them in C# allowing you to access the unmanaged methods in those dll files in your managed C# code. (or you can save yourself some time and go to http://sourceforge.net/projects/sharpffmpeg/[^]
b) using the Process.Start method in C# to start the ffmpeg console application with the correct arguments.
modified on Thursday, April 22, 2010 7:53 AM
|
|
|
|
|
Thanks
i love pRogRamming.
|
|
|
|
|
|
No problem
|
|
|
|
|
First question here! Been on this problem for two days now and can't seem to find a solution.. CodeProject has always been a great reference for me, so I hope you guys can help! Please find a simplified example of my application below.
Ingredients:
* public class VehicleClass
** public bool Ignition { get; set; }
** public static void SetIgnition(object vehicle)
* public partial class MainForm : Form
** TextBox "txtIgnitionStatus"
So, in the MainForm class I create an instance of Vehicle and I link the textbox on the MainForm (txtIgnitionStatus) to the Ignition property of that Vehicle class:
private VehicleClass Vehicle = new VehicleClass();
public MainForm()
{
txtIgnitionStatus.DataBindings.Add(new Binding("Text", this.Vehicle, "Ignition"));
}
The SetIgnition method in the vehicle class a TcpClient to listen for incoming TcpPackets and sets the Ignition status of the Vehicle when necessary:
public static void SetIgnition(object obj)
{
VehicleClass vehicle = obj as VehicleClass;
switch(dataString)
{
case "ON":
vehicle.Ignition = true;
break;
case "OFF":
vehicle.Ignition = false;
break;
default:
vehicle.Ignition = false;
break;
}
..
}
Here is the instantiation of the thread that handles the tcp communication:
readThread = new Thread(new ParameterizedThreadStart(VehicleClass.SetIgnition));
readThread.Start(this);
(readThread is a private class member of VehicleClass)
Now to the problem.. When the Ignition property of the vehicle class is set to "true" (ie. when a Tcp packet arrives that contains the data string "ON"), txtIgnitionStatus on the MainForm should display "True" instead of "False". It never gets that far though, because I get the following error:
Cross-thread operation not valid: Control 'txtIgnitionStatus' accessed from a thread other than the thread it was created on.
Fair enough.. I understand I'm trying to change a control that is created on the UI thread, from another thread (the thread that is created inside the VehicleClass to handle the Tcp communication). But how do I go about avoiding this error?
After spending hours searching the internet, I think I might have found a solution in using the ISynchronizeInvoke interface in my VehicleClass, to be able to Invoke the Ignition property of the class.
First of all I would like to know if that is indeed the way to go?
And if so, how should I implement the interface members BeginInvoke, Invoke, InvokeRequired, etc.?
Because when I add the ISynchronizeInvoke interface to my class, and click Implement Interface, I have the following code lines added to my VehicleClass:
public IAsyncResult BeginInvoke(Delegate method, object[] args)
{
throw new NotImplementedException();
}
public object EndInvoke(IAsyncResult result)
{
throw new NotImplementedException();
}
public object Invoke(Delegate method, object[] args)
{
throw new NotImplementedException();
}
public bool InvokeRequired
{
get { throw new NotImplementedException(); }
}
.. but I have no idea how to fill them in!?
I hope my problem is clear to you, and hope even more that you'll be able to help me find a solution for it!
Many thanks in advance!
René
F1RST Racing
www.f1rstracing.nl
|
|
|
|
|
Hmmm, guess I used too much text then?
Still hope someone can help me out here. In the mean time I've made the app work without threads so I can continue working, but I like my GUI responsive!
F1RST Racing
www.1stracing.nl
|
|
|
|
|
Hi,
I have +20 comboboxes in my windows app. and thought its best to have the code in a seperate class and than call that class and pass the parameters using a constructor...
With this one function I hope to fill every combo box that i have in my application from a database table.
But not sure how to get started with it.
thanks
Wouter
|
|
|
|
|
First I'd say from a UI perspective 20+ comboboxes on a screen is probably not the best design. Think about breaking them up with tabs, or sub forms if it makes sense.
What you can do is iterate through the controls collection to find each combobox and set the properties accordingly. Or you could set DataBinding between the comboboxes and your datatable
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have 14 forms and 20 combo's in total, So each form has max 2 comboboxes on it.
|
|
|
|
|
More reasonable then. DataBinding, IMO, would be the best approach in this case.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark,
Thanks, the answer was indeed easyer than the question, solved the problem !
In class "cls_role.cs":
public DataTable GetRols()
{
DataTable DT = new DataTable();
string Query = "GetRols";
DT = _dbHelper.ExecuteDataTable(Query);
return DT;
}
In Winform:
private void GetRols()
{
Cls_Role Role = new Cls_Role();
cmbRole.DataSource = Role.GetRols();
cmbRole.DisplayMember = "Role_Name";
cmbRole.ValueMember = "Role_ID";
}
I was thinking to complex
|
|
|
|
|
hi,
i am passing datetime.now.tostring() as parMETER IN MY SQL QUERY for retriving all the transaction of todays.but unable to retrive.
please help me.
my query like:
select billno,net amount from bill_details where date='" +DateTime.Now.Tostring() + "';
THANKS IN ADVANCE.
|
|
|
|
|
Please do not repost:
http://www.codeproject.com/Questions/74638/date-time-problem.aspx[^]
Post either here or in Q&A, not both.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Well, have you looked at what you are actually passing to the SQL? datetme.now.tostring() gives you the date AND time down to seconds, so unless your database date EXACTLY matches the system date and time nothing will be returned.
2 minutes in debug would have shown you that.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Don't pass it as a string; use a parameter.
|
|
|
|