Andy McDonald's Q&A profile
Software Development for Windows Vista Standard User Analyzer causes COM and ActiveX to fail
We have a legacy application programmed in C++ and MFC that runs on Windows 2000 and XP but has problems with COM and ActiveX when run on VISTA. This app is built with Visual Studio 2003. I remotely debugged this app running on Vista from my development machine and found that the COM and ActiveX problems is the app trying to instantiate the COM components but they return E_ACCESSDENIED. I have checked the following: 1. The COM components on both my development machine (XP) and the test machine (VISTA) have the same ACL’s. 2. The access denied problem occurs if I am logged into the test machine (VISTA) as a local user or an administrator (Admin Approval Mode). 3. I added: HRESULT hr ...Show All
Windows Forms Who captures mouse events for disabled ToolStripMenuItems?
One of the features for my current application is to launch a context menu whenever the user right-clicks any control or menu item. This menu contains several methods one of which is supposed to pop up a message box to the user indicating why a control/menu item is disabled. For disabled controls I just capture the MouseClick event at its container ( GroupBox, TabPage etc ) and then use the location of the event to determine what control was clicked on by the user. For disabled ToolStripMenuItems I can't figure out who gets the mouse click ( MouseUp actually ). It doesn't seem to be handled by the menu strip or the window the menu is on. Can anybody tell me where/what should be handling this event Does it just get lost because the menu it ...Show All
Visual C# Process.start() how to
Hi All, I'm using process.start() to execute msbuild.exe. Is there any properties or method that I could set or call to wait until it completely finished before the next line of code get executed Best Regards, Hi, I am using the following lines, but the process does not wait untill it closed. foreach (FileInfo file in dir.GetFiles("*.csproj")) { Process theProcess = new Process(); theProcess.StartInfo = new ProcessStartInfo(file.FullName); theProcess.StartInfo.Arguments = ""; theProcess.Start(); theProcess.WaitForExit(); } Please let me know what should I did wrong. Cheer. ...Show All
Visual Studio Tools for Office VSTO SE + Office 2003 + VS 2005 Pro
This is more of a Getting Started type of question. For some reason, I'm not finding any kind of basic tutorial that covers building an Add-In using VSTO SE (Beta) + Office 2003 Pro + Visual Studio 2005 Pro. The document that comes with VSTO SE Beta describes how to build a Ribbon, Custom Task Pane and a Custom Form Regin but all for Office 2007 components. I'd like to build an Excel 2003 add-in (or whatever) that displays a button to my end-user. Once the button is clicked I'll grab some data from the current/active worksheet, send the data to a web service and then take the results of the web service call and poke it back into the current worksheet. I've been able to do this in old school VBA (plus the now unsupported SOAP Toolkit) b ...Show All
SQL Server bad excel performance / capacity question
a web application that i have recently deployed uses reporting services and exports data to excel reports with drill down options i have reports that are being generated up to 5 MB and are not usable in excel (i.e. scrolling freezes, slow opening times, large file size) the reason for this is the detail displayed for each record each record has a drop down of approximatley 4-6 rows of detail a report with 3000 lines will have those 4-6 rows of detail for each record shouldn't excel be able to handle this the reports also take a long time to generate and i have had timeout issues, i was able to set the webservice that generates the reports to have no timeout to resolve this problem, my bigger concern is why excel performs so slowly and why ...Show All
.NET Development Microsoft.Web.Services2.WebServicesClientProtocol casting error: 'System.InvalidCastException'
Hi, I am having this problem with adding a token into a soapcontext. my code is the following: string user = user1.Ticket + "\\" + user1.Name; string password = data.Tables[0].Rows[0][2].ToString(); //data.Tables["Iutput"].Rows[1]["Parameter2"].ToString(); UsernameToken token = User.UsernameToken == null new UsernameToken( user, password, PasswordOption.SendPlainText ) : User.UsernameToken; ((Microsoft.Web.Services2.WebServicesClientProtocol)Service).RequestSoapContext.Security.Tokens.Add( token ); here my proxy is service wich is nothing but a regular object. the error msg is: A first chance exception of type 'System.InvalidCastException' occurred in tmf applicati ...Show All
Smart Device Development Who has a PPC-6700 Sprint AudioVox Mobile 5 (Can I use GPS?)
I have the Sprint AudioVox PPC-6700 and I know that it has the built in GPS chipset but everywhere that I search I can not find out how to actually access the API. There are a few of the GPS API references throughout msdn & msdn2 but none have an actual walk through. It is very easy to access the phone API's and contact lists/appointments and whatnot but the GPS is not to be found. As far as the GPS is conserned one could argue that it isn't ment to be programmed or something but the fact is that in all documentation it says that e911 can use the gps and also applications that need your location (such as movie times or resteraunts in your location). I really need to find out how to manage this out even with just a simple quord ...Show All
Visual Studio 2008 (Pre-release) XPS document sequence and Application.GetContent/Resource/RemoteStream
How to load XPS document sequence from application resources I use this: Stream stream = ApplicationStreamHelper .GetStream(source); if (stream != null ) { Package package = Package .Open(stream); XpsDocument xps = new XpsDocument (package ); document = xps.GetFixedDocumentSequence(); } public static class ApplicationStreamHelper { public static Stream GetStream( Uri uri) { if (uri == null ) throw new ArgumentNullException ( "uri" ); StreamResourceInfo streamInfo = null ; if (uri.Authority.StartsWith( "siteoforigin:" )) { streamInfo = Application .GetRemoteStream(uri); } else { streamInfo = Application .GetCont ...Show All
Software Development for Windows Vista Remote Desktop is the issue, not Vista
According to some MS documents (e.g. http://www.microsoft.com/whdc/system/vista/services.mspx), it should be possible to use CreateProcessAsUser() API in a Vista service to create a process in user session. I am trying to achive this, but the function returns error code 1307 (ERROR_INVALID_OWNER) = "This security ID may not be assigned as the owner of this object." Does it work for somebody Many thanks in advance. Mine was the same senerio, calling CreateProcessAsUser from service. I followed the steps given by you, and it really worked for me thanks HANDLE hTokenNew = NULL, hTokenDup = NULL; HMODULE hmod = LoadLibrary("kernel32.dll"); WTSGETACTIVECONSOLESESSIONID lpfnWTSGetActi ...Show All
Visual Studio Team System How to remove the out-of-box reports from the team project portal
Because I changed the process templates, the out-of-box reports are no longer working. I want to remove the links from the team project portal could not find out how to do it. I could not find a way to change the 'Quick Launch" part of the portal. Any suggestions Thanks. It sounds like you need to edit the sharepoint template. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=711585&SiteID=1 I have found another article which explains how to import a site tempate into WSS. http://msdn2.microsoft.com/en-us/library/ms243868(VS.80).aspx Here are my honest suggestions: 1.) Create a new site using your new template. 2.) Make changes to that site so that it appears how yo ...Show All
Software Development for Windows Vista Markup with ComposityActivities
Hi, I have the following scenario: I have a custom activity named BaseActivity. This acivity has a DependencyProperty string name. I have a custom activity named ComposityActivity. This activity is a sequential activity which has two child activities: BaseActivity and CodeActivity. I create an instance of ComposityActivity and I set the property name to "Test", then I create an instance of SequentialWorkflowActivity and I add the instance of ComposityActivity. When I use WorkflowMarkupSerialize to write a XOML representation of the instance I lost que value of my string because it write something like: <SequenceActivity x:Name="SequenceActivity" etc...> <ns0:ComposityActivity:Name="composityActivi ...Show All
Visual FoxPro VB Express Data Sources Limit
Is it possible to add to the standard two data sources to the Data Source picklist provided in Visual Basic Express. I'm trying to connect to Visual Foxpro tables, but it's a lot more work coding it by hand using VFP OLEDB. The data source wizard only lists SQL Server and MS-Access as sources to pick from. Thanks for any help. Thanks for your reply. The Database Explorer under the View Menu of VB.net Express offers the same two choices only, and I see no option of adding any. This appears that this might be one of the limitations placed upon the Express edition ...Show All
Visual Studio Express Editions ContextMenu Question
hello, Assume i have a contextMenu (pops when i click a notifyIcon) wich shows a submenu. Inside the submenu it parse some files from a directory. Now i'm looking to make a event for when i click on of those items inside the submenu (names of some files) and shows the index number. Anyway to do this thnx kevin Hi, If you want to get the item information clicked just grab the "sender" as the args in the event. For example: private void ItemNameToolStripMenuItem_Click(object sender, EventArgs e) { label1.Text = ((ToolStripItem)sender).Text; } In this way, you can get the clicked item's text. Similarly you can get what you need in the specific item. ...Show All
Windows Forms last action + hide the main form
Hi, i create an application that execute a command at the startup and do a last one when the user leave windows (logout/shutdown). Since i haven't found if it possible to capture the logout/shutdown event, i use Private Sub Form1_Closed( ByVal sender As Object , _ ByVal e As System.EventArgs) Handles MyBase .Closed stop_process() End Sub and Private Sub MyApplication_Shutdown( _ ByVal sender As Object , _ ByVal e As System.EventArgs _ ) Handles Me .Shutdown stuff_handler.My.Forms.Form1.stop_process() End Sub since i consider that to leave windows, windows will need to stop my process at the same time. Is there a better way to do the job Now the thin ...Show All
Windows Forms Lines, curves, and layers..
I simply have a Form, and a picturebox on it. I can open a new picture and draw something on it using the mouse. What I need to do is, to have the picture which I opened in one layer, and the things I draw on it, in another one. So that I can save my drawings in a different file. (closest case is the photoshop layers.) I would appreciate the answers you'll give. Good evening to everyone, I will shortly explain the things I have basicly. The program is like a mini-paint which looks like a mini photoshop. anyway.. Two forms (till now) MdiParent & mdiChild forms. Things I must do are: To open a picture, To draw lines, curves, and other basic drawing applications, (I've done till here ...Show All
