Hi, I'm developing a windows forms based software that process various '.log' files and provides the output to the user. I've implemented a stop button to stop the processing of the files and when the button is clicked, a message box would display with Yes/No options. The process thread keeps on running when the message box is displayed. I would like to pause the process thread temporarily till the user responds to the message box. I tried 'suspend' method and it is actually obsolete. Need your assistance. Thank you Karthik

Member Avatar
Member Avatar
+0 forum 1

Im trying to bind my custom vertical scrollbar to datagridview is this possible.. Please help Thnak you..

Member Avatar
Member Avatar
+0 forum 9

I have windows form with usercontrol to display image. I am trying to reset the autoscroll position to the top of the image if the user had scrolled down to see bottom part of the image. So at index change it should display top part of the next image that will be loaded on imagePanel(UserControl) I have tried Container.AutoScrollPosition = new Point(0, 0); Any suggestions or help appreciated. Thanks.

Member Avatar
+0 forum 0

Hi, I am working with Winform Grid .As per my requirement , i need to use two control in single grid cell. please suggest how i can achive it. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

I want to show my custom control(eg: `monthcalendar`) as a drop-down (popup) window. One option is to use `ToolStripDropDown` and `ToolStripControlHost` as the second example in [msdn sample](https://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripdropdown(v=vs.110).aspx). Is it recommended to use ToolStripDropDown for controls other than the ToolStrip items ?

Member Avatar
Member Avatar
+0 forum 2

I have a listview component with the following simple items: Name Size Fixed Lens ------------------------------- camera1 35mm Yes camera2 16mm No I'm using C# and want to edit various items but the following code give me value '2' is not valid for index: listView1.SelectedItems[0].SubItems[2].Text = "Test"; What am I doing wrong? Thanks...

Member Avatar
Member Avatar
+0 forum 1

Function Key(F1,F2...) Press open Window Form Instead of Using Menu Button

Member Avatar
Member Avatar
+0 forum 3

I'm trying to change the form icon on an app I'm creating but I've forgotten how. Does anyone remember how to create a winform icon from an image file (i.e.- jpeg, bmp, etc)?

Member Avatar
Member Avatar
+0 forum 4

Just to give a little more info; I'm making a simple inventory program. From the main inventory page, a user can click the "Add Item" button, where they will be taken to another form, where they can fill out the item's info. Three fields are required (Category, Item, Quantity). Based on the category they choose, it will go to one of four DGV's. And the only thing displayed will be the item and quantity (in the appropriate DGV). Could someone give me an example of how I can pass data to the original instance of a main form using { …

Member Avatar
Member Avatar
-1 forum 3

I have a Windows Forms application (not WPF) in which from the main form (UI thread) I am creating a separate thread to perform a long period of test execution. The idea is that the user starts the testing by clicking a button on the main form; when the user wants the testing to stop, the button on the main form is clicked again. This part works alright. The main form is comprised of two tabs; a control tab containing file input boxes, radio buttons and the standard button used to start/stop the new thread. The second tab is a …

Member Avatar
Member Avatar
+0 forum 1

Here is the URL to a thread i started recently for help and looking for guidance from here as well. http://stackoverflow.com/questions/26504979/how-to-get-the-auto-extension-of-entered-link-to-downloader Regards IQBAL

Member Avatar
+0 forum 0

This worked for a txt/zip file download but if i want to save/download video/audio file.How to move ? //Two textboxes used here, //1.to take URL //2.to get saving location on drive private void downloadbtn_Click(object sender, EventArgs e) { WebClient myWebClient = new WebClient(); string path; path = this.savePath.Text; Uri tmp = new Uri(this.downloadURL.Text); string EndPathFileName = tmp.Segments.Last(); path = path + @"\" + EndPathFileName ; myWebClient.DownloadFile(this.downloadURL.Text, path ); } I tried http://freewavesamples.com/roland-gr1-orchestra-hit-c5.wav which downloaded something but unable to play it

Member Avatar
Member Avatar
+0 forum 5

The following programme is not giving me desired output: string remoteUri = "http://www.contoso.com/library/homepage/images/"; string fileName = "ms-banner.gif", myStringWebResource = null; string path = System.Windows.Forms.Application.StartupPath; // Create a new WebClient instance. WebClient myWebClient = new WebClient(); // Concatenate the domain with the Web resource filename. myStringWebResource = remoteUri + fileName; Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n", fileName, myStringWebResource); // Download the Web resource and save it into the current filesystem folder. myWebClient.DownloadFile(myStringWebResource,fileName ); Console.WriteLine("Successfully Downloaded File \"{0}\" from \"{1}\"", fileName, myStringWebResource); Console.WriteLine("\nDownloaded file saved in the following file system folder:\n\t" +path); On moving to the location specified i.e.Application.StartupPath I find 'ms-banner.gif' …

Member Avatar
Member Avatar
+0 forum 1

I have the following code for simple downloading a file using WebClient: using System; using System.Net; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DownloadManager { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void downloadbtn_Click(object sender, EventArgs e) { WebClient wc = new WebClient(); wc.DownloadFile(this.downloadURL.Text, this.savePath.Text); } } } ![0ebd2d094acce1f0e3b48ae3114c83e7](/attachments/small/4/0ebd2d094acce1f0e3b48ae3114c83e7.png "align-left") Moreover, i have a form design: a textbox to enter url (Name:downloadURL) a textbox to set download path(Name:savePath) a download button(Name:downloadbtn) The issue is: wc.DownloadFile(this.downloadURL.Text, this.savePath.Text); returns WebException unhandled An exception occurred during a …

