MMerchant's Q&A profile
Visual C# Live Update?
How could I add a live update to my application using: WebClient client = new webClient(); client.DownloadFileAsync(Uri address, FileName filename) I can download the file and run it with a dialog box, but I need to check the version of the file I have just downloaded. And if the file version is higher than the current, it runs, else it shows a MessageBox. Ahh, I ask because you hadn’t answered the first one and we generally ask that new threads are not created that ask the same question when a earlier and unresolved one still exists... because both of the threads provide some different information on the issue/question I have merged them. As for determining the file version (after downloading) you could pinvoke GetFileVe ...Show All
SQL Server About Webservices Task
My httpconnection is http://**/get_picid.php wsdl I can not find "name","type","value" options in input page of the Web Service Task Editor dialog box followed by books online and how to define if my input are variables ...Show All
Smart Device Development vb.net app.path
Dear All, I am using vb.net 2005 to develop application for windows mobile 5. I need to determine where path of the application resides. How do I get the app.path (provided in vb6) in vb.net 2005 Thanks Joe for .NET CF it differs. you could use this: dim fullPath as string = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase dim pathOnly as string = fullPath.SubString(0, fullPath.LastIndexOf("\")) ...Show All
.NET Development Relationships in Typed Datasets
Hello I am just woundering about something, which i will be doing in the near future but have not got around to yet, and just thought i would ask the question before i approachs this. Lets say i have 2 Typed Data Tables Orders OrderDetails Now in the SQL Database these 2 tables are related by a foreign key relationship. Which have the "Enforce Foreign Key Constraint" for Update and Delete Rule. (Meaning that when i delte an order, SQL auto deletes all the Order Details for that order) Now say in .Net aplcation i have my Typed Datatables with the same relationship, and also have the Casade rule set. Now does this meen that when i delete an order from my local typed order table, and it auto deletes from the loc ...Show All
Visual Studio Team System CMMIParams.XML
Customizing MSF Process Guidance, Part 6: Building HTML Content Pages with MSFWinBuild describes use of CMMIParams.xml as a command line parameter for MSFWinBuild. I've exported the CMMI method from Foundation Server and also looked in the source version of the CMMI Method but can't find this file. Please can someone advise where I should be looking for an example file. Thanks, David Thanks for that but it turns out that having CMMIParams.xml is not the complete solution. MSFWinBuild does not work successfully with the file ProcessGuidanceMap.XML provided as part of the most recent MSF CMMI download. I've been provided with an updated version by a Microsoft UK contact and after 5 hours at ...Show All
Visual Basic restrict the program run twice
Hi i have a program that run in service. and this program always start many times due to the different user log in into server. How can code to check the duplicate process and the service is running and prevent it run again. thanks Hi, Several methods. First set the application to single instance: open My Project and set Make Single Instance. Second, walk the process list to see if you are already present, watch out for the currently loading instance by its comparing its handle. How to walk processes: Dim Proc As Process() Dim p As Process Proc = Process.GetProcesses() For Each p In Proc If p.ProcessName = "<program name>" Then <do what you need ...Show All
Visual C# How to activate the forms application?
Hi, I am developing a windows form application.If my application is minimized how can I make it visible . my application is waiting for a event from a hook procedure. I tried SetFocus() but it returned the "false". How can I achive this. Regards, Hemant. Thanks for Reply This code sets the application to active app on task bar.(On taskbar that applicaion starts blinking), but the window is not shown. I also set the window state to normanl befor calling AppActivate. So how I can show the form as active application and form to be maximized Regards, Hemant Kulkarni. ...Show All
.NET Development Strange XmlSerializer error
Dear all, I am programming in VB.NET , using the .NET Framework 2.0 on a Windows Vista machine running VS 2005 with the SP1 beta applied. I have a VB class which was derived from an .XSD schema using the XSD.exe tool. I am able to instantiate objects from this class and build by "XML" object up using it, without too much difficulty. However, when I come to serialize the output to an XML stream, it fails, with a FileNotFoundException on the serialize line, e.g.: Dim serializer As New XmlSerializer( GetType (eGov.IRenvelope)) Where eGov is my class namespace, and the IRenvelope is the class within the namespace that corresponds to my object which I am attempting to serialize. The interesting thing is, tha ...Show All
Visual Studio Express Editions Convert content of Textbox to string?
I'm trying to get the content of a Textbox into a ListView, and assume I'll have to convert it using ToString, but can't figure out the format. Can anyone show me how to do The Name of the Textbox is txtName: private void btnAddItem_Click( object sender, EventArgs e) { lvwListView.Items.Add(txtName); } thats correct as the overload for the Add() method is NOT expecting a string, instead you may need to do this: this.lstItems.Items.Add(new ListViewItem(this.txtAddItem.Text)); ...Show All
Visual Studio Team System Build error in database solution
One view of my databse project depend on the object which is lying in some other database because of which i am not able to build the solution. Please tell me if there is any way out to resolve this issue. Thanks. It doesn't matter if you put the other database local, you will still get warnings for any references outside your main database. If your project is anything like mine, you'll easily hit the 200 warning limit. All my stored procs write data to an external Audit database. I had to supress warning numbers 3006,3012,3025,3024. ...Show All
Visual C++ Catching Unhandled Managed Exceptions from MFC
Is there any reasonable way to get CWinApp to catch .NET managed exceptions in the Windows message loop using its standard facility ( ProcessWndProcException ) at the moment they seem to throw all the way out of the appication without hitting that handler. Andrew Raymond Mitchell1 Sheng, As it happen's, that's more or less exactly what we're doing. We are actually hosting two MFC applications in a manner which is slightly different than that article (and we had them working about six months before it was published.) The problem here is that I need to prevent the application from crashing when either of these fragile legacy exceptions throws an unhandled exception (managed or CException derived), particularly when it relates t ...Show All
.NET Development System.ComponentModel.Win32Exception:Incorrect Function error in Windows Service using a FileSytemWatcher
Hello! I have a windows service which monitors a UNC share path for any incoming files and moves them to a new loaction on the same UNC path. The problem is that the windows service is not monitoring the folder( \\AA-11\Infofiles ) for changes but is able to write the changes to another folder on the machine( \\AA-11\Infonewfiles ) when I change the path to monitor as another UNC( \\BB-12\FolderfilesToMonitor ) or local folder(C:\Myfolder). I wrote an eventlog EventLog.WriteEntry("FSWError detected error: " & e.GetException.ToString) in the FSW_Error sub routine and when I checked the eventViewer it had the following entry. "FSWError detected error: System.ComponentModel.Win32Exception:Incorrect Function" I'm not su ...Show All
Visual C++ compiler bug? readonly. prefix opcode not generated for calls to T::Address()
(Apologies if this is known, but I didn't find it on a search.) The following methods generic<typename T> static void Ref(array<T, 2>^ x) { x[0, 0]->GetType(); } public static void Ref<T>(T[,] x) { x[0,0].GetType(); } both result in the following IL: method public hidebysig static void Ref <T>(!! T [0...,0...] x) cil managed { .maxstack 3 L_0000: ldarg.0 L_0001: ldc.i4.0 L_0002: ldc.i4.0 L_0003: call instance !!0& !! T [0...,0...]:: Address ( int32 , int32 ) L_0008: constrained !! T L_000e: callvirt instance [ mscorlib ] System.Type object :: GetType () L_0013: pop L_0014: ret } The call to Address() is not prefixed with readonly, so when called by: Ref<Objec ...Show All
Visual Studio Express Editions How to open a form when click a button
I'm trying to open a form when I click a button on my main form...I made the function and I tried to use my knowledge form VC++ 6.0 but it doesn't work.I added #include "Discovery Browser Calendar.h" in Form1.cpp and also #include "Form1.h" in Discovery Browser.cpp and I wrote in the function I have made in Form1.h: DiscoveryBrowserCalendar cal; cal.Modal; and it doesn't work...I don't know what to do.... DiscoveryBrowserCalendar cal; cal.ShowDialog(); or DiscoveryBrowserCalendar cal; cal.ShowDialog(this); or DiscoveryBrowserCalendar cal; cal.Show(); if you want the form to be modeless. ...Show All
SQL Server SPLIT AN ARRAY!
dear friends, I have a stored procedure that receives a parameter like ' 123#67#1#89#52#' I need to insert each number (123, 67, 1...) in a table... How can I do it using the best performance Thanks!!! Cheers!!! Dear Friends, Thanks for all!! IT WORKS!! I selected the answer of PHIL! THANKS FOR ALL!!! ALTER procedure [dbo] . [ST_SP_INS_PROJECTO] ( @P_Nome nvarchar ( 50 ), @P_Data nvarchar ( 10 ), @P_CreatedBy nvarchar ( 20 ), @P_Descricao nvarchar ( 200 ), @P_Owner nvarchar ( 50 ), @P_Autorizacoes nvarchar ( 255 ), @P_KeyUser nvarchar ( 150 ), @P_Users nvarchar ( 255 ), @P_Manutencao nvarchar ( 255 ), @P_Storage decimal ( 18 , 2 ), @P_Observa ...Show All
