windows-forms-forums,windows-forms-generalRelated issues-Collection of common programming errors
msdn
windows-forms-forums windows-forms-general
I am creating a delete button for a project I am working on, but when I try to delete the selected value from a database it gives me an error of index out of range. And the value return is -1.The code below is what I am working on:private void btnDeleteBook_Click(object sender, EventArgs e) { string sql; if (lstBooks.SelectedIndex == -1) { ShowMessage(“
msdn
windows-forms-forums windows-forms-general
Requirement: 1. Open an Excel 2007 file ( .xlxs)2. Find out all the pivot tables in the workbook.3. Set parameters to the pivot tables(i.e. Change the filter values for these Pivot tables)Whats done:1. I created a windows application2. Addded Microsoft Excel 12.0 Object Library and Microsoft Office 12.0 Object Library. 3. Now I try to create a new excel object.4. Map it to the excel file i want .Microsoft.Office.Interop.Excel.Application objExcel;Microsoft.Office.Interop.Excel.Workbook objWrk;Ob
msdn
windows-forms-forums clickonce-and-setup-amp-deployment-projects
Hi,We have a clickonce deployment for our WPF application but some of our clients can’t seem to download the application.Comparable caseClient 1: Direct internet connection, desktops have Win XP with IE 7, laptops have Vista with IE 7. No issues downloading or running the application.Client 2: Direct internet connection, laptop with Win XP with IE 7. Cannot download the application.Client 1 is in the U.S. Client 2 is in Singapore (can’t see why that should make a difference but I offer the info
msdn
windows-forms-forums windows-forms-general
Hii All,My application information:Windows Forms Application.Net Framework 2.0 Visual Basic 2008I have thenext problem:I was using Windows XP and my application was running successfully, then I installed Windows 7 and when I run my application I got error and the exe file doesn’t work,when I read the error string I found the problem in generating the application resources, so I went to the error line and it was in the next property in the underlined line:FriendReadOnly Property AC()As Syste
msdn
windows-forms-forums clickonce-and-setup-amp-deployment-projects
I am attempting to install an msi on an amazon EC2 machine, my older msi works and I did not change anything with any app configuration, just the content of a few pages. IIS is installed and compatibility is enabled for iis 6. Below is the verbose errorlog. It apears to be msi error 1615 which is earlier in the log, but at the end, i also get errors 1708 and 1709 but I am unsure of how to get around this issue. Thanks for your help. Here is the end of the log === Logging stopped:
msdn
windows-forms-forums clickonce-and-setup-amp-deployment-projects
I am building a deployment package on Windows 2003 and deploying it to another Windows 2003 box. In the log file, the first major error appears to be:”DEBUG: Error 2769: Custom Action WEBCA_GatherWebSites did not close 2 MSIHANDLEs.The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: WEBCA_GatherWebSites, 2, “The verbose log file is as follows:=== Verbose logging started: 2
msdn
windows-forms-forums windows-forms-general
Hi all,I am developing an applicationaccording to user requirment i want fix the form positionfor doing that i write the following code private void Form1_Move(object sender, EventArgs e) { this.Location = new Point(100, 100); &nb
msdn
windows-forms-forums windows-forms-designer
I moved the Type Abc.Def.Core.BaseControl from Assembly Abc.Def.Core.dll to Abc.Def.Interface.BaseControl in Assembly Abc.Def.Interface.dll. Now inside the same solution there are other projects where I have some UserControls that derive from BaseControl. After the move the designer can’t load any of them. I get the following errormessage:Could not load type ‘Abc.Def.Core.SomeObject’ from assembly ‘Abc.Def.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’. at Abc.Def.Interface.BaseCon
msdn
windows-forms-forums windows-forms-sample-applications
Hi, I am having some problems in Windows 8 with one of my .NET applications. The problem is that this application launch an old/legacy application(VB6 application) that connects to an database, reads the patch level of the database and return it to the.NET application via exit/return code, the .NET application read it and decide what to do in base of its value. This proccess was implemented a lot of years ago and it has been working succesfully up to now in all the operating sys
msdn
windows-forms-forums windows-forms-general
I’m having some difficulty with the Enter and Leave events of a data entry UserControl (UCDE) that a navigation UserControl (UCNav) instantiates using Reflection and then Selects. In particular, I’m perplexed by the firing of UCDE’s Enter AND Leave events following the Select.UCNav contains a list of the names of other UCs, including UCDE. UCNav is displayed in Panel1 of a SplitContainer and UCDE (and the other UCs when selected) are displayed in Panel2.When I click on the name of UCD
msdn
windows-forms-forums windows-forms-general
I am creating a delete button for a project I am working on, but when I try to delete the selected value from a database it gives me an error of index out of range. And the value return is -1.The code below is what I am working on:private void btnDeleteBook_Click(object sender, EventArgs e) { string sql; if (lstBooks.SelectedIndex == -1) { ShowMessage(“
msdn
windows-forms-forums windows-forms-general
Requirement: 1. Open an Excel 2007 file ( .xlxs)2. Find out all the pivot tables in the workbook.3. Set parameters to the pivot tables(i.e. Change the filter values for these Pivot tables)Whats done:1. I created a windows application2. Addded Microsoft Excel 12.0 Object Library and Microsoft Office 12.0 Object Library. 3. Now I try to create a new excel object.4. Map it to the excel file i want .Microsoft.Office.Interop.Excel.Application objExcel;Microsoft.Office.Interop.Excel.Workbook objWrk;Ob
msdn
windows-forms-forums windows-forms-general
Hii All,My application information:Windows Forms Application.Net Framework 2.0 Visual Basic 2008I have thenext problem:I was using Windows XP and my application was running successfully, then I installed Windows 7 and when I run my application I got error and the exe file doesn’t work,when I read the error string I found the problem in generating the application resources, so I went to the error line and it was in the next property in the underlined line:FriendReadOnly Property AC()As Syste
msdn
windows-forms-forums windows-forms-general
Hi all,I am developing an applicationaccording to user requirment i want fix the form positionfor doing that i write the following code private void Form1_Move(object sender, EventArgs e) { this.Location = new Point(100, 100); &nb
msdn
windows-forms-forums windows-forms-general
I’m having some difficulty with the Enter and Leave events of a data entry UserControl (UCDE) that a navigation UserControl (UCNav) instantiates using Reflection and then Selects. In particular, I’m perplexed by the firing of UCDE’s Enter AND Leave events following the Select.UCNav contains a list of the names of other UCs, including UCDE. UCNav is displayed in Panel1 of a SplitContainer and UCDE (and the other UCs when selected) are displayed in Panel2.When I click on the name of UCD
msdn
windows-forms-forums windows-forms-general
Does anyone know how to fix the DateSelected event for the monthcalendar. I created a custom datetimepicker utilizing the monthcalendar control. When a user is clicking the arrows going from month to month and accidentally clicks the header, the DateSelected event fires.Thanks
msdn
windows-forms-forums windows-forms-general
Yesterday I coded a class derived from a Form, with an overriden ToString() method returning the title I wanted it to have in a ListBox. Elements were added to the ListBox, as was visible in the Visual Studio debugger, and by clicking to highlight blank lines of the ListBox.Today, I found that I could make the titles appear if instead oflist.Items.Add(form); I used list.Items.Add(new a(form));Where a is defined as:Code Snippetnamespace ns{ class a { public object b; public a
msdn
windows-forms-forums windows-forms-general
HiWhen I use the RichTextBox.Select(int start, int length) function to select text in a rich text box that contains hyperlinks, there is some shift in the selection when I try to select any text that is after the hyperlink.When I remove the hyperlink, the selection works properly.I use RichTextBox 5 public class RichText50W : RichTextBox{ [DllImport(“kernel32.dll”, CharSet = CharSet.Auto)] static extern IntPtr LoadLibrary(string lpFileName); protected override CreateParams Cre
msdn
windows-forms-forums windows-forms-general
I’m having an issue with an app where my NotifyIcon displays an extra icon. The steps to reproduce it are easy, but the problem is that the extra icon shows up after any of the actual codebehind we’ve added fires. Put simply, clicking a button triggers executionof method FooBar() which runs all the way through fine but its primary duty is to fire a backgroundworker to log into another of our apps. It only appears if this particular button is clicked.Strangely enough, we have a WndProc method ove
msdn
windows-forms-forums windows-forms-general
Hi,I have two windows media activeX components on a windows form, accessing the same media file so that I can play it synchronously without the use of a media server. The media file restarts at the end so that it continuously plays. The application works perfectlyand keeps in sync. However, after many hours of running in the IDE enviroment I have seen an occurrence of the the following:”ContextSwitchDeadlock was detected Message: The CLR has been unable to transition from COM context 0x2063
Web site is in building