Search Results

Search found 800 results on 32 pages for 'interop'.

Page 27/32 | < Previous Page | 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Get Excel.Application object from Process or hwnd in .NET

    - by Abiel
    In C# I am trying to get an instance of an Excel.Application object from a Process object. This seems like it should be really simple yet I cannot figure it out and cannot find an example. To repeat, I have a System.Diagnostics.Process object that I know refers to a running Excel instance. I now need to recover a Microsoft.Office.Interop.Excel.Application object that refers to the process so that I can go about manipulating the Excel application from C#. In case it makes it any simpler, I also have the HWND id and window text associated with the active Excel window. Thanks.

    Read the article

  • How to Override a private set property

    - by David
    Hi, Im using the Microsoft.Office.Interop.MSProject.Resource assembly which has a "UniqueID" property, it has a get but not set. How can I actually set a value? An example would be very much appreciated. --Update-- Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a public set (get only): int ii = (int)resource.GetType().InvokeMember("UniqueID", BindingFlags.GetProperty, null, resource, new object[] { }); resource.GetType().InvokeMember("UniqueID", BindingFlags.SetProperty, null, resource, new object[] {iUid,}); I get the following error {"Number of parameters specified does not match the expected number."} anyway for me to work out how many paramters it needs?

    Read the article

  • C# - Error if Windows Media Player is not supported

    - by f4bzen
    i´m using the windows media player (Interop.WMPLib.dll & AxInterop.WMPLib.dll) in my c#-project to stream a mp3 from a server. The only problem is, if the windows media player is somehow not supported on a pc (not installed or something), my application just gives an error (no exception, just a "windows-error") and won´t start. So, is it possible to check, if the windows media player is supported? Just checking if the OS is supported will probably not help. Are there maybe some better ways to stream mp3s than with the WMP ? Thanks in advance.

    Read the article

  • .NEt on WIN to Mono on Ubuntu

    - by Srikanth
    I am looking at a possibility to change my ASP.NET 2.0 app to Mono framework. I have used the mono analyzer tool and it does detect some p/invoke and interop dependencies. For ex. 1) We use excel interops and on linux we are looking to use staroffice/Openoffice instead. Is there an easy way of substituting excel with staroffice? (I know it sounds bizarre, but just don't want to miss out in case anyone has done it already.) 2) LDAP auth: What could be the best alternative in Ubuntu (or an other flavour of Linux) ? 3) Is there an ajax framework for mono? Preferably with similar controls as Atlas?? I hope I am not too ambitious here.. thanks.

    Read the article

  • Trying to open a excel template and rename or save to new location

    - by JPJedi
    I get the following error message when I try the following: Dim XL As New Microsoft.Office.Interop.Excel.Application XL.Visible = True XL.Workbooks.Open(XLTemplatePath) XL.SaveWorkspace(XLSaveReportPath) XL.Workbooks.Close() XL.Workbooks.Open(XLSaveReportPath) "Excel cannot open the file 'ContactReports.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file." What I would like to do is Open a excel file that is the XLTemplatePath and the either rename or save the file at the XLSaveReportPath and then use that renamed/saved file to fill the report out. I am using Visual Studio 2008 in VB.NET

    Read the article

  • How to save email as draft in Outlook 2003 programmatically?

    - by Andrew
    I am working on an VB.NET app which constructs emails programmatically. This app can be used by different people at the same time so I thought that having a "central" email mailbox would be appropriate. The users would then have "links" (not sure of the correct term) to that central mailbox through their local copy of Outlook. I want to be able to save these emails so that all users can see the generated emails in the "Drafts" folder of their Outlook so that they can check the emails first for any errors and then send it off. I was originally simply talking directly to the Outlook app on the server using Microsoft.Office.Interop but have since read that it is not recommended for use in this sort of scenario. Any ideas?

    Read the article

  • Single windows service to provide access to cached data?

    - by Matthias
    I need a solution where I have a single windows service providing access to cached data to various consumers: To an MVC web application, a .Net Assembly (COM interop) used within an classic ASP page, other windows services, a windows forms application. So the data must be accessible from various processes. The data being cached is read-only. For now, all processes are located on the same machine. The environment is .net framework 3.5 and c#. My question is, how can multiple appdomains/processes retrieve cached data from a single windows service?

    Read the article

  • Displaying Fields (and/instead of Properties) in a PropertyGrid

    - by Jenk
    I'd like to use a PropertyGrid to manipulate the data on some objects, however these objects don't have properties, they have fields. Thus a property grid doesn't display them (high five MS!) Before anyone posts "just use properties": I can't at the moment.. these objects are DTOs and are used to send data to a VB6 Interop dll, thus all the parameters for the method calls are "ref" parameters (high five MS!), and C# won't compile if you use a property instead of a field or variable (high five MS!). No, I am not going to create local variables for every property on any given object. There many, many fields, and many, many test cases that would need updating, as well as the production code it self, and this post/question may be the path of least resistance. :)

    Read the article

  • Copy Merge fIelds From one word document to another in VB.net

    - by MetaDan
    Hi, I'm editing a vb.net app for a mate and part of the requirements are to copy merge fields from one word document to another. I can copy them across using document.content.text but they come out as text (should've figured this i guess). I think i've got them selected by: Dim tDocFields As Microsoft.Office.Interop.Word.Fields tDocFields = tDocument.Content.Fields I'm then activating the doc i want to copy into and i think i need to then copy into that doc using the related word app. vDocument.Activate() vWord.Selection. ??? Insert() ??? Any pointers would be greatly appreciated... Am i on the right lines even?

    Read the article

  • Where can I find a control similar to the Firefox Rich List Box for use in my application?

    - by bsruth
    I'm trying to implement a control similar to Firefox's Rich List Box: However, I can only find the XUL implementation of this control, and I don't want to have to include a XUL processing engine in my application just to get a cool looking listbox. I've been trying to implement one on my own by customizing MFC's CListBox control, but am starting to realize it may take more time than I had intended. Before continuing to implement this control from scratch, I was wondering if anyone knew of a similar control that already exists, either commercial or open source. The main functionality I would like to have is: Small display for non selected items that expands when selected. Ability to add arbitrary controls to the expanded view. Preferably native code, but can probably use managed controls via native/managed interop with out too much extra work. Any help would be appreciated, I don't want to have to reinvent the wheel if I don't have to.

    Read the article

  • How to debug without Visual Studio?

    - by aF
    Hello, Python - c++ dll - c# dll I have a com interop c# dll that is loaded in a wrapper c++ dll throught the .tlb file generated in c# to be used in a python project. When I run in my computer it works fine but when I run in a computer that just got formated it gives: WindowsError: exception code 0xe0434f4d I have the redistribute c++ installed and the .net compact framework 3.5 on the formatted computer. How can I see what is the correct exception on a computer that does not have visual studio installed? How can I debug all of this? I can't debug the dll's itself can I? Note: in my computer all works well so maybe is some dll or file missing. I allready used Dependency Walker to see if there's some dll missing, and nop!

    Read the article

  • What FIX implementation do you recommend for use with .NET

    - by Ajaxx
    I am reviewing implementation choices for FIX when using .NET. A few obvious choices come to mind, but I want to know if there are other options, better choices or if we've made the same decision as a lot of you. QuickFIX - Stable, C++ implementation - so you've got unmanaged code to interop with. FIX4NET - C# implementation - seems to have some gaps in its implementation. DIY - Chime in here if you've made your own FIX engine Let me throw in some caveats here. I'm not looking for sub 100 microsecond processing. Performance is a requirement, but not so much that it's driving my decisions. A solid product that is stable, performs well and is flexible enough to deal with vendor specific dialects is the sweet spot. The more we can do in .NET the better.

    Read the article

  • Outlook AppointmentItem - How do I programmatically add RTF to its Body?

    - by Stuart Harris
    I would like to set the Body of an AppointmentItem to a string of RTF that contains an embedded image. Setting Microsoft.Office.Interop.Outlook.AppointmentItem.Body results in the RTF appearing as-is in the appointment. I have tried using Redemption which wraps the appointment and exposes an RTFBody property, but the RTF formatting (including the image) is lost. In this example (which doesn't have an embedded image) the RTF appears in the document as-is. Has anyone managed to do this? var appointment = (AppointmentItem)app.CreateItem(OlItemType.olAppointmentItem); appointment.Subject = "test subject"; appointment.Start = DateTime.Now; appointment.End = DateTime.Now.AddHours(1); appointment.Body = @"{\rtf1\ansi\deff0{\fonttbl{\f0 Arial;}}{\colortbl ;\red0\green0\blue255;}\pard\cf1\f0\fs24 Test}"; appointment.Save();

    Read the article

  • What's the "right" way to get Win32 p/Invoke declarations?

    - by Daniel Earwicker
    I typically use the site http://www.pinvoke.net/ to grab a DllImport declaration whenever I need to call a Win32 API, and I've noticed it's the de facto standard response on Stack Overflow to API interop questions. Is this what "everyone" does? Is there a better way? Does Microsoft offer an alternative? e.g. a tool that reads .h files and outputs an assembly. Why aren't there some standard assemblies that just expose all the Win32 APIs? What would be the barrier to creating them and using them, as an alternative to a site like pinvoke.net?

    Read the article

  • How to give anonymous access to site in IIS ?

    - by Lalit
    Hi, I want to give the anonymous access to my deployed site on IIS. i checked in Directory Security by right clicking on site in IIS there is checked the box Enable Anonymous access.also there is user IUSR_MySERVER is there. but still it is asking for user name & pwd. why. I don't want to ask any uname and pwd when site accessing. What to do? please help. I fact my application is, i am importing the Excel sheet from file location in my applicatiom. When i saying browse it run perfect . But when i say Import , it asking for the username and password. on Click of Import button I am reading Excelsheet in datatable by interop services. What should this problem should be?

    Read the article

  • Unable to sign an imported msi.dll assembly using tlbimp

    - by BigMoose
    This seems so trivial, yet I can't get it to work.. I have an msi.dll wrapper (named Interop.WindowsInstaller.dll) which I need to sign. The way to do it is by signing it upon import (this specific case is even documented in MSDN: http://msdn.microsoft.com/en-us/library/zec56a0w.aspx). BUT - no matter how I do it (w/ or w/o a keyfile, w/ or w/o adding "/delaysign"), the generated assemly's size is always 36,864 bytes and when viewing the DLL's properties there is no "Digital Signatures" tab (needless to say - the DLL is NOT signed). What am I missing here?? (... HELP!...)

    Read the article

  • .NET on Windows to Mono on Ubuntu

    - by Srikanth
    I am looking at a possibility to change my ASP.NET 2.0 application to the Mono framework. I have used the Mono Migration Analyzer tool and it does detect some P/Invoke and interop dependencies. For example: 1) We use Excel interops and on Linux we are looking to use StarOffice/OpenOffice instead. Is there an easy way of substituting Excel with StarOffice? (I know it sounds bizarre, but I just don't want to miss out in case anyone has done it already.) 2) LDAP authentication: What could be the best alternative in Ubuntu (or an other flavour of Linux)? 3) Is there an Ajax framework for Mono? Preferably with similar controls as Atlas? I hope I am not too ambitious here..

    Read the article

  • System.Windows.Media.RenderCapability.Tier returns not the render mode

    - by happyclicker
    I use System.Windows.Media.RenderCapability.Tier to show the current render mode within a diagnostics panel of my app. If I force the app (3.5sp1) to change the render-mode through the following code HwndSource hwndSource = PresentationSource.FromVisual(visual) as System.Windows.Interop.HwndSource; HwndTarget hwndTarget = hwndSource.CompositionTarget; hwndTarget.RenderMode = renderMode; neither System.Windows.Media.RenderCapability.TierChanged fires, nor has the System.Windows.Media.RenderCapability.Tier property changed. However the changes are applied to the app. If I look with Perforator, the render mode has been changed to the desired mode. Although I’ve found at many locations that System.Windows.Media.RenderCapability.Tier can be used to detect the current render state (also msdn, see this), it seems, System.Windows.Media.RenderCapability only gives information about the capabilities and not about the current mode. That makes also sense if I look at the name of the class. Is there another source to know how an actual wpf-content is rendered or am I doing something wrong?

    Read the article

  • Does anyone use AODL in a real application?

    - by HyperQuantum
    We are currently using the Excel interop API in .NET to generate simple spreadsheet documents from a template. So we load the template first, insert some rows, fill in some data (dates, text, and numbers), and make Excel visible so that the user can print or save the document we just generated. But I'd like to get rid of the Excel dependency, and switch to the ODF format as well. Googling suggests AODL (C# libs for generating ODF docs) as the most obvious solution. But their last release is 1.3.0.0 BETA, and seems to be 3 years old. So I'm not sure if it's a good idea to depend on a potentially dead project... In that case, I'd need to find another solution. Any ideas? Or maybe someone could assure me that AODL is still alive?

    Read the article

  • How do I build a DataTemplate in c# code?

    - by Russ
    I am trying to build a dropdown list for a winform interop, and I am building the dropdown in code. However, I am having a problem getting the data to bind based on the DataTemplate I specify. What am I missing? drpCreditCardNumberWpf = new ComboBox(); DataTemplate cardLayout = new DataTemplate {DataType = typeof (CreditCardPayment)}; StackPanel sp = new StackPanel { Orientation = System.Windows.Controls.Orientation.Vertical }; TextBlock cardHolder = new TextBlock {ToolTip = "Card Holder Name"}; cardHolder.SetBinding(TextBlock.TextProperty, "BillToName"); sp.Children.Add(cardHolder); TextBlock cardNumber = new TextBlock {ToolTip = "Credit Card Number"}; cardNumber.SetBinding(TextBlock.TextProperty, "SafeNumber"); sp.Children.Add(cardNumber); TextBlock notes = new TextBlock {ToolTip = "Notes"}; notes.SetBinding(TextBlock.TextProperty, "Notes"); sp.Children.Add(notes); cardLayout.Resources.Add(sp, null); drpCreditCardNumberWpf.ItemTemplate = cardLayout;

    Read the article

  • Excel Worksheet assignment in VB.Net doesn't compile

    - by Brian Hooper
    I'm converting a VB6 application into VB.Net and having trouble with the basics. I start off with:- Dim xl As Excel.Application Dim xlsheet As Excel.Worksheet Dim xlwbook As Excel.Workbook xl = New Excel.Application xlwbook = xl.Workbooks.Open(my_data.file_name) xlsheet = xlwbook.Sheets(1) but the last line doesn't compile; it reports Option Strict On disallows implicit conversion from 'Object' to 'Microsoft.Office.Interop.Excel.Worksheet' I can make this go away by replacing the line with xlsheet = CType(xlwbook.Sheets(1), Excel.Worksheet) but that does't look like the right thing to do to me. If the assignment is correct, I would have thought the object should naturally have the correct type. So: does anyone know what the correct thing I should be doing here?

    Read the article

  • An elegant / simple way to check whether internet is available or not.

    - by Trainee4Life
    I did a quick search on how to check whether Internet is available or not. Most of them talked about making InterOp calls to wininet.dll. One of the answers pointed towards System.Net.NetworkInformation namespace. Exploring the namespace I found a class Ping which could be used to pinging to our servers from code, and checking whether server is available or not. What I want to ask is how this solution compares to other solutions? Ping soPing = new Ping(); var soPingReply = soPing.Send("www.stackoverflow.com"); if (soPingReply.Status != IPStatus.Success) { // SO not available }

    Read the article

  • Re-ordering C++ template functions

    - by DeadMG
    In C++, I have a certain template function that, on a given condition, calls a template function in another class. The trouble is that the other class requires the full definition of the first class to be implemented, as it creates the second class and stores them and manages them in similar fashions. The trouble is that naturally, they fall as one class, and thus have some tight interop, except that I need them to be two classes for threading reasons. A sort of, master for all threads, one child per thread, system. Any advice on how this can be implemented?

    Read the article

  • How decide whether a e-mail was newly sent, replied or forwarded?

    - by user572783
    I use Visual Studio 2010 to create an Outlook 2007 Addin. Now i want to know whether a e-mail was newly sent, replied or forwarded. Is there any property for this? using Outlook = Microsoft.Office.Interop.Outlook; namespace _Outlook2k7_Add_In { public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) { } void Application_ItemSend(object Item, ref bool Cancel) { Outlook.MailItem mail = Item as Outlook.MailItem; if (mail == null) return; // Magic? } #region VSTO generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InternalStartup() { this.Startup += new System.EventHandler(ThisAddIn_Startup); this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); this.Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend); } #endregion } }

    Read the article

  • Get only Excel column names in C#

    - by Newbie
    Is there any easy way apart from ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+fileName+";Extended Properties='Excel 8.0;HDR=YES;IMEX=1'"; using (objConn = new OleDbConnection(ConnectionString)) { objConn.Open(); Logger.Info("Reading the file "+fileName+"...."); objCmdSelect = new OleDbCommand("SELECT * FROM [" + sheetName + "$] WHERE 0 = 1", objConn); objAdapter = new OleDbDataAdapter(); objAdapter.SelectCommand = objCmdSelect; objDataset = new DataSet(); Logger.Info("Filling the dataset...."); objAdapter.Fill(objDataset, fileName); Logger.Info("Returning the dataset...."); return objDataset; } and then looping the datatables for getting the excel column names given a filename and sheet name? Using C#(and no interop services) Thanks

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32  | Next Page >