2,157 Posted Topics

Member Avatar for emarshah

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

Member Avatar for Momerath
0
129
Member Avatar for missc

You'll have to copy the DLL that your tool project created to the new machine.

Member Avatar for missc
0
105
Member Avatar for JudeV

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 …

Member Avatar for Momerath
0
85
Member Avatar for eoop.org
Member Avatar for Behseini

[code]switch (Comblist.SelectedItem.ToString()) { case "One" : case "Two" : case "Five" : DoSomeMethod(); break; case "Three" : DoSecondMethod(); break; default: DoLastMethod(); break; }[/code]

Member Avatar for Behseini
0
409
Member Avatar for ashley11

[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]

Member Avatar for Momerath
0
74
Member Avatar for eoop.org

What do you mean by "show it"? Classes aren't things you 'show'. They have methods and properties that you get, set or call.

Member Avatar for divin757
0
167
Member Avatar for manugm_1987
Member Avatar for Momerath
0
123
Member Avatar for HookDevil

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 …

Member Avatar for HookDevil
0
297
Member Avatar for Tazsweet19

[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 …

Member Avatar for Momerath
0
119
Member Avatar for gogs85

Not going to do your class assignment for you. It's not fair to you or to me.

Member Avatar for gogs85
0
674
Member Avatar for CrazyMisho

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]

Member Avatar for Momerath
0
97
Member Avatar for xanawa

Make sure you copied the ribbon project to the new machine. If you have, try dropping it from the project and re-add it.

Member Avatar for xanawa
0
83
Member Avatar for JhonMoney
Member Avatar for jingda
-3
122
Member Avatar for Mark_48

What is line 35 trying to do? Why not [icode]dic[j] += intValue[/icode]?

Member Avatar for Mitja Bonca
0
159
Member Avatar for salmap

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.

Member Avatar for abelLazm
0
234
Member Avatar for mohana88

The first line of your program is probably [icode]static void Main(string[] args)[/icode]. args contains the command line arguments.

Member Avatar for mohana88
0
586
Member Avatar for WildBamaBoy

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).

Member Avatar for WildBamaBoy
0
4K
Member Avatar for leo88

What do you mean by "to 2 decimal"? Do you have two values? What exactly do you want to convert from double to decimal?

Member Avatar for Momerath
0
214
Member Avatar for CrazyProgrammer
Member Avatar for Momerath
0
169
Member Avatar for caltech
Member Avatar for VernonDozier
-7
249
Member Avatar for C#ENTHU

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 …

Member Avatar for C#ENTHU
0
309
Member Avatar for WDrago
Member Avatar for WDrago
0
213
Member Avatar for geekman92

[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]

Member Avatar for geekman92
0
154
Member Avatar for complete

What does the tooltip window say when you point the mouse cursor at one of the red squigglie lines?

Member Avatar for Momerath
0
187
Member Avatar for ajinkya112

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 …

Member Avatar for Momerath
0
154
Member Avatar for Mark_48
Member Avatar for newtoc#

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.

Member Avatar for Momerath
0
141
Member Avatar for apanimesh061

[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?

Member Avatar for Saikalyankumar
0
261
Member Avatar for leo88

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

Member Avatar for Saikalyankumar
0
111
Member Avatar for yhanne

you can consider a variable to be a box. This box holds a value. An array is a collection of boxes.

Member Avatar for aravind326
0
100
Member Avatar for manugm_1987

[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 …

Member Avatar for Momerath
0
189
Member Avatar for lxXTaCoXxl

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 …

Member Avatar for Momerath
0
103
Member Avatar for ashley11

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 …

Member Avatar for ashley11
0
123
Member Avatar for wolfrain63

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.

Member Avatar for rubberman
0
97
Member Avatar for yashodhan05
Re: Linq

[URL="http://msdn.microsoft.com/en-us/library/bb399420.aspx"]How to: Dynamically Create a Database (LINQ to SQL)[/URL]

Member Avatar for Momerath
0
32
Member Avatar for Pritz

[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. …

Member Avatar for Momerath
0
236
Member Avatar for rose2020

[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]

Member Avatar for ddanbe
0
84
Member Avatar for Behseini

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()

Member Avatar for Behseini
0
178
Member Avatar for jay_el_em

Yes, you can do that. Somewhere you open the search form, and then you open the results form. Can you post those code areas?

Member Avatar for jay_el_em
0
167
Member Avatar for d4nn7

[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 :)

Member Avatar for jwenting
0
131
Member Avatar for Kath_Fish
Member Avatar for toadzky

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) || …

Member Avatar for toadzky
0
240
Member Avatar for lxXTaCoXxl

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 …

Member Avatar for lxXTaCoXxl
0
420
Member Avatar for Nevillelajru

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 …

Member Avatar for Nevillelajru
0
165
Member Avatar for jlivvers
Member Avatar for arsheena.alam

Click on Project, select the bottom item <Your project name> Properties. Click on the Build tab. Click on the XML Documentation file checkbox.

Member Avatar for arsheena.alam
0
191
Member Avatar for leo88

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 …

Member Avatar for leo88
0
338
Member Avatar for RogerInHawaii

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 = …

Member Avatar for Momerath
0
150
Member Avatar for MARKAND911

The End.