Pockey's Q&A profile
Visual C# DataTable + delete selected Rows
Hi I have a data table , which gets populated at the end of a certain transaction with say 30 Rows. Now depending upon the condition the user selects, i wanted to delete certain rows as given below.But the thing here happening is, first time the fifth row gets deleted,the row count is getting changed in the table to 29, which is playing the trick here as we can see that when next delete statement isencountered, there is no row with index 29 which is throwing an error and some times the row which i want to delete is not getting deleted, instead another row with altered index is getting deleted.How can we have a workaround for this situation My intention is just to delete the rows at the specified index from the original output ...Show All
Visual C# Graphic Child Form in MDI?
Howdy all. Long time listener, first time caller here... I've recently migrated from Java over to C# and I love what I've seen thus far, especially from the MSDN community. I was hoping someone would be able to answer a question or two for me, but such a person would have to endure a bit of backstory/mission statement. What I'm trying to do with my newfound interest in C# is create an application that allows me to load information from a database file, create a "unit", store the information about that "unit" in a new data file, and then graphically represent that "unit" as a colored block within the area of my parent form that is NOT occupied by the menu system. My question is this: How would I create an ...Show All
Visual Studio SourceSafe integration and "Show Differences" dialog
Having successfully developed a C#-usercontrol "VSSBrowser" using VSS OLE Automation, I was sad to see that it's impossible to invoke "Show Differences", "View/Edit" and "Properties" dialogs via OLE. And that's the last thing left to get a fully functional control. I googled a bit and found out that "Microsoft SourceSafe SCC Provider" (SSSCC.DLL) should be used to invoke those dialogs. I examined this DLL with "Dependency Walker" and seems I even found the necessary functions; at least two of them - SccDiff ans SccProperties. The problem is that I have no idea of how to use this API in my C# project. I couldn't find any samples or articles in the Net; at the same time I remember t ...Show All
Visual Basic Remove all Child Nodes For given Parent Node
All, I have a tree view with 3 Nodes on my first level. Node1, Node2 and you ve guessed it Node3. Question1: Each of the Nodes has between 50 and 100 Child Nodes. How do I delete for example Node2 and all its child nodes Question2: if I then decide I want to Add Node2 and its children again how do I put Node2 back between Node1 and Node3 again Hoep you can help Cheers Hi, a TreeNode can exist outside a TreeView so you can just store the TreeNode in a variable before removing it from the TreeView, and then re-insert the TreeNode again from the storagevariable. The example has a Form1 with an empty TreeView1 on it - make sure there's some space on the form left open, so you can click it. LeftClicking the ...Show All
Visual C++ Help button get chm instead of hlp
I have a application built around a CPropertySheet derived class. The help button is looking for 'app.hlp' file (this is the default MFC stuff, I've not added anything other than moving the button). How do I get it to look for a 'app.chm' file instead I've tried the following using a test help file in InitInstance() //First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T("C:\\filezilla\\filezilla.chm")); EnableHtmlHelp(); but i just get "Failed to launch help" This is a MFC ...Show All
Visual Studio 2008 (Pre-release) Data Syncing between PPC DB and Desktop PC DB
Hi Rafik, The web link (Sync Services demos) published on your blog is not working. Please provide a link to view demos. I have few queries, 1) I wanted to sync data from pocket pc device database (.sdf) to SQL server database on Desktop pc. connect ppc device to desktop pc and perform sync operation can be supported by using OCS or .sdf database should be moved on to desktop pc using RAPI etc. 2) Sometimes I would need to sync data from pocket pc DB to desktop pc DB through wireless enbled n/w on PPC. Does OCS provides me unique solution in both the cases Please suggest me. Thanks, The current CTP release for which the Demos are showcased do not work on devices (or rather not tried on devices). ...Show All
.NET Development SSL Session
How can I connect to a SSL session using C# ! I get the html code, but it seems I don't connect to the SSL session. My code is... string p_aURL = "https://192.168.100.12/login_mainF.cgi"; byte[] p_aAuthBytes = Encoding.ASCII.GetBytes("Administrator:MyPassword"); string p_sAuth = Convert.ToBase64String(p_aAuthBytes); HttpWebRequest p_aWebRequest = (HttpWebRequest)WebRequest.Create(p_aURL); HttpWebResponse p_aWebResponse = null; p_aWebRequest.Method = "GET"; p_aWebRequest.KeepAlive = true; CredentialCache wrCache = new CredentialCache(); wrCache.Add(new Uri(p_aURL), "Basic", new NetworkCredential("Administrator", "MyPassword")); p_aWebRequest.Credentials = wrCache; p_aWebR ...Show All
Visual Studio 2008 (Pre-release) FaultContractAttribute , May 22 Build With Go-Live
Hi, We are using the May 22 build of Wcf. This is a version with a Go-Live license. I've noticed that the FaultContract attribute can only be aplied to methods in this build. http://windowssdk.msdn.microsoft.com/en-us/library/system.servicemodel.faultcontractattribute.aspx The documentation here ( http://windowssdk.msdn.microsoft.com/en-us/library/ms733721.aspx ) has a section "Faults for the Entire Contract" For convenience, it is possible to apply the FaultContractAttribute attribute to an entire service contract as opposed to an individual operation. In that case, every operation in the service contract is able to return that type of fault. For example, in the following contract, any operation can return a MathFault: ...Show All
Gadgets WMP problem loading file embedded in gadget
I am trying to embed an mp3 file into a gadget and then play it using a windows media player. it seems to be not loading the file. when i context-click on the media player i get: Windows Media Player cannot play the file because the specified protocol is not supported. If you typed a URL in the Open URL dialog box, try using a different transport protocol (for example, "http:" or "rtsp:"). the protocol, of course, is x-gadget:// can anyone recommend how i might be able to accomplish this thanks, milton. clarification: i did not supply a protocol on the url parameter in the embedded object. i simply put the path to the filename within the gadget assembly, the same as i would for ...Show All
Windows Forms help needed on how to create a spinning wheel using MS VS.NET2003 in vb
hi i need to create a spinning wheel in window form using MS VS.NET2003 in vb. i need to have a wheel which can be spin by clicking on a spin button which is similar to the wheel of fortune but minus off the word puzzle function. hope any one can provide me with any help. you can make a gif picture by Adobe Phoshop.You can add many pictures in one folder,It can show image one by one just like cartoon. If you want to know more,please refer some articles from google http://members.aol.com/royalef/gifmake.htm you can also download free gif image ...Show All
SQL Server EXECUTE master.dbo.xp_delete_file
I need to delete a file in a job as a step on a different server. is there something simillar to this command in sql 2000 EXECUTE master.dbo.xp_delete_file 0,N'D:\DevBack',N'bak',N'10/16/2006 15:16:22' and what will the command look like if I need to delete only files older than 3 days please help the command goes across the network like this EXECUTE master.dbo.xp_delete_file 0,N'\\100\00\00\02\DevBack',N'bak',N'10/16/2006 15:16:22' ...Show All
.NET Development How to pass XML as a parameter?
Hi, Is it possible to have a webMethod with "XMLDocument" as a parameter - that is, to pass XML into a WebService I want to pass a chunk of XML as a parameter to a function that I expose in a web service, but not having luck with that. Also, I want to return XML from the same function - to return an "XMLDocument" Code snippet will help (C#). Thanks, A You should be able to return / submit either an xmldocument or an xmlnode they will both show up as an xmlnode in the generated proxy class on the client. e.g. WebMethod] public XmlDocument MyDocumentMethod(XmlDocument request) { //... } or [WebMethod] public XmlNode MyNodeMethod(XmlNode request) { //... } ...Show All
Microsoft ISV Community Center Forums How to get the filename into the "Insert Picture" dialogue?
Our company written a marco that used in MS Words and it as same as the "insert -> picture -> from file" dialogue, but we want to enhance it to get the filename automatically when the dialogue box is opened to instead of blank. Hi, Looks like the built-in dialog does not take a initial filename argument. You can change the folder using, Options.DefaultFilePath(wdPicturesPath) = "C:\" Instead try the Filedialog object. Dim dlgFile As FileDialog Set dlgFile = Application.FileDialog(msoFileDialogFilePicker) With dlgFile .Filters.Add "Images", "*.bmp; *.gif; *.jpg; *.jpeg", 1 .InitialFileName = "c:\temp\happy" .InitialView = msoFileDialogViewThu ...Show All
Visual Studio Express Editions How to read specific lines from a text file?
Peeps, may I know how can I read specific lines from a text file For example from the "C:\test.text" containing: Line1 Line2 Line3 How would I only read Line 2 without having to read Line1 This would be similar in the case of reading an *.ini file: [LINE1] Line1 [LINE2] Line2 [Line3] Line3 How would i read Line2 under [LINE2] Thanks in advance the best way to parse a string is RegEx... ( <=( :.* \n){2}).* ( =\n|$) this code find 3rd line ( <=\[LINE1]\n).* ( =\n|$) this code find 1st line after [LINE1] ...Show All
.NET Development Create such a Proxy
How can I create an application that receives an URL of a web site from a remote computer (another program created by me), proccess the web site and return HTML and Images to the computer that requested the web site so it will be able to view the web site even if it doesn't have direct internet connection (only the computer when the proxy application will be installed has internet connection) A detail.....this proxy app, must run in background, maybe a windows service. Thanks. The code presented at http://www.c-sharpcorner.com/internet/web_proxy.asp works for me. ...Show All
