Visual C# Express Edition ForumQuestions about Visual C# Express Edition and getting started with C#.© 2009 Microsoft Corporation. All rights reserved.Sun, 29 Nov 2009 14:00:46 Z3738fd76-4981-4830-bafa-cd04a2898dd8http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/4b2c9202-a5db-42ce-875b-a05710daf497http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/4b2c9202-a5db-42ce-875b-a05710daf497Bliznahttp://social.msdn.microsoft.com/Profile/en-US/?user=BliznaEmbed manifest - any working way?Hi,<br/>I have spent hours with trying to embed manifest files in order to distribute only appname.exe (I have made config file embedded too). I have already tried to add new manifest to resources, set it to Embedded resource and in Application properties set Manifest to that one. I have also tried to use option &quot;Embed manifest with default setting&quot;..But when published, there are always 2 manifest files. Please could you tell me how to let it be really embedded? Thank youSun, 29 Nov 2009 14:00:46 Z2009-11-29T14:00:46Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/8286bbf3-a1fc-4fef-a5b4-3f3562b5bf44http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/8286bbf3-a1fc-4fef-a5b4-3f3562b5bf44Bliznahttp://social.msdn.microsoft.com/Profile/en-US/?user=BliznaEmbededd icon still copies into publish dir..how to get rid of it?Hi,<br/>Using file browser I have added an icon to forms in my application. I have set its properties to &quot;Embedded resource&quot;.  In the project&gt;application I have chosen that file from the list. So it should point to that file. It does have &quot;Do not copy&quot; selected. However when I publish the app this file is always in the output directory and I do not know why. When deleted, icons are still OK. Any ideas?<br/>Thank you!Sun, 29 Nov 2009 09:24:44 Z2009-11-29T09:24:44Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/fa0b17d6-f883-4520-80cc-c28184ea8b5ehttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/fa0b17d6-f883-4520-80cc-c28184ea8b5ekjpellhttp://social.msdn.microsoft.com/Profile/en-US/?user=kjpellCan you use a where clause on a table in a dataset?I'm trying to get the [ID] field after a user chooses a [last_Name] from a combobox. I assign the user selection to the choice1 variable. The following code gives me a Syntax error: Missing operand after 'WHERE' operator.<br/> <br/>            returnedRows = ds1.Tables[&quot;Workers&quot;].Select(&quot; ID WHERE last_Name = '&quot; + choice1 + &quot;'&quot;);<br/> <br/> Can someone help me with the correct way to do this? Thanks in advance.Sun, 29 Nov 2009 04:12:53 Z2009-11-29T04:57:49Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9571c760-fd1b-4ff2-980b-8b8ecc77f590http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9571c760-fd1b-4ff2-980b-8b8ecc77f590wrecking ballhttp://social.msdn.microsoft.com/Profile/en-US/?user=wrecking%20ballHow do you create an executable in Visual Studio?It seems like sometimes it will create one if you build or rebuild and sometimes you actually have to run the application. If you go to publish it creates the setup.exe which is not what I want. I want just a plain old executable.<br/> <br/> <br/> So, how do you do that?Sun, 29 Nov 2009 03:18:58 Z2009-11-29T03:27:16Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/a39695fc-0ed1-4463-8cd1-3a61061e81a4http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/a39695fc-0ed1-4463-8cd1-3a61061e81a4JoeGinleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=JoeGinleyNullReferenceException? Not sure where its occuring...Everytime i load a new page in my browser to block the ads, i get a systemnullreference exception. It gets so far into the code and gives me the exception. I will place a *** next to where i get my exception. I tried to debug but thats all i can get out of it. All help would be appreciated.<br/> <br/> <pre lang="x-c#">public void BlockAds() { HTMLDocument doc = (HTMLDocument)IbrowserManager.CurrentBrowser.Document.DomDocument; string s; foreach (IHTMLImgElement imge in doc.images) { try { s = imge.src; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls)) { Remove(imge as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } foreach (IHTMLEmbedElement embedse in doc.embeds) { try { s = embedse.src; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls)) { Remove(embedse as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } foreach (IHTMLScriptElement scripte in doc.scripts) { try { s = scripte.src; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls))**** { Remove(scripte as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } foreach (IHTMLElement linkse in doc.links) { try { if (linkse is IHTMLLinkElement) { s = (linkse as IHTMLLinkElement).href; foreach (string adurl in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurl)) { Remove(linkse as IHTMLDOMNode); } } } else if (linkse is IHTMLAnchorElement) { s = (linkse as IHTMLAnchorElement).href; foreach (string adurl in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurl)) { Remove(linkse as IHTMLDOMNode); } } } } catch (Exception) { //do nothing } } foreach (IHTMLElement4 dive in doc.getElementsByTagName(&quot;DIV&quot;)) { try { s = dive.getAttributeNode(&quot;class&quot;).nodeValue as string; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls)) { Remove(dive as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } foreach (IHTMLElement2 e in doc.getElementsByTagName(&quot;OBJECT&quot;)) { foreach (IHTMLElement4 c in e.getElementsByTagName(&quot;PARAM&quot;)) { try { if (&quot;Src&quot;.Equals((string)c.getAttributeNode(&quot;NAME&quot;).nodeValue, StringComparison.CurrentCultureIgnoreCase) || &quot;Movie&quot;.Equals((string)c.getAttributeNode(&quot;NAME&quot;).nodeValue, StringComparison.CurrentCultureIgnoreCase)) { foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { s = c.getAttributeNode(&quot;VALUE&quot;).nodeValue as string; if (s.Contains(adurls)) { Remove(c as IHTMLDOMNode); } } } } catch (Exception) { //do nothing } } } foreach (IHTMLElement4 iframee in doc.getElementsByTagName(&quot;IFRAME&quot;)) { try { s = iframee.getAttributeNode(&quot;src&quot;).nodeValue as string; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls)) { Remove(iframee as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } foreach (IHTMLElement4 framee in doc.getElementsByTagName(&quot;FRAME&quot;)) { try { s = framee.getAttributeNode(&quot;src&quot;).nodeValue as string; foreach (string adurls in Properties.Settings.Default.AdBlockURLS) { if (s.Contains(adurls)) { Remove(framee as IHTMLDOMNode); } } } catch (Exception) { //do nothing } } } private void Remove(IHTMLDOMNode n) { try { n.parentNode.removeChild(n); } catch (Exception) { //do nothing } } }</pre><hr class="sig">OMG, its Joe Ginley!Fri, 27 Nov 2009 19:41:45 Z2009-11-28T07:08:48Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3e333def-3e95-48fb-96cd-cbd20c7c763bhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3e333def-3e95-48fb-96cd-cbd20c7c763bkjpellhttp://social.msdn.microsoft.com/Profile/en-US/?user=kjpellHow to change Text box field based on combo box selection?I have tried to figure this out for days. I have searched everywhere I know of and I have gotten close but I just can't quite get this to work so any help from some of the more experienced at this forum would be greatly appreciated!  Here is my problem.<br/> <br/> I have connected a combo box to a dataset with the following code. The combo box will display a list of last names from my &quot;Workers&quot; table.<br/> <br/>             this.comboBox1.DataSource = ds1.Tables[&quot;Workers&quot;];<br/>             this.comboBox1.ValueMember = &quot;last_Name&quot;;<br/> <br/> <br/> I am trying to use the SelectedIndexChanged of the combo box event to fill in some text boxes on the form. Actually, at this point, I am only trying to fill fill in one text box, anything to get me started. The following code works, but as you see, the last name &quot;Kahn&quot; is hard coded in. I need to use a variable though. If I replace string choice1 = &quot;Khan&quot;; with string choice1 = this.comboBox1.Text; it doesn't work. It says the index was outside the bounds of the array. What follows below does work.<br/> <br/>         private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)<br/>         {<br/> <br/>             DataRow[] returnedRows;<br/>             string choice1 = &quot;Khan&quot;;<br/>             returnedRows = ds1.Tables[&quot;Workers&quot;].Select(&quot;last_Name='&quot; + choice1 + &quot;'&quot;);<br/>             DataRow dr1;<br/>             dr1 = returnedRows[0];<br/>             this.textBox1.Text = dr1[&quot;first_Name&quot;].ToString();<br/>         }<br/> <br/> <br/> I'm not sure why I can't use    string choice1 = this.comboBox1.Text   ???<br/> <br/> What I don't understand is that if I use that for the MessageBox it will work.           <br/> <br/> string choice1 = this.comboBox1.Text;<br/> MessageBox.Show(choice1);<br/> <br/> It will work. A message box will pop up with the last name &quot;Kahn.&quot; But if I use the exact code (string choice1 = this.comboBox1.Text;) to get a last name for the text box if won't works.<br/> <br/> I hope I was clear enough. Any help would be appreciated.Sat, 28 Nov 2009 05:28:37 Z2009-11-28T06:52:19Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f34bb660-7633-4d7f-8d97-f9d8c377d0eahttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f34bb660-7633-4d7f-8d97-f9d8c377d0eaBliznahttp://social.msdn.microsoft.com/Profile/en-US/?user=BliznaUsing XMLwriter to build HTML document in memory stream - cannot display in browserHi,<br/>I am trying to create HTML document using XMLwriter in memory stream ms (<span style="font-size:x-small;color:#2b91af"><span style="font-size:x-small;color:#2b91af">XmlWriter</span></span><span style="font-size:x-small"> writer = </span><span><span style="font-size:x-small;color:#2b91af">XmlWriter</span>.Create(ms); I have tried - just for test - to add some elements and then use webrowser.documentstream=ms either with and without calling writer.flush(). But when I display source of the page, there is always nothing except for HTML headers etc. I am also not sure whether I am doing it right - I am just creating elements like &lt;head&gt; etc.<br/>Thanks<br/><br/> <pre lang="x-c#">MemoryStream ms = new MemoryStream(); XmlWriter writer = XmlWriter.Create(ms); writer.WriteDocType(&quot;html&quot;,&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;,&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;,null); writer.WriteComment(&quot;Test&quot;); writer.WriteStartElement(&quot;TEST&quot;); writer.WriteEndElement(); writer.Close(); this.webBrowser1.DocumentStream = ms;</pre> </span>Fri, 27 Nov 2009 09:23:46 Z2009-11-28T00:51:49Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3bf85a26-6193-4862-9b1f-e289cf63ea59http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3bf85a26-6193-4862-9b1f-e289cf63ea59Adrien_http://social.msdn.microsoft.com/Profile/en-US/?user=Adrien_C# tokenizer or substring? (in relation to, C# import)So recently I asked how I would import List.cs into Program.cs and have Search be able to be called, I was told to use public. so everything is fine and dandy but now I want to push it a bit, I am from the world of Java so its very simular and easy for me to grasp.<br/> <br/> I have a file with the format<br/> <br/> Adam (Tab) Calgary (Tab) 21<br/> 21 (tab) Jacob (tab) reddeer<br/> <br/> What i need to do is take that file, and read it in program.cs and have the list&lt;object&gt; search (String name, String city, int age) preformed on it.<br/> <br/> if this makes sense how would I do this?<br/> how does C# use substrings? and would i want to use substrings or tokenizers? (if tokenizers how do I tokenize?)<br/> <br/> the whole point of this is to take the contents of the file, (organize like the List&lt;object&gt;... or not) have the List&lt;object&gt; organize the data and have program.cs display the organized content in a new file (tabs included).<br/> <br/> for further info on the C# import see <a title=me. href="http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3725f3d4-23e2-452f-87ed-48a94a38bf1b" title=me.>me. </a> <br/><hr class="sig">Adrien....What?Fri, 27 Nov 2009 22:17:02 Z2009-11-28T00:00:16Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f7712adb-b73d-4b0f-8e0d-debbaeefb92dhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f7712adb-b73d-4b0f-8e0d-debbaeefb92dSparky1987http://social.msdn.microsoft.com/Profile/en-US/?user=Sparky1987C# Application help???Right what it is for my uni assignment i have to create a program in c# and it starts off with a menu, now in this menu it has 6 options:<span><span><br/> <br/> </span> </span> <ol> <li>Add Hardware </li> <li><span></span> Add Engineer(s)</li> <li><span></span> Add Job</li> <li><span></span> Close Job</li> <li><span><span><span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal"> </span> </span> </span> View Report</li> <li><span><span><span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal"></span> </span> </span> Exit</li> </ol> Now im stuck on 5 of these options and that is how to store mass amount of data, for example if i select 1 it will go to a new screen and ask to make a new id and description then ask if you want to do another and so on<br/> <br/> if i pressed 2 it will ask to make a new id, forename, surname and wage. then again ask if they want to do another<br/> <br/> in 3 it will ask for a new id number for job, then it will ask for an hardware id for the job in question<br/> <br/> so what ive got to find out is how to store the data and how to retrieve it and display it, im sure my tutor said to use arrays but im unsure on how to get this to work<br/> <br/> Ive created everything from the Y/N answers and the menu selection and the console writelines to how i want it displayedFri, 27 Nov 2009 15:42:21 Z2009-11-27T20:32:01Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/e42956d6-82fe-45d6-8139-64218176b3dchttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/e42956d6-82fe-45d6-8139-64218176b3dcfblairmshttp://social.msdn.microsoft.com/Profile/en-US/?user=fblairmsC# educational materialI have experience with Visual FoxPro and Visual Basic.NET and want to learn C#.  What is the recommended route.  My experience with the other languages has included a lot of form design, etc., but little about real use of objects.<br/> <br/> Books I have looked at seem to either very basic or very complicated.<br/> <br/> All advice will be appreciated.<br/> <br/> FredFri, 27 Nov 2009 18:17:24 Z2009-11-27T18:21:29Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3725f3d4-23e2-452f-87ed-48a94a38bf1bhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3725f3d4-23e2-452f-87ed-48a94a38bf1bAdrien_http://social.msdn.microsoft.com/Profile/en-US/?user=Adrien_C# import questionI have two C# file, one is List.cs and the other is program.cs<br/> List.cs is a class file as is (in theory) program.ca<br/> <br/> So What I am wondering is how to call the search function in List.cs into program.cs, on paste bin its ovious what I am trying to do, so see <a href="http://pastebin.com/f5cbe032a">me</a> . <br/> <br/> So would I go:<br/> <br/> c.Search(&quot;Adam&quot;, &quot;Calgary&quot;, 21);<br/> <br/> ???<hr class="sig">Adrien....What?Fri, 27 Nov 2009 17:08:08 Z2009-11-27T17:47:09Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/8ea8ab61-441a-4f9c-a070-dcedd7a4f375http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/8ea8ab61-441a-4f9c-a070-dcedd7a4f375michael hocksteinhttp://social.msdn.microsoft.com/Profile/en-US/?user=michael%20hocksteinHandling Events of Objects Created in Code - Differences From VBSo, I'm moving on from VB to CS. I was very spoiled by the ability to select an object in the left hand drop down of the code editor and see all the events that object had in the right hand drop down. In CS, from the Designer, you can click on an object and access the events from the Properties window. Double click and the event handler ends up in the code editor.<br/><br/>But, what if you create the entire object in code? Have I given up the luxury of seeing all the events associated with that object (you could easily see this with the WithEvents keyword) from some drop down or Property window? Must I look up or know each event a given class exposes and then manually wire in an event handler?<br/><br/>Michael<hr class="sig">MichaelWed, 25 Nov 2009 22:21:43 Z2009-11-27T17:28:11Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f461635c-0efe-4d93-8672-c1353a17897ahttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f461635c-0efe-4d93-8672-c1353a17897aobrienkevhttp://social.msdn.microsoft.com/Profile/en-US/?user=obrienkevIE8 ErrorHi,<br/><br/>I have an application that contains a toolstripmenu link. When clicked the below is called...<br/> <pre lang="x-c#">System.Diagnostics.Process.Start(&quot;http://test/test.application?ID=&quot; + ID + &quot;&amp;Period=&quot; + Period);</pre> However, sometimes IE8 opens up and get the error message... &quot;Internet Explorer Cannot Display the Webpage&quot;. And a 'Diagnose Connection Problems' button appears.<br/>Clicking this button solves the problem. But is there any way to solve this issue? Why does the webpage fail??<br/><br/>Thanks.Fri, 27 Nov 2009 14:59:15 Z2009-11-27T15:11:52Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/948ce9be-20c7-4787-b68b-7e49ed04b568http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/948ce9be-20c7-4787-b68b-7e49ed04b568Naveen Mangtanihttp://social.msdn.microsoft.com/Profile/en-US/?user=Naveen%20MangtaniVisual Studio 2008 Dev Edition - Menus and menu items appear twice or thrice, also cannot modify class files in editor.I had VS2008 Dev Edition with .NET 3.5 SP1 and on top of it I installed Silverlight 3 tools and there after, I see the menu bar listed 3 times in Visual Studio 2008. <br/><br/>Also, I cannot modify class files, somehow it wont let me modify them.<br/><br/>I tried -&gt; import and export settings -&gt; reset to default<br/><br/>That does not resolve the problem.<br/><br/>Does anyone faced this problem and got it resolved?Fri, 27 Nov 2009 12:41:20 Z2009-11-27T12:41:20Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f8c2d0de-958f-4710-b3a0-c09d3b38be21http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f8c2d0de-958f-4710-b3a0-c09d3b38be21DallasStevehttp://social.msdn.microsoft.com/Profile/en-US/?user=DallasSteveHow Do I Change My Express Edition To English?No hablo español.  Actually, I do, but English is my first language and I want to program in an English environment.  Unfortuately I bought a Dell craptop, I mean laptop while travelling in Latin America and neither they nor Microsoft want to help me change the Windows language to English.  They've got my money now so they just don't care.  <br/> <br/> So when I downloaded Visual C# Express I specifically chose the English edition.  And when I opened the environment for the first time the menu was in English so I thought it worked.  But when I click on a menu item everything else is in Spanish because doing it right the first time is not the Microsoft way.  The Microsoft way is get it out the door as quickly as possible and then let the user deal with the bugs.<br/> <br/> Can anyone tell me how to get Visual C# Express converted to English?  And while you're at it I have the same problem with Visual SQL Server Express.  And I've tried changing Windows Vista to English, but again, it can't be done.  It's a Microsoft thing.<br/> <br/> Steve<br/> <br/> <hr class=sig> MCSD VB developer in Dallas, TexasTue, 24 Nov 2009 21:13:01 Z2009-11-27T09:47:55Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3598cd54-dafd-4e96-a567-08e760d05f64http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3598cd54-dafd-4e96-a567-08e760d05f64Adrien_http://social.msdn.microsoft.com/Profile/en-US/?user=Adrien_Edditing Open Source C# DLL's?Twitter has a C# DLL API to which is &quot;open source&quot; and I was wondering how I can bring that dll into Visual studio 2010 and edit the source code.<br/> or can you?<br/> <br/> if not Can some one point me to some open source C# libaries that I can participate in extending?<hr class="sig">Adrien....What?Fri, 27 Nov 2009 04:53:22 Z2009-11-27T09:41:52Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ecaad070-8581-49c0-a866-f7beb873ab03http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ecaad070-8581-49c0-a866-f7beb873ab03JoeGinleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=JoeGinleyAdBlocking in webbrowser control, could use some help?Hello everyone, i am currently working on an adblocker for the webbrowser control in visual studio 2010. I currently do have code here and a block list of patterns and urls, but its not working. I think its because im not getting the elements within classes and divs....any help would be useful. Here is my current code, not finished.<br/> <br/> <pre lang="x-c#">public void BlockAds() { IHTMLDocument2 doc2 = (IHTMLDocument2)IbrowserManager.CurrentBrowser.Document.DomDocument; IHTMLElementCollection imagecollection = doc2.images; IHTMLElementCollection linkscollection = doc2.links; IHTMLElementCollection scriptscollection = doc2.scripts; IHTMLElementCollection formscollection = doc2.forms; IHTMLElementCollection pluginscollection = doc2.plugins; FramesCollection framescollection = doc2.frames; foreach (IHTMLElement ihe in imagecollection) { string ihesource = ihe.getAttribute(&quot;src&quot;).ToString(); string ihehref = ihe.getAttribute(&quot;href&quot;).ToString(); foreach (string adurl in Properties.Settings.Default.AdBlockURLS) { if (ihesource.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } else if (ihehref.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } } } foreach (IHTMLElement ihe in linkscollection) { string ihesource = ihe.getAttribute(&quot;src&quot;).ToString(); string ihehref = ihe.getAttribute(&quot;href&quot;).ToString(); foreach (string adurl in Properties.Settings.Default.AdBlockURLS) { if (ihesource.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } else if (ihehref.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } } } foreach (IHTMLElement ihe in scriptscollection) { string ihesource = ihe.getAttribute(&quot;src&quot;).ToString(); string ihehref = ihe.getAttribute(&quot;href&quot;).ToString(); foreach (string adurl in Properties.Settings.Default.AdBlockURLS) { if (ihesource.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } else if (ihehref.Contains(adurl)) { ihe.setAttribute(&quot;width&quot;, &quot;0&quot;); ihe.setAttribute(&quot;height&quot;, &quot;0&quot;); } } } }</pre><hr class="sig">OMG, its Joe Ginley!Fri, 27 Nov 2009 00:02:17 Z2009-11-27T06:32:02Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3e6fae40-484a-4035-a51d-9a8b5047fb11http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/3e6fae40-484a-4035-a51d-9a8b5047fb11arcanedevicehttp://social.msdn.microsoft.com/Profile/en-US/?user=arcanedeviceFilter a datagrid view using combobox value(s)This is probably already answered but I've been playing for a while and searching with no luck, so hoping to get some help<br/><br/>My form consists of a Datagridview, four Comboboxes and one Button.  The datagridview is populated on loading with data from two Access tables using an inner join which works great.  The comboboxes have a list of the available options for a corresponding column in the datagridview.  My intention is that if the user selects a value from one (or more) combobox, then on Button.Click, the data is filtered to show only the records in the datagridview that correspond with that value in the designated column.  For example, if the ComboEmployees text is 'Mark', then on Button.Click the datagridview is filtered to show only rows where DataGrid1.Column(2)  value is 'Mark'.<br/><br/>I've read a few of the topics here regarding Filter but just can't seem to find the right code that I need to make it work...  This is the last stage of my program and I'm keen to finish it off!<br/>Thu, 26 Nov 2009 23:21:12 Z2009-11-27T05:41:22Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/2a1390d8-7aa2-421b-b26a-d8be834903achttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/2a1390d8-7aa2-421b-b26a-d8be834903acVeton Rushitihttp://social.msdn.microsoft.com/Profile/en-US/?user=Veton%20RushitiWhy my Application doesn't work in other Computer???<p>Hello everyone...</p> <p>I've made a nice application and i want it to work in another Computer but when i try to connect to database i got an error.</p> <p>My application contains database file (mdf file)???</p> <p>To the remote computer i installed .Net Framework 3.5 , but i didn't installed SQL Server 2005???</p> <p>Is there any way to work my application without installing SQL Server ???</p>Thu, 26 Nov 2009 23:43:38 Z2009-11-27T01:06:06Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f38cba1a-3aa6-4b54-8e49-b331073e47dfhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f38cba1a-3aa6-4b54-8e49-b331073e47dfbeginner_85http://social.msdn.microsoft.com/Profile/en-US/?user=beginner_85Query using multiple combo boxesHello,<br/><br/>I am new to Visual Studio 2008 express and am using the C# programming language.  I have a database that I want to set up combo boxes to query the data.  I would like to have it set up that after I make a filter on topicA that in the next combo box, only the options that are a result of the first filter apply.  Example:<br/>Database<br/>Mike May<br/>Devon Hester<br/>Mike Hardy<br/><br/>Combo box A (select first name)<br/>say i select Mike<br/><br/>Combo box B (select last name)<br/>May <br/>Hardy<br/><br/>Hester is not able to be selected based on the first selection being Mike and there is no Mike Hester.  If anyone could show me how to get this I would greatly appreciate it.  I already have the database imported and have one combox working to display all the fist names in the data base.  Just how to link combo box 2 up to the results of combo box 1.  Im sure this involves writing some SQL statements in the table adapters.  Any help would be great.  Thanks !!<br/><br/>DerekWed, 25 Nov 2009 16:26:12 Z2009-11-27T00:34:23Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/4a0444c8-3077-4681-9d61-eb0fd1e33e2chttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/4a0444c8-3077-4681-9d61-eb0fd1e33e2cBliznahttp://social.msdn.microsoft.com/Profile/en-US/?user=BliznaForm.Size.Height does not work - size is not variableHi,<br/>I would like to ask for explanation since I do not understand why I cannot use <span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"> <p> </p> <pre>this.Size.Height=5;</pre> <p> </p> </span></span></span></span><span style="font-size:x-small"><br/><br/>I have read its because this is value type...but it doesnt make any sense to me. Int is also value type and can be modified this way. I would be very thankful for explanation!<br/>Thank you in advance!</span>Thu, 26 Nov 2009 15:54:11 Z2009-11-27T07:19:10Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/27a98772-2dc6-4197-9f75-6cc119d4a88ahttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/27a98772-2dc6-4197-9f75-6cc119d4a88aprincess01http://social.msdn.microsoft.com/Profile/en-US/?user=princess01how to edit a line from a text file using c#<p>Hello all!</p> <p>My records are in a text file format.  I need to update a line from that text file using C#, how do I do that?  I'm new with C# so any suggestion will be greatly appreciated...</p> <p> </p> <p> </p>Tue, 02 May 2006 00:02:37 Z2009-11-26T05:48:05Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/147611ae-f5ab-43df-9e44-c9735e4c217chttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/147611ae-f5ab-43df-9e44-c9735e4c217cMurthihttp://social.msdn.microsoft.com/Profile/en-US/?user=MurthiC#.net Form Close event<p> </p> <p> </p> <p>In VB 6 we have query unload event which is called before form unload event...so by this before closing a form I can chk any criteria...if it satisfies then only It closes the form...else no. So we are restrictly the form close event from occuring</p> <p>---could I know the similar way in C3.net windows form events.</p>Thu, 04 May 2006 10:23:04 Z2009-11-25T23:40:36Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9f6a634d-8b0d-42a1-a0ed-0b59530a34f6http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9f6a634d-8b0d-42a1-a0ed-0b59530a34f6nuuwnhuushttp://social.msdn.microsoft.com/Profile/en-US/?user=nuuwnhuusStatic variables with a for-loop in a class?<span style="font-size:x-small"><span style="font-family:;font-size:x-small"> <p>I have a class in which i have some private labels, i'd like my code as short as possible so i came up with the idea of a for loop. Yet i don't really know how to execute it.</p> </span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><br/></span></span><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small"><br/>How i do it now.. Obviously not handy with tons of labels.<br/><br/>L1 = Lb1;<br/>L2 = Lb2; <br/><br/>I'd like to do it a little bit like this.. <br/>I know it's possible but not really how, any directions are welcome.<br/><br/><span style="color:#0000ff">for</span><span style="font-size:x-small"> (</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">int</span></span><span style="font-size:x-small"> T = 0; T &gt; 14; T++)<br/>{<br/>L(T) = Lb+(T);<br/>}</span></span></span> Tue, 24 Nov 2009 18:46:52 Z2009-11-25T23:38:10Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/6eec9858-1ae2-4b80-9144-2be72a87d8f7http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/6eec9858-1ae2-4b80-9144-2be72a87d8f7RedRose2009http://social.msdn.microsoft.com/Profile/en-US/?user=RedRose2009crawl the pageI need to crawl the web page; download the entire content and get all external/internal websites on it. What would be the best approach to this? Also, do you know of any free web service (or if you have some other idea of how to get this done) that categorizes the pages, for example: gambling, pharmacy etc. ? <div><br/></div> <div>Thanks! </div>Sun, 22 Nov 2009 15:02:52 Z2009-11-27T03:16:13Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f50e89ee-dda3-484b-a4c9-fc4c9a6531f6http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f50e89ee-dda3-484b-a4c9-fc4c9a6531f6DARREN HANSONhttp://social.msdn.microsoft.com/Profile/en-US/?user=DARREN%20HANSONHow do i convert the FileDrop Data into a clicable link?i am trying to create an app that will alow the user to drag a shortcut (.lnk) onto the form then the user will be able to click the new shortcut on the form<br/> <br/> so far i have got the drag and drop working <br/> when i drag a shortcut onto my form i fill a listbox.<br/> <br/> the data looks like this   <strong>C:\Documents and Settings\DARREN JON HANSON\Application Data\Microsoft\Internet Explorer\Quick Launch\Word 2003.lnk</strong> <br/> <br/> <br/> How can i use this data to start &quot;word&quot; (for example)?<br/> <br/> <br/> this is what i tryed but dosent work!<br/> <pre lang="x-c#"> private void button1_Click(object sender, EventArgs e) { //MessageBox.Show(SHORT_CUTS.SelectedItems[0].ToString()); System.Diagnostics.Process.Start(SHORT_CUTS.SelectedItems[0].ToString()); }</pre><hr class="sig">I am very new to programing so please excuse my lack of knowledge.Tue, 24 Nov 2009 18:59:37 Z2009-11-25T17:20:25Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/fbe3e0d2-3885-4f71-a711-888bc343ed53http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/fbe3e0d2-3885-4f71-a711-888bc343ed53Nekoyuushahttp://social.msdn.microsoft.com/Profile/en-US/?user=NekoyuushaProblem accessing object from different class...Okay, I'll try to summarize: (Sorry if my terminology is wrong or something, programming isn't my strongest point. Feel free to correct me.)<br/> <br/> I'm supposed to make a program where you have three buttons: one to create a car, one to edit the information about the car, and one to view information about the car.<br/> As well as three buttons to do the same thing, but for motorcycles.<br/> <br/> I have a few different classes.<br/> <br/> Form1.cs - self explanatory<br/> Form1.Designer.cs - self explanatory<br/> Program.cs - self explanatory<br/> car.cs - This class contains methods for creating, editing and viewing the car.<br/> mc.cs - Same as above, but for motorcycles.<br/> <br/> Now, I can create the car easily, no problem. The problem comes in when I want to edit the car or view its info. Because the instance of the class is created in the button click event method that is triggered when you click the &quot;Create car&quot; button, the instance can't be accessed from the button click event method that is triggered when you click the &quot;Edit car&quot; or &quot;View info&quot; buttons. <br/> <br/> I asked a friend about this, and he told me to create the instance under Required Designer Variables in Form1.Designer.cs instead, so I tried that with the following code:<br/> <br/> <pre> public void createCar() { Car bil = new Car(year, price, reg, brand, extra, color); reset(); } </pre> <br/> (What &quot;reset&quot; does is irrelevant)<br/> <br/> However, that didn't work either.<br/> <br/> Does anyone have any idea how I could solve this?<br/> <br/> Thanks.Wed, 25 Nov 2009 13:31:08 Z2009-11-25T15:42:57Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/d8528366-db8d-4bbd-857b-58c910cbf78fhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/d8528366-db8d-4bbd-857b-58c910cbf78fCountryStylehttp://social.msdn.microsoft.com/Profile/en-US/?user=CountryStylereading a text or xml file that is itself being written via a streamStuck on how to start coding this......not looking for a handout (won't turn one down)....looking for an outline of how to do this/what .net functions to use. <br/> <br/> <br/> Computer 1: writes data in bursts to a text file<br/> <br/> Computer 2: reads this data after each burst of writing done by Computer 1<br/> <br/> Computer 1 will always be writing and Computer 2 will always be reading<br/> Computer 2 cannot re-read the whole text file every time new data comes in.....there would be too much to read.<br/> <br/> thank-you?  please?<br/> <br/> CS :) <br/>Tue, 24 Nov 2009 03:31:56 Z2009-11-25T14:39:26Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/02c0f886-64ed-4341-9382-721f373c7d95http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/02c0f886-64ed-4341-9382-721f373c7d95Skizzohttp://social.msdn.microsoft.com/Profile/en-US/?user=SkizzoDataGridViewCheckBoxColumn, allow only one check in entire columnHi,<br/> <br/> I have a DataGridViewCheckBoxColumn and I am trying not to allow more than one checked boxes in the column. So after one is checked, when user tries to check another one, i want to prevent that and not have more than one checked box in entire column.<br/> <br/> Please help.<br/> <br/> Thanks for you time.<br/> MicheleTue, 24 Nov 2009 23:35:36 Z2009-11-25T09:51:08Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9d8afad2-834a-40e0-aa57-773b2f252e24http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9d8afad2-834a-40e0-aa57-773b2f252e24sh0thttp://social.msdn.microsoft.com/Profile/en-US/?user=sh0tHow to open a URL within the same Form C# program...I've searched high and low for this answer and can't find it. Maybe I've just typed it in wrong but here we go.<br/> <br/> Within a forum I have this:<br/> System.Diagnostics.Process process = new System.Diagnostics.Process();<br/> <br/>             process.StartInfo.UseShellExecute = true;<br/> <br/>             System.Diagnostics.Process.Start(&quot;http://microsoft.com&quot;);<br/> <br/>             process.Start(); <br/> <br/> This opens a new browser window. How can I open that page in the same form program I've made. When the program launches it shows a default url I put in there with the URL option. Now is there a way within that URL option I can have that change to the new page i want opened?Sat, 21 Nov 2009 22:12:47 Z2009-11-27T03:05:43Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f4fb0660-c543-4737-a242-83616a3796b1http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f4fb0660-c543-4737-a242-83616a3796b1Sage2112http://social.msdn.microsoft.com/Profile/en-US/?user=Sage2112SQL Server Data Source and Visual C# Express 2008<font size=2><span style="font-family:Arial">In Visual C# 2008 Express, when I click the &quot;Conect to Database&quot; buton in the &quot;Database Expolorer&quot; window the &quot;Choose Data Source&quot; window pop up but in the <br>&quot;Data Source&quot; selection box I do not see &quot;SQL Server&quot; like I see in Visual Web Developer 2008 Express. All I have is: MS Access DB File, MS SQL Server Compact 3.5, and MS SQL Server DB File.<br><br>How do I add &quot;MS SQL Server&quot; to the Data Source List?</span></font>Fri, 05 Dec 2008 22:37:35 Z2009-11-24T12:10:23Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/85509224-a146-4db7-a1ff-a6333367b435http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/85509224-a146-4db7-a1ff-a6333367b435Dan Rivershttp://social.msdn.microsoft.com/Profile/en-US/?user=Dan%20RiversPanel flickeringHello,<br/><br/>I have a panel inside a panel for scrolling. I added zooming so the interior panel changes size as it zooms. This caused flicker, so I overrode the internal panel's OnPaintBackground (and left it empty) which got rid of the grey flicker.<br/><br/>However, to make the zoom much better I'm changing the view co-ordinates using AutoScrollPosition but clearly it calls a drawing routine as the flicker is back (I can see it the new zoomed image, then the image when the co-ordinates are changed).<br/><br/>I've overridden the onpaint for both controls and set it so if we're zooming it will not do the base.OnPaint(e) - but that hasnt fixed it.<br/><br/>What is being called to update the screen when I'm changing the AutoScrollPosition?<br/><br/>Many, many thanks<br/><br/><br/>ATue, 07 Jul 2009 15:18:13 Z2009-11-24T08:31:32Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ce670ee1-0a29-463d-892a-3b6adba48b35http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ce670ee1-0a29-463d-892a-3b6adba48b35RedRose2009http://social.msdn.microsoft.com/Profile/en-US/?user=RedRose2009calling dllI have to call one project from another. I have a dll file but don't know how to call it (or should I call for .exe file?). Also, this dll needs to get a string input before executing....how do I do this? :/ <div><br/></div> <div>Thanks!</div>Mon, 23 Nov 2009 18:18:35 Z2009-11-24T01:24:24Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ba14f5e1-fb31-44fb-9cc2-f8d59c2d9ba0http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ba14f5e1-fb31-44fb-9cc2-f8d59c2d9ba0RedRose2009http://social.msdn.microsoft.com/Profile/en-US/?user=RedRose2009MySQL with C#<span style="font-family:arial;font-size:small">Lets say I have a table with multiple columns. One of the column has a name CITY. Now when I search for a specific city in this column, I need to know whether it found it or not. I am programming with C# in .NET, and my problem is how do I get back the result (found or not) that I can use with c#? </span>Mon, 23 Nov 2009 11:04:57 Z2009-11-23T16:58:13Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/a61d1370-4ccd-42dd-8462-47d2de98aa43http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/a61d1370-4ccd-42dd-8462-47d2de98aa43DARREN HANSONhttp://social.msdn.microsoft.com/Profile/en-US/?user=DARREN%20HANSONHow do i use the Drag & Drop Event?I have got the enter &amp; over event working<br/> but cannot seam to get the drop event to work.<br/> <br/> this is the code that i have got sofar.<br/> <br/> <pre lang="x-c#">using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace TEST_FileDrop { public partial class Form11 : Form { public Form11() { InitializeComponent(); } private void Form11_DragDrop(object sender, DragEventArgs e) { textBox1.AppendText(&quot;DRAG DROP &quot;); MessageBox.Show(&quot;DRAG DROP&quot;); } private void Form11_DragOver(object sender, DragEventArgs e) { //textBox1.Text = (&quot;DRAG OVER &quot;); //textBox1.AppendText(&quot;DRAG OVER &quot;); //MessageBox.Show(&quot;DRAG OVER&quot;); } private void Form11_DragEnter(object sender, DragEventArgs e) { //textBox1.Text=(&quot;DRAG ENTER &quot;); //textBox1.AppendText(&quot;DRAG ENTER &quot;); //MessageBox.Show(&quot;DRAG ENTER &quot;); } } }</pre><hr class="sig">I am very new to programing so please excuse my lack of knowledge.Sun, 22 Nov 2009 13:41:46 Z2009-11-23T16:36:08Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/af2606d6-3305-41d8-be84-4caee6dd73a8http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/af2606d6-3305-41d8-be84-4caee6dd73a8RedRose2009http://social.msdn.microsoft.com/Profile/en-US/?user=RedRose2009searching for a string through folders and filesI have a folder on my HD, inside that folder there are multiple subfolders with multiple files in each subfolder. Now, user gives me an input to search for a string variable that will match to variable inside these files. What's the easiest way for me to search through all these folders and subfiles? Basically once it enters each file, it needs to check line by line. Once it finds the file, it needs to return the file name and the folder where it found the file that contains matching string. <br/> <br/> Thanks!Mon, 23 Nov 2009 13:15:18 Z2009-11-23T18:01:39Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/962b8048-6a2d-417f-a497-835d3525cb57http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/962b8048-6a2d-417f-a497-835d3525cb57jbm417http://social.msdn.microsoft.com/Profile/en-US/?user=jbm417System Diagnostic StartI have an application that uses:<span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">AddMktDoc</span></span><span style="font-size:x-small"> mktDoc = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">new</span></span><span style="font-size:x-small"> </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">AddMktDoc</span></span><span style="font-size:x-small">();<br/>mktDoc.MyParentForm = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">this</span></span><span style="font-size:x-small">;<br/></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">if</span></span><span style="font-size:x-small"> (mktDoc.ShowDialog() == </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">DialogResult</span></span><span style="font-size:x-small">.OK) { ........... }</span></p> to present a form to the user. Within this form, the user can launch MSWord via <span style="font-size:x-small"><font size=2> <p>System.Diagnostics.</p> </font></span> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">Process</span></span><span style="font-size:x-small">.Start(fullpath);<br/><br/>Word launches fine, but there are 2 problems:<br/><br/>   a) the mktDoc form is closed<br/><br/>   b) focus is now back to the main app -- not Word. <br/>        (Asking the user to click on the task bar to view Word is sure awkward, BUT the big problem is info within mktDoc is lost!<br/><br/>The symtoms are as if launching Word causes a DialogResult of OK<br/><br/>Any thought/comment/help will be much appreciated.   TIA,  Joe</span></p>Sat, 21 Nov 2009 16:07:03 Z2009-11-27T03:01:44Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/e73821af-0630-4f50-b058-af3a52964644http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/e73821af-0630-4f50-b058-af3a52964644sdkeslarhttp://social.msdn.microsoft.com/Profile/en-US/?user=sdkeslardeploying dll created with vc# 2008?I' ve developed a .dll project on vc# 2008 that creates a property page extension for AD Users and Computers. How do I prepare it for installation on a user's machine without needing to install the entire Windows Platform SDK?<br/><br/>....ok... change in the question ... I've been able to install it on Vista, 2008, and 7 ... hos can it be installed on XP?.....<br/><br/>Thu, 19 Nov 2009 18:05:52 Z2009-11-27T07:36:44Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f2314575-fb27-4977-a07a-4bacda8086a6http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/f2314575-fb27-4977-a07a-4bacda8086a6NuNn DaDdYhttp://social.msdn.microsoft.com/Profile/en-US/?user=NuNn%20DaDdYDataGridView Won't Update Changes To Database Unless Row Is Selected When Form_Close Event FiresI have a datagridview control that is populated with data that is being displayed.  The user is able to click on a button to update a field to a new value (i.e. 0 to 1) and when the program is closed.  I fired the DataAdapter.Update command to update the changes made during program execution to the database.  However, it seems that for some reason I have to have a row selected when I exit the application or else the update won't be executed to the database.  I'm not sure why this is as I have ran numerous tests examining this.  The code I have for when a user has a row selected and wishes to flag it is as follows:<br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">if</span> (dg.SelectedRows.Count == 1) { dg.SelectedRows[0].Cells[<span style="color:#a31515">&quot;Flagged&quot;</span>].Value = 1; } <span style="color:blue">else</span> <span style="color:blue">if</span> (dg.SelectedRows.Count &gt; 1) { <span style="color:blue">for</span> (<span style="color:blue">int</span> i=0; i&lt;dg.SelectedRows.Count; i++) { dg.SelectedRows[i].Cells[<span style="color:#a31515">&quot;Flagged&quot;</span>].Value = 1; } } dg.ClearSelection(); </pre> </div> <br/><br/><br/>and the code for the update command:<br/><br/><br/><br/> <div style="background-color:white;color:black"> <pre>SqlCommand DAUpdateCmd = <span style="color:blue">new</span> SqlCommand(<span style="color:#a31515">&quot;Update tLong SET Flagged= @pFlagged WHERE UniqueID = @pUniqueID&quot;</span>, conn_MainData); DAUpdateCmd.Parameters.Add(<span style="color:blue">new</span> SqlParameter(<span style="color:#a31515">&quot;@pFlagged&quot;</span>, SqlDbType.Int)); DAUpdateCmd.Parameters[<span style="color:#a31515">&quot;@pFlagged&quot;</span>].SourceVersion = DataRowVersion.Current; DAUpdateCmd.Parameters[<span style="color:#a31515">&quot;@pFlagged&quot;</span>].SourceColumn = <span style="color:#a31515">&quot;Flagged&quot;</span>; DAUpdateCmd.Parameters.Add(<span style="color:blue">new</span> SqlParameter(<span style="color:#a31515">&quot;@pUniqueID&quot;</span>, SqlDbType.Int)); DAUpdateCmd.Parameters[<span style="color:#a31515">&quot;@pUniqueID&quot;</span>].SourceVersion = DataRowVersion.Original; DAUpdateCmd.Parameters[<span style="color:#a31515">&quot;@pUniqueID&quot;</span>].SourceColumn = <span style="color:#a31515">&quot;UniqueID&quot;</span>; da_MainData.UpdateCommand = DAUpdateCmd; </pre> </div> <br/><br/><br/>Form Closing:<br/><br/><br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">try</span> { conn_MainData.Open(); da_MainData.Update(ds, <span style="color:#a31515">&quot;tLong&quot;</span>); } <span style="color:blue">catch</span> (Exception ex) { MessageBox.Show(<span style="color:#a31515">&quot;Error occurred updating dataset in form close event:\n\n&quot;</span> + ex.Message + <span style="color:#a31515">&quot;\n\n&quot;</span> + ex.StackTrace); <span style="color:blue">return</span>; } <span style="color:blue">finally</span> { conn_MainData.Close(); } </pre> </div>Fri, 13 Nov 2009 19:53:32 Z2009-11-23T06:25:45Zhttp://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/1d591d30-ccf0-47e4-8160-3767671800a9http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/1d591d30-ccf0-47e4-8160-3767671800a9arw73http://social.msdn.microsoft.com/Profile/en-US/?user=arw73Unable to load DLL 'W32FDS.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)Dear Members,<br/> <br/> I have a problem with my projects. I'm using MS Visual C# 2008 Express Edition. My project consists of several sub projects. When I run the program and do a process I got this error message:<br/> &quot;Unable to load DLL 'W32FDS.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)&quot;<br/> <br/> Then I try to add the dll file by Add Reference. However, I got this message:<br/> &quot;A reference to &quot;..\W32FDS.dll&quot; could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.&quot;<br/> <br/> When I look at the output pane I see this message repetitively displayed:<br/> &quot;Unable to load DLL 'W32FDS.dll'. The specified module could not be found.&quot;<br/>  <br/> <br/> Hope somebody can help me solve this problem. Thank you in advance.<br/> <br/> ARW73Wed, 18 Nov 2009 07:45:46 Z2009-11-26T08:48:45Z