2,157 Posted Topics
Re: It's a bad idea to develop IE plugins with managed code. The reason has to do with versioning in the .NET framework and possible conflicts with other code, plugins, or even the application itself. Microsoft has a [URL="http://social.msdn.microsoft.com/forums/en-US/ieextensiondevelopment/threads/"]forum[/URL] for IE add-on development | |
Re: You'll have to copy the DLL that your tool project created to the new machine. | |
Re: You need to reread the requirements. Just looking at the first method you didn't implement what they asked. It should have two out parameters only, it doesn't do error checking. You've provided one out parameter and some other parameter that it didn't ask for. You only get one value in … | |
Re: [code]Form2 frm2 = new Form2(); this.Hide(); frm2.Show(); [/code] | |
Re: [code]switch (Comblist.SelectedItem.ToString()) { case "One" : case "Two" : case "Five" : DoSomeMethod(); break; case "Three" : DoSecondMethod(); break; default: DoLastMethod(); break; }[/code] | |
Re: [code]List<String> mySecondList = new List<String>(); List<String> myThirdList = new List<String>(); foreach (String s in myFirstList) { int i = s.LastIndexOf(' '); if (i >= 0) { mySecondList.Add(s.Substring(0, i)); myThirdList.Add(s.Substring(i+1)); } else { mySecondList.Add(s); myThirdList.Add(String.Empty); } }[/code] | |
Re: What do you mean by "show it"? Classes aren't things you 'show'. They have methods and properties that you get, set or call. | |
Re: Take a look at [URL="http://www.codeproject.com/KB/cs/SendKeys.aspx"]this[/URL] | |
Re: Are you sure it's a memory leak? Does the usage go down once your code is done running? Are you using unmanaged resources without Disposing of them? Feel free to post code since there is no other way for us to tell you why you are leaking memory (if you … | |
Re: [code]private void topbutton_Click(object sender, EventArgs e) { int ItemIndexOfItemToMove = postProcesslistBox.SelectedIndex; if (this.postProcesslistBox.SelectedIndex != 0) { for (int i = ItemIndexOfItemToMove; i != 0; i--) { object o = myListBox1.Items[i]; myListBox1.Items.RemoveAt(i); myListBox1.Items.Insert(i-1, o); } } }[/code] This code will move the selected item to the top. You can do it … | |
Re: Not going to do your class assignment for you. It's not fair to you or to me. | |
Re: Attach an event to the WebBrowser.Navigating event: [code]private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { e.Cancel = true; // prevents this webbrowser from changing page webBrowser2.Navigate(e.Url); // makes the 2nd webbrowser navigate to the link }[/code] | |
Re: Make sure you copied the ribbon project to the new machine. If you have, try dropping it from the project and re-add it. | |
| |
Re: What is line 35 trying to do? Why not [icode]dic[j] += intValue[/icode]? | |
Re: Setting the name property at runtime doesn't affect the running code. It might affect reflection of the assembly, but I don't know why you would want to do that in the first place. Doing it in the designer just renames the control. | |
Re: The first line of your program is probably [icode]static void Main(string[] args)[/icode]. args contains the command line arguments. | |
Re: Do you have references to the threads? If so, call Thread.Abort() on them. If not before you start the thread set it as a background thread (Thread.IsBackground = true). Background threads cannot prevent the main thread from closing (like your forground threads are doing). | |
Re: What do you mean by "to 2 decimal"? Do you have two values? What exactly do you want to convert from double to decimal? | |
Re: It's the other way around. A single exe links a bunch of DLLs. | |
Re: Works fine here, data goes in, data comes out, looks ok. | |
Re: Have you verified that the SPTimer_Tick is firing at a constant rate? Have you checked if there is something in Serial_Data each time it fires but that there is no '\r' character in it? This might also be the problem (from the documentation): The DataReceived event is not guaranteed to … | |
Re: [code]StatusListBox.SelectedIndex = StatusListBox.Items.Count - 1[/code] | |
![]() | Re: [QUOTE=geekman92;1528058]how does c# do something.Size.X ?[/QUOTE] [code]class MyClass { public Size Size {get; set;} } class Size { public int X {get; set;} public int Y {get; set;} }[/code] ![]() |
Re: What does the tooltip window say when you point the mouse cursor at one of the red squigglie lines? | |
Re: Since Access is a file based database (rather than a service based, like Oracle or SQL Server) your code needs direct access to the file. It needs to be on the same machine or a network share. As for [url]http://www.dofactory.com/Connect/Connect.aspx[/url], that site hasn't updated the Access connection strings in 4 … | |
Re: To expand on that, [B]this[/B] refers to the current instance of the enclosing class. In your code example it would refer to the instance of MyTestButton that would be executing that code. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx"]SoundPlayer[/URL] will play wav files for you. Is this what you want? | |
Re: This question has been asked by a lot of other people in Malayasia. Are you all in the same class? Why don't you post the real problem you are trying to solve so we can suggest a better way to solve it. 4 | |
Re: you can consider a variable to be a box. This box holds a value. An array is a collection of boxes. | |
Re: [code]for (int i = 0; i < 10000000; i++) { Font f = new Font(label1.Font.Name, 8, label1.Font.Style, label1.Font.Unit); }[/code] Fonts need to be disposed of when you aren't using them as they consume unmanaged resources. This should provide a small but growing memory leak. Code assumes you have a label … | |
Re: It's in the header section of the page, something like <title>SQL Server 2008 Connection String Samples - ConnectionStrings.com</title> Having only played with the webbrowser control, I'm not sure how you'd get that. Ah, there it is, in the HtmlDocument.Title property (which you get through the WebBrowser.Document property). So something like … | |
Re: I really wish you'd use meaningful variable names. sortList# doesn't tell us anything about what it actually is. I'm guessing that sortList2 is actually a Dictionary and that the parts before the : are the key, after the : is the value. Do these keys actually have the () around … | |
Re: Check out the book [URL="http://www.amazon.com/Software-Project-Survival-Guide-ebook/dp/B0043M58VW/ref=sr_1_8?ie=UTF8&qid=1302120282&sr=8-8"]Software Project Survival Guide[/URL]. It has examples and templates for everything you need. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/bb399420.aspx"]How to: Dynamically Create a Database (LINQ to SQL)[/URL] | |
Re: [QUOTE=Pritz;1527527]I’ve heard that Java should be language and that to get the solutions the program should run simulations.[/QUOTE] Java could be a way to go, or Flash, or Silverlight, or HTML5. Depends on how compatible and future thinking you wish to go. As for solutions, it depends on the problem. … | |
Re: [code] int[] id1 = { 44, 26, 92, 30, 71, 38 }; int[] id2 = { 39, 59, 83, 47, 26, 4, 30 }; IEnumerable<int> both = id1.Intersect(id2); foreach (int id in both) { Console.WriteLine(id); }[/code] | |
Re: First, why are you using an OleDBConnection to connect to Sql Server? Use SqlConnection for better performance and features. Second, your call to GetSchema is requesting something odd, you just need to say SqlConnection.GetSchema() | |
Re: Yes, you can do that. Somewhere you open the search form, and then you open the results form. Can you post those code areas? | |
Re: [QUOTE=Narue;1526235][B]Some[/B] Policies help to avoid utter chaos. Feel free to fluff that up into a paragraph, but that's the core of it.[/QUOTE] There, fixed it for you :) | |
Re: How can you tell how many items should be grouped together? | |
Re: This is an extension method that will allow you to update controls on different threads: [CODE]private delegate void SetPropertyDelegate<TResult>(Control @this, Expression<Func<TResult>> property, TResult value); public static void SetProperty<TResult>(this Control @this, Expression<Func<TResult>> property, TResult value) { var propertyInfo = (property.Body as MemberExpression).Member as PropertyInfo; if (propertyInfo == null || !@this.GetType().IsSubclassOf(propertyInfo.ReflectedType) || … | |
Re: DLLImport is for DLLs that are not created for managed code (C#, F#, C++ managed, etc.) What it sounds like you want to do is to create a plug-in type system. These can be very complicated to do as there are many things to consider (that I'm not going into … | |
Re: You can't do it with the normal listbox as it doesn't have a scroll event. So you need to create your own listbox:[code]using System.Windows.Forms; namespace WindowsFormsApplication1 { public class MyListBox : ListBox { public delegate void ScrollEventHandler(Message m); public event ScrollEventHandler Scroll; protected override void WndProc(ref Message m) { if … | |
Re: What's the query and can't you just get the month name in C# if you need to? | |
Re: Click on Project, select the bottom item <Your project name> Properties. Click on the Build tab. Click on the XML Documentation file checkbox. | |
Re: Knvn's code contains an error that makes the result only tell you if the last item is in the list, not if all the items are in the list. You don't need to clear the array, it's replaced each time through the loop (the old one is effectively deleted). It's … | |
Re: Panels don't gain focus (they have no focus events). So what you need is to add handlers to the Enter and Leave events.[code]private void panel1_Enter(object sender, EventArgs e) { Panel p = (Panel)sender; p.BackColor = Color.Red; } private void panel1_Leave(object sender, EventArgs e) { Panel p = (Panel)sender; p.BackColor = … | |
Re: Just do it, Visual Studio will pick it up. |
The End.