James Alexander's Q&A profile
Windows Live Developer Forums MSAJAX 1.0 conflict with V4 API. Sys.InvalidOperationException. V3 API is fine.
Hi Guys, Been trying to use the new V4 API in my application but I get this error when I call the LoadMap method function GetMap() { map = new VEMap( 'myMap_myMap' ); map.LoadMap( new VELatLong(53.278353017531821 , - 2.153320312500008) , 5 , 'h' ,false ); ***** Get the error here when I call LoadMap. Microsoft JScript runtime error: Sys.InvalidOperationException: Object Microsoft already exists and is not a namespace. Can anybody please help me to find the problem. V3 of the API still works fine without any problems. If I remove AJAX references from my page the error goes away. Unfortunately, I make heavy use of MS Ajax 1.0 and can't get around it. thanks, SoS ...Show All
Software Development for Windows Vista Persistence and long running workflows
Hello all I am developing a specialist content management system that uses state machine workflows to control the content throughout its lifecycle, which could last from a few days to a number of years. I have implemented a custom persistence service that uses Activity.Save and Activity.Load to (de)serialize the workflow state into and out of my backing store. This all works fine and I am very happy with it. However there is one major issue: Whenever I make the smallest change to a workflow none of my saved workflows can be deserialized. Instead it throws an IndexOurOfRangeException from ActivitySurrogate.ActivitySerializedRef.OnDeserialization This part of the framework does not appear to be designed for user extensibili ...Show All
Windows Forms Use Publish Wizard to register (regsvr32) a dll
Hi, I am doing a small project here which requires a 3rd party DLL be registered on the end user's PC. The budget for this project is tiny (not even in to triple figures!) so I'm reliant on either: Using the Publish wizard in VB.net 2005 Express Creating my own installer I'd rather use the former for simplicity. I can't work out how to make it register the DLL - including it in the final installation is fine, but running REGSVR32 for it - I can't find. I couldn't make my main EXE register it either by calling REGSVR32 when it first runs because I can't work out where the Publish wizard is dumping the files. Any suggestions Regards Daniel Thanks, I'll give it a try ...Show All
.NET Development C# custom class - calling an sproc - completes, but no data inserted
I have an asp.net (C#) app calling an sproc from within a class. The sproc first verifies that the item being inserted does not already exist. It then adds a row to 3 different tables (nested sproc). Running the sproc from the "Run Stored Procedure" menu item in Visual Studio .NET 2003 works perfectly. But, when I run the actual app from IE, no data is entered into the tables. The output from the Database Output window indicates each of the statements finished correctly; however, when I look at the table using SQL Enterprise Manager, the data has not been added. Am I missing a commit or something All sqlcommand parameters are set from the class properties. I make sure they're all set before calling the sproc (even though som ...Show All
Visual Studio Tools for Office How to detect a new incoming email?
Hi, I wrote some code but cannot work... private void ThisAddIn_Startup( object sender, System. EventArgs e) { Globals .ThisAddIn.Application.NewMail += new Outlook. ApplicationEvents_11_NewMailEventHandler (NewMail); } void NewMail() { Outlook. NameSpace outlookNameSpace = Globals .ThisAddIn.Application.GetNamespace( "MAPI" ); Outlook. MAPIFolder inbox = outlookNameSpace.GetDefaultFolder(Outlook. OlDefaultFolders .olFolderInbox); Outlook. Items unreadMailItems = inbox.Items.Restrict( "[Unread]= true" ); foreach ( Object mailItem in unreadMailItems) { MessageBox .Show( "Haha" ); } } Pls help me... Thanks Peter, With your code, what ...Show All
Gadgets Gadget Remove issue
Hi, I am trying to create a gadget which has a media player in it using the OBJECT tag. Is there any event which is raised when a user removes the Gadget from his Live page i need to write some code when the user removes the gadget by clicking on the close (x) button. but i am not able to find anything about this event.. There is an event named " onModuleRemovedEvent " but i am not sure how to use it.. Thanx for the help in advance.. Regards Bharat T. Motwani hi Todd, I used the dispose function but its not getting called when the gadget is removed from the page.. The dispose func. is being called when i browse to some other page or close the browser. But its not being called ...Show All
Visual Studio Express Editions Debug Window Output Problem - DLL Loading/Unloading
I recently updated my virus application and have noticed that (whether it's running or not) the virus program will continually output DLL load/unload messages to my Debug Output window, which makes testing a huge pain. The messages are as follows: 'LogCopy.exe': Loaded 'C:\Program Files\Trend Micro\Internet Security 2007\TMAS_OE\TMAS_OEHook.dll', No symbols loaded. 'LogCopy.exe': Unloaded 'C:\Program Files\Trend Micro\Internet Security 2007\TMAS_OE\TMAS_OEHook.dll' I'm using MS Visual C/C++ 2003 and am building a .NET Windows Forms application. I've written the software vendor about this problem, but was wondering if there's a way to filter out the messages in the Debug window itself If I could just selectively disable display ...Show All
Visual C++ New programmer getting a conversion error
Hi, I'm hoping someone can help me with this error I have a class called CListLib which has a function with the following prototype: ListStruct *FRYSortList(int (*compareContent)(void *, void *), int order); My code call the function as follows: if(SchedFileList.FRYSortList(SortSchedOnList, LIST_SORT_ASCENDING) == NULL){ .....; } The SortSchedOnList function is declared as follows: int CKronosCOW :: SortSchedOnList(void *Node1, void *Node2) I am getting the following error: error C2664: 'FRYSortList' : cannot convert parameter 1 from 'int (void *,void *)' to 'int (__cdecl *)(void *,void *)' What am I doing wrong Thanks much Ray Sarath, Thanks for the reply SortSchedOnList is a func ...Show All
Visual Studio Autos doesn't show changed variables correctly
When using the "Autos" window to debug C++ in VS2005, a structure shows in red if it has changed since the last breakpoint, which is expected behavior, but its individual members do not show in red, even if they have changed. This is awkward, because you can't tell which member changed. VS6 handled this correctly. ...Show All
Windows Forms Derive useable space of a MDIParent form
An MDIParent form has a available space for the MDIChild forms. I would like to use the properties of that space to determine the size of the MDI Child forms. For example, i would make appear a child form with a treeview on the left hand side. Ideally, that child form would be as high as possible (without maximizing). That of course depends on the user's resolution. Is there a way i can derive these properties Thanks for your help Yes, but when i define the height of my MDIChild at Clientsize.Height, then i still have a vertical scrollbar. It seems to work when i substract SystemInformation.MenuHeight * 4 But perhaps there is a more suitable property that would eliminate this correction. Thanks! ...Show All
Visual Studio 2008 (Pre-release) Reading or Converting other document types to XPS
We want to display documents (pdf, word docs, etc) in a WPF application. Right now, the only way I can figure out is to include a "Web Browser" win32 control and using its ability to display the app through a browser. However, it would be better to do this through something like a DocumentViewer. The only way I can figure out at this point for converting a document like pdf is to use the print driver inside Vista to output it to a xps document. However, it transform the searchable pdf into an image, and then it is converted to XPS. This is not a good solution. Is it possible to convert a pdf to xps that retains the ability to search the converted document as well as being the same display/layout as the original document ...Show All
Visual Studio Group Total question
I have a report based on sales by Director, then by Area. So in the Director group footer I have =Sum(Fields!Premium.Value) =Sum(Fields!Fee.Value) =First(Fields!BudgetAmount.Value) And I wish to do the same for the Area footer. Now each Director also has a budget. The underlying data has this budget against each line. I wish the Area footer to show the total of the budget for that area. The First() or Sum() functions won't return the correct value. I guess what I'm trying to do is get the Sum of the First(Fields!BudgetAmount.Value) How would I do this Thanks Vayse ...Show All
Visual Studio Tools for Office Remove borders from Excel charts using C#
I am building an excel file from scratch. this includes charts of data. In this particular case I need to remove the borders from the chart, but it doesn't appear to work correctly. // The next three lines are an attempt to remove the border, the fourth shows that I am controlling the chart ((Excel.ChartObject)oSheet.ChartObjects("Chart 1")).Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone; ((Excel.ChartObject)oSheet.ChartObjects("Chart 1")).Interior.ColorIndex = 2; ((Excel.ChartObject)oSheet.ChartObjects("Chart 1")).Border.ColorIndex = 2; // After attempting above I use the following code which works to round the corners ((Excel.ChartObject)oSheet.ChartObjects("Chart 1")).RoundedCorners = true; I don't want to round the co ...Show All
SQL Server server can t find SP sp_MSforeachDB
Hi if I do exec sp_MSforeachDB '......etc' and i get SP sp_MSforeachDB not found how do i reference it in order for the server to find it. Because when we check in master we find the SP there but when we run the exec sp_MSforeachDB ... we get SP not found any help pls is that all the three instance where this script is not working is SQL 2000 machine object_definition fnction is not there in SQL 2000. Madhu ...Show All
Visual C++ variables in dll
This is my code, for(int ii =0;ii<2;ii++) { Datasources[ii].hLib = LoadLibrary(MyDll.dll) Datasources[ii].fun1 =(SCODE (*)(void *))GetProcAddress(Datasources[ii].hLib, "Fun1"); Datasources[ii].fun2=(SCODE (*)(void *))GetProcAddress(Datasources[ii].hLib, "Fun2"); Datasources[ii].fun3 =(SCODE (*)(unsigned long,void *))GetProcAddress(Datasources[ii].hLib, "Fun3"); } I am using LoadLibrary to load the DLL. In the above case is the data Variables in dll will be seperately created each time we use LoadLibrary function to load a DLL It is identical to all thread and must be protected against concurrent access. Otherwise have a look at TLS (thread local storage). TlsAllo ...Show All
