|
Don't ask the same question in two places at once!!
It is rude.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am trying to add combo box control as subitem for 1st column 1st row in listview control. Below is the code:
1.ComboBox cmb = new ComboBox();
2.cmb.Items.Add("Yes");
3.cmb.Items.Add("No");
4.cmb.DropDownStyle = ComboBoxStyle.DropDownList;
5.this.ListViewInkers.Items[i].SubItems[iCol].Control = cmb;
But i am getting below exception for 5th line.
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: Index was out of range. Must be non-negative and less than the size of the collection.
Thanks in advance.
|
|
|
|
|
OK, so are you asking a question or just informing us that you don't know what you're doing?
only two letters away from being an asset
|
|
|
|
|
Yaa, i dont know to overcome this problem. If u know how to solve this issue then plz tell me.
Thanks In Advance.
|
|
|
|
|
what are the values of i and iCol? Clearly, one of these is out of range. What happens if you view ListViewInkers.Items[i] in the debugger? If that is OK, what happens when you view ListViewInkers.Items[i].SubItems[iCol] ?
Also, if you are a beginner - you do know that indices begin at 0, right?
Cheers,
Vikram. (Proud to have finally cracked a CCC!) Recent activities:
TV series: Friends, season 10
Books: Fooled by Randomness, by Nassim Nicholas Taleb. Carpe Diem.
|
|
|
|
|
I have a window as Panel
The panel is set to be a VideoPanel.
When i play the video, i get black screen on secondary monitor, if i move the window to primary, it runs fine and when i place it in the middle the part of the primary place fine, but the part on seconray is just black.
I tried to run the samme video in vlc and medaiplayer , and theres is no problem on playing in thes player on secondary screen, so it has to be something with directx.
I use Microsoft.DirectX.AudioVideoPlayback;
I search google and this forum for answer, but found nothing.
My Screens are set up to Expand desktop.
Somebody have a solution?
|
|
|
|
|
I have the same problem when I connect my TV on my laptop to play movies
and Yes , every program use DirectX top view will show a blank screen ...
thus , I used KMPlayer , and VLC as you said ... .
I think you need to try OpenGL
I know nothing , I know nothing ...
|
|
|
|
|
Ok, do you have some link to some open gl video info?
My file was in wmv, and could be play on secondary throug vlc and mediaplayer but not in my app.
But when i converted the file to mpeg, it will play in my player also on secondary screen.
-Thomaxz.tc
|
|
|
|
|
I just download VS 2010, to my understanding, it can only be used for evaluation purpose,
but I am wondering if someone use it for product developement, how MS can limit it?
|
|
|
|
|
Wow, deja vu. I'm pretty damned sure you asked this before.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
no, I asked a question also regarding to VS 2010, but it was different aspect!
|
|
|
|
|
Fair enough, but it was pointed out to you on that thread that you shouldn't ask this on the C# forum - this is a Visual Studio question. C# does not equate to Visual Studio; one's a language, the other's an IDE.
To answer your question though - the VS2010 beta will expire at a point in time. More importantly, it is targetting a beta version of the framework. Of course, you could develop a commercial product with it, but frankly you'd just be wasting your time trying to get round the timebombs when MS release free versions of their development environments in the Express editions.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I would expect project developed in the beta version to be able to move into the RC version, there may be some breakages but surely the bulk would move without expiring.
I always assumed most houses used the beta to prototype potential new projects and they would move to the release version when available.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I would expect project developed in the beta version to be able to move into the RC version, there may be some breakages but surely the bulk would move without expiring.
It's not the projects that are the problem. It's any compiled up code you've created - especially if it binds to specific secured assemblies; then you're up the creek watching your oar disappear. At this point you have to recompile your code against the right version (taking into account any framework changes).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Of course but what brainless twerp would try and distribute code based on a beta - oh yeah them but they aren't using someone elses framework.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Do it at your own risk - you will be targetting a Beta/RC version of the framework.
Cheers,
Vikram. (Proud to have finally cracked a CCC!) Recent activities:
TV series: Friends, season 10
Books: Fooled by Randomness, by Nassim Nicholas Taleb. Carpe Diem.
|
|
|
|
|
Over the years I have had to learn a few painfull truths (generally the hard way):
1) Never mix red and white wine.
2) Never reply "Yes" to "Does my bum look big in this?"
3) Never pause before answering "No!" to "Does my bum look big in this?"
4) Never use Beta or RC software for mission critical or production purposes.
Failing to observe these rules will lead you to a whole world of pain. Maybe not today. Maybe not tomorrow. But soon, and for the rest of your life.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I am trying to convert datalist control to pdf. Are there any third party tool that can do this or any tutorials on how to accomplish this? I have been googling and trying stuff, but they do not work. Anyways, please help
Ferron
modified on Wednesday, July 1, 2009 4:48 PM
|
|
|
|
|
PDFSharp
or you can try this code
public string strConn = ConfigurationManager.ConnectionStrings["BLAH-Here"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection(strConn);
conn.Open();
SqlDataAdapter cmd1 = new SqlDataAdapter("EXEC [dbo].[spStatReport] @CompanyID=" + Session["CompanyID"] + ", @StatReportID=" + Request.QueryString["ReportID"].ToString() + ", @StartDate='" + Request.QueryString["StartDate"].Replace("-", "/").ToString() + "', @EndDate='" + Request.QueryString["EndDate"].Replace("-", "/").ToString() + "';", conn);
cmd1.SelectCommand.CommandType = CommandType.Text;
DataSet dsReports = new DataSet("tblReporting");
cmd1.Fill(dsReports);
conn.Close();
DataGrid dtaFinal = new DataGrid();
dtaFinal.DataSource = dsReports.Tables[0];
dtaFinal.DataBind();
dtaFinal.HeaderStyle.ForeColor = System.Drawing.Color.White;
dtaFinal.HeaderStyle.BackColor = System.Drawing.Color.DarkGray;
dtaFinal.ItemStyle.BackColor = System.Drawing.Color.White;
dtaFinal.AlternatingItemStyle.BackColor = System.Drawing.Color.AliceBlue;
Response.Buffer = true;
Response.ClearContent();
Response.ClearHeaders();
EnableViewState = false;
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
dtaFinal.RenderControl(hw);
Response.Write(sw.ToString());
Response.Flush();
Response.Close();
Response.End();
}
I know nothing , I know nothing ...
|
|
|
|
|
tried using that code, it doesn't work
Ferron
|
|
|
|
|
Hi,
I'm wondering if there are any document viewer controls out there for windows forms applications. I know there are PDF viewer controls, but I'm wondering if there is a viewer that can display multiple file formats such as Word, Excel, PDF, etc.
Thanks
|
|
|
|
|
Hi,
anything you can view with Internet Explorer, you can also view with the WebBrowser Control.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Good day
I'm having a problem with the writer.Open() method in the AForge library.
I've tried running Andrew Kirillov's code snippet (below) from his "Motion Detection Algorithms" article, on how to save video to a file, but when I attempt recording the program it jumps right into the exception (since "writer.Open()" isn't working).
SaveFileDialog sfd = new SaveFileDialog( );
if ( sfd.ShowDialog( ) == DialogResult.OK )
{
AVIWriter writer = new AVIWriter( "wmv3" );
try
{
writer.Open( sfd.FileName, 320, 240 );
Bitmap bmp = new Bitmap( 320, 240, PixelFormat.Format24bppRgb );
for ( int i = 0; i < 100; i++ )
{
bmp.SetPixel( i, i, Color.FromArgb( i, 0, 255 - i ) );
writer.AddFrame( bmp );
}
bmp.Dispose( );
}
catch ( ApplicationException ex )
{
}
writer.Dispose( );
}
When I removed the catch() at the bottom, I got a "Exception unhandled: Failed creating compressed stream" message
Can anyone please help me identify the problem so I can fix it.
I've tried running the entire source code, but opening and saving video doesn't work there either.
tvb
|
|
|
|
|
Sorry, my mistake
See writing below code on Andrew's article
"Note: In this small sample and in the demo application I was using Windows Media Video 9 VCM codec."
Installed the codec and it fixed the problem
tvb
|
|
|
|
|
Hi,
two comments:
1.
removing a try-catch structure is not the way to get anything solved.
2.
having an empty catch block is a deadly sin. What you should do is display the exception you got,
as in Console.WriteLine(exc.ToString()); as that would give you valuable information.
An empty catch block just swallows the exception, hence it hides the problem without solving it.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|