Vickyjzhang's Q&A profile
Windows Forms UserControl as Container
Hi all, Just a quick question and I am sure there is a simple solution but I just haven't found it yet. I know how to make my UserControl a container by using ParentControlDesigner etc. This works fine and I can drag and drop Windows Forms Controls at design time. However, if I add a Panel to my UserControl Class, compile it and then try to drag and drop another control on the Panel, the Panel does not act as a container. So my question is: If I have a UserControl which consist of a single Panel, which is a pretty lame control I know, how can you get the Panel to act as a container at design time Any help in this would be greatly appreciated. Kind Regards AM PS. The UserControl that I have written does not consist of a ...Show All
.NET Development [[ Strong name validation failed for assembly ]]
First of all, I am sorry for posting this two times. I have posted this in MSDN Forums Visual C# Visual C# General but it seems that no body is interested in this subject or i have posted in the wrong forum. I have used ExeShield to protect my application. ( http://www.exeshield.com/ ) - There is no problem when i try to protect Application writen in C# .NET 1.1 - But when i try to protect Application writen in C# .NET 2.0 i get this error Strong name validation failed for assembly 'c:\lab\xshld875.tmp'. The file may have been tampered with or it was partially signed but not fully signed with the correct private key. Any help on how to disable the Strong Name Validation Kind Regards ...Show All
Visual Studio Express Editions 1 If Statment to run only?
Here is the code i made: Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "Summit" Then Button2.Text = "Reset" End If If Button2.Text = "Reset" Then Button2.Text = "Summit" End If End Sub the problem with that is that once you click summit it makes the button say reset then the second if makes it back to summit when i want it to stay on reset please help me, i dont know any other commands that would fix this... Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "Summit" Then B ...Show All
Visual Basic ComboBox Frustration: Setting a default "SelectedIndex" when adding a new record refuses to work.
Help! This is a very frustrating problem. Ok I have a typical databound Form with a bound ComboBox bound on the form Load event. I have a typical BindingSource and BindingNavigator Control with an "AddNew" button. When a new record is added to the dataentry form (i.e. not the combobox) I intend the combobox to default to the first value in the list by setting... mycombo.selectedindex = 0 I have this in the BindingNavigatorAddNewItem_Click event but it has no effect! I also tried placing mycombo.selectedindex = 0 in the BindingSource "AddingNew" event but this also has no effect. I have discovered that the "selectedindex" is somehow inexplicably changing itself back to -1 As an experime ...Show All
Windows Forms Which innermost child control has focus ?
I have form which in turn has various child controls. The child controls in turn have child control and so on. Is there a direct way to find which of the iinermost child control has focus Try this: public static Control FindControlWithFocus(Control parent) { if (parent.Focused) return parent; foreach (Control ctl in parent.Controls) { if (ctl.Focused) return ctl; Control child = FindControlWithFocus(ctl); if (child != null) return child; } return null; } private void toolStripButton1_Click(object sender, EventArgs e) { Console.WriteLine(FindControlWithFocus(this.ActiveControl).Name); } ...Show All
Visual FoxPro converting xml to foxpro table
Hi, I own an insurance and investment company and just play around with some foxpro applications for my business. I have developed several helpful database programs for such things as tracking insurance quote requests that come in, etc. in VFP ver 5.0. I just purchased VFP 9.0. I am pretty much clueless as to what xml does or how it works (i don't even know what it stands for); however, I am now in need of being able to suck data that is currently in xml format into a vfp database and vice versa. I tried playing around with the smltocursor and related commands, but they are way over my head. Is there a simple program code someone has that will just convert this for me Or is there one of you folks out there that I could hire for a small ...Show All
Windows Forms Custom Collection Editor - how to block the up and down buttons ?
I have a Custom Collection Editor and overridden some methods - everything works fine... BUT I now want to block the up and down buttons, so the User won't be able to move the Collection Items within the Index. Is there any possibilty by overriding a method so it won't move the collection items To make it clear - I do not want to remove the buttons or make them invisible, I just want to block the functionality. Thank you in advance, Robert. ...Show All
.NET Development How to send a SMS message programatically from a desktop app using C#?
Thanks. Best regards, chance. why pay for another device (which would be pricey) when you could purchase an online webservice for much much less than that :-) will try to post links of these services once I find them ...Show All
Visual Studio Source code re-ordering?
Hi, Does anyone know of a VS plugin (or standalone application for that matter) that will allow me to re-order source files Ideally (!) it would be nice to be able to analyze a given file, then reorder the source such that properties are listed first (order by access, then alphabetically), then methods (again, by access first then alphabetically) and so on (or by some other consistant approach) I think the editor itself does a great job of maintaing coding standards such as indentation etc, but being able to pretty up source files in this (or similar manner) with regards to program blocks would be really useful for those inherited messy sources (mine are all fine, honest!) Regards Hi Peter, ...Show All
Smart Device Development selectedIndexChanged fires 3 times unnecessarily
I have a Smart Device Application project and using VB.NET. in my project I have a form with two combo boxes I have some code in the selectedIndexChanged of a combo box ( cboCategories ). The code will take the value from the combo box ( cboCategories ) and then filters another combo box ( cboProducts ) When I run the form on the Pocket Pc Emulator, selectedIndexChanged of the combo box ( cboCategories ) fires 3 times!!! How can I stop this Or is there any alternative methods/events that I can use for this purpose See my code below Private Sub cboCategories_SelectedIndexChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboCategories.SelectedIndexChanged ...Show All
Commerce Server Any way to make the CS 2007 help portable?
This is kind of off topic, but hopefully one of you legends will have a great solution. Is there any easy way to copy the Commerce Server help onto another PC This used to be easy as it was a single CHM file. However, the help system has changed again and this no longer seems possible. I can't just install the Help as the install will not run without pre-reqs. I want to do this do I can do design work on another PC that does not have CS on. I know the docs are online, but it is not a great experience... I asked this early on and I believe the docs team (the group of folks that keep the CS2007 on-line and Visual Studio docs up to date) decided that keeping the on line docs and Visual Studio docs current w ...Show All
Windows Forms Getting error "You do not have privileges to run this application"
I have a Windows Forms application I wrote last year in VS .NET 2003, which I've upgraded to VS .NET 2005 today. It includes Crystal Reports 11 Release 2, and I've made a setup for it. I've just tested it by installing it on a new PC, and I'm getting an error that says simply, "You do not have privileges to run this application". I've searched for this error using both Live.com and Google, and really haven't found anything useful (both search engines yield just one website that lists this error message - interestingly enough it is not the same website). I am hard pressed to figure out why the network administrator account, which is what I used to install the app and test running it with, does not have privileges in order to run i ...Show All
Windows Forms StartupNextInstance and ClickOnce
I'm trying to use the StartupNextInstance event to get the values passed to the My.Application.Deployment.ActivationUri.AbsoluteUri of a clickonce application when it is started again. If this were a standard application I could obtain the startup parameters from e.Commandline , but this is empty when the application is launched via clickonce . Is it possible to get the startup URI of the second instance from the StartupNextInstance event I could not find a bug reference so I filed one. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=271991 Please vote for this bug if you are experiencing this issue. ...Show All
SQL Server Running Totals
We are trying to create a report that shows a Week to Date, Month to Date, and Year to Date Week to Date Month to Date Year to Date Item Number I've tried using an if statement (if date = current week, Qty, 0) and then sum the data but I get an error message that reportitems can only be summed in the page header and footer. I've also tried running totals, but it doesn't like the iif statement. Any ideas on how to do this Nancy NCL, Okay we have a partial answer, On the this statement: RunningValue(iif(Fields!Period.Value=Sum(Fields!CurrentPeriod.Value, "Current"),Sum(Fields!Ordered.Value),0),sum, Group3) you have to remove the "SUM" values becaus ...Show All
SQL Server Compatibility level
Having moved over to SQL 2k5, from SQL 7.0 we have now realised that the database's need to be set to comp level 9.0 before they are found in the maintence plan wizard, we currently still access the database using an Access 2000 front end, by changing the comp level will this cause us issues writing data, I'm sure it won't but want to make sure, I'm sure that the comp level just sets what options are available to use. Thanks ...Show All