Member Avatar
Member Avatar
-1 forum 5

I need to bind a property to a ToolStripMenuItem. I've searched around and found it imposible, the best workaround seems to be creating a BindableToolStripMenuItem class and implement it yourself. So I've taken some reasonabyl well established code from the internet: public partial class BindableToolStripMenuItem : ToolStripMenuItem,IBindableComponent { private BindingContext bindingContext; private ControlBindingsCollection dataBindings; [Browsable(false)] public BindingContext BindingContext { get { if (bindingContext == null) bindingContext = new BindingContext(); return bindingContext; } set { bindingContext = value; } } [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ControlBindingsCollection DataBindings { get { if (dataBindings == null) dataBindings = new ControlBindingsCollection(this); return dataBindings; } } } Now …

Member Avatar
Member Avatar
+0 forum 1

Hello, I'm currently working with a program that using the reportviewer in VS 2012. I have been looking online since yesterday, trying to find any kind of tutorial on how to switch between reports. I have this so far, but it doesn't work. I have another snippet I've been trying to work with, and it too is having issues. This code directly below doesn't throw any errors, the set after it does. //i don't use these blocks of code at the same time... this.reportViewer1.LocalReport.DataSources.Clear(); DataTable dt = new DataTable(); dt = this.DataTable1TableAdapter.GetData(); string name = "DataSet1"; // this must exist …

Member Avatar
Member Avatar
+0 forum 2

Hi,,,In my C# windows form, blinking and flickering occurs when i'm running the application.The form blinking occurs more times in Win 7 than Win XP.The form blinks when im opening the application and also when another form opens by button click. Can anyone tell me how to avoid that blinking of windows form????

Member Avatar
Member Avatar
+0 forum 3

How to save, delete and insert current cell value of datagridview from xml file in C#.net winforms. i am entering the data in current cell of datagridview, that data is comming from xml file. now how should i save this current cell data.

Member Avatar
Member Avatar
+0 forum 1

I am developing a winform application. I have menu like Edit -> Copy and Edit -> Paste. Instead of using Clipboard class to do copying and pasting can I use Operating System's ability to Copy and Paste text, image, link, etc...

Member Avatar
Member Avatar
+0 forum 1

How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?

Member Avatar
Member Avatar
+0 forum 6

I've got some winforms partial classes marked `[Obsolete]`. Unlike when applying this to methods, I get no warning after building. Is this because it's set on a partial class? I can't set it in the designer too, because that code can/will be regenerated. Anything I can do about it with attributes? I don't want to throw an exception or something similar.

Member Avatar
Member Avatar
+0 forum 6

How can I insert splitted texts to my ms access database? I can't seem to find the logic in it. :( Please help me. Here are my codes: This is where i split the texts that are inputted in textBox1, textBox2, and textBox3 string items = textBox2.Text; string[] splittedText1 = items.Split(' '); string quantity = textBox1.Text; string[] splittedText2 = quantity.Split(' '); string price = textBox3.Text; string[] splittedText3 = price.Split(' '); and this is the code where I will insert those texts to my database: OleDbCommand CmdSql = new OleDbCommand("Insert into [sales] ([productname], productquantity, productprice) VALUES (splittedText1, splittedText2, splittedText3); is this …

Member Avatar
Member Avatar
+0 forum 1

I've got this error: **Additional information: Data type mismatch in criteria expression.** I don't know why.. I want to use split text in a textbox and insert the splitted texts to ms access. Here is my code: string[] splittedText1 = textBox2.Text.Split(' '); string[] splittedText2 = textBox1.Text.Split(' '); string[] splittedText3 = textBox3.Text.Split(' '); string vsql = "Insert into [sales] ([productname], productquantity, productprice) VALUES (?,?,?)"; OleDbCommand CmdSql = new OleDbCommand(vsql, vcon); CmdSql.Connection = vcon; CmdSql.Parameters.AddWithValue("@productname", OleDbType.VarWChar); CmdSql.Parameters.AddWithValue("@productquantity", OleDbType.UnsignedTinyInt); CmdSql.Parameters.AddWithValue("@productprice", OleDbType.UnsignedTinyInt); for (int i = 0; i < splittedText1.Length; i++) { CmdSql.Parameters["@productname"].Value = splittedText1[i]; CmdSql.Parameters["@productquantity"].Value = splittedText2[i]; CmdSql.Parameters["@productprice"].Value = splittedText3[i]; CmdSql.ExecuteNonQuery(); } please …

Member Avatar
Member Avatar
+0 forum 1

hi.. I am working with an desktop application and i want to encrypt dlls after deployment.. Can anyone plz help me???

Member Avatar
Member Avatar
+0 forum 3

Hello there,,,,,,, In my project there is one window form and on that form I have one linkLabel control..... Now my question is that I want to add one web page into my project ......so that when I click on the LinkLabel it must open that web page .....so how can I do it

Member Avatar
Member Avatar
+0 forum 4

Hi i have a problem in binding DateTimePicker value from one form named SearchDoctor to existing form named Doctor. Here is the code of my Doctor form and it works: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.Sql; using System.Data.SqlClient; namespace DRRS_in_Csharp { public partial class Doctor : Form { long doctorID; long pUserID; string mDoctorID; private string conString = "Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=Tuscan46;Integrated Security=true"; private DataSet dataset; public Doctor() { InitializeComponent(); SqlConnection conn = new SqlConnection(conString); conn.Open(); string selectString = ("Select p.doctor_id as doctor_id,p.doctor_dob as doctor_dob,n.doctor_first_name as doctor_fname, …

Member Avatar
Member Avatar
+0 forum 1

I am trying to bind data to my DataGridView. (However, this is the easy explanation.) Background on what I am trying to accomplish: I have a rather large program here. This part of the code uses a DataGridView to display the data I have read and parsed (from another program through an Interop (not sql)). I bind the data using something like this: private DataTable ConvertListToDataTable(List<List<object>> list) { DataTable table = new DataTable(); for (int i = 0; i < MyList.Count; i++) { table.Columns.Add(MyList[i], typeof(string)); } table.Columns.Add("", typeof(object)); // Add rows data List<object[]> tObj = new List<object[]>(); for (int i …

Member Avatar
Member Avatar
+0 forum 4

I am building a winform Application. I have to create buttons dynamically based on data fetched from database. I followed following steps Created UserControl On UserControl_Load event I fetched data from database. I populated the UserControl with buttons based on number of rows i get from the database. The above approach proved too slow. The form loads slowly. It takes time to populate buttons. So Which is the best and optimised way to load controls dynamically in C# winforms? here is my code public ucFileCategoryPane() { InitializeComponent(); PopulateNavPane(); } public void PopulateNavPane() { tblFileController f = new tblFileController(); List<tblFile> lfile …

Member Avatar
Member Avatar
+0 forum 3

I have developed a windows application. My development environment is win7, office2007, C#, VS2010, Winforms. My application stores data in MS Access. Is there any way with which i can create a connection string based on Oledb driver version present in PC?

Member Avatar
Member Avatar
+0 forum 1

Is it possible to implement theme of Microsoft Office in my windows application. I mean when anyone changes theme of Microsoft Office it should also make change the theme of my windows application. If its possible, let me know how to do that?

Member Avatar
Member Avatar
+0 forum 2

The End.