EWGoforth's Q&A profile
Visual Studio Tools for Office ThisAddin_Startup triggering on OLE client startup
Working with VSTO 2005 SE Beta + Office 2007. Created a test application Add-in project for Excel. When I open a Word 2007 document with an linked Excel workbook (Excel isn't running at this point), I get the following error message in the Excel application space. System.NullReferenceException: Object reference not set to an instance of an object. at XL2007_Test.ThisAddin_Startup(Object sender, EventArgs e) in D:\vsto\ThisAddin.cs:line 24 Apparently, Excel recognizes there is a workbook and is able to assign ActiveWorkbook to an object variable. But when the object variable is addressed, the error message occurs. try { if (this.Application.Workbooks.Count > 0) { Excel.Workbook wb = (Excel.Workbook)this.Application.ActiveWor ...Show All
Visual C# Class accessibility?
Ok, lets say I make a new project in VS05. I create a button named button1 on a form named form1. Now I create another file and another class (Right Click, Add, Item... C# class). Now I am in another class in another file, but if I do "form1.BackColor" it doesnt work. I cant access the button either. I can also make a variable public int test = 34; Cant access it outside the form1 class either. I tried a lot of things (yes, including putting "public" keywords everywhere) but it wont work. Any ideas Thanks === Edited by AlexTurp @ 12 Feb 2007 11:26 PM UTC=== Both classes are in the same namespace of course. Perhaps your form1 and your new class are in different namespaces. Try either putting them in the same namespace of in the new c ...Show All
Visual Studio Team System Opening a database project is taking a very long time
Hello everybody, I have a little problem. I created a database project that represents a Microsft SQl Server 2005 database schema. When importing the schema (the database size is 1.7 Gb) it took 6 hours. After creating the project , when i want to open the project it takes 2 hours. How is this possible Can anybody help me on this one Thanks a lot, Oana. Well, I don't know if the slow down is only because of adding the project to Source Control. I created a new project , import the database schema and then i tryed to open the newly created project. The time for opening the project was the same .. a few hours. What should i do next Oana. ...Show All
Windows Forms Dock property bug?
Hello All. I'm wondering if anyone else has run into this rather bizarre behavior. I've got this form that every time I open it in the editor it shows up with the asterisk in the caption, like the dirty bit is set and there are unsaved changes. When I close it, I'm prompted to save the changes. Every time. It doesn't matter if I open it in graphic design mode or code editor. Well, my WTF bug went crazy and I traced it to a Text Label control. If I set the Dock property on this control, the dirty bit presents every single time the form is opened. If I reset the property to "None", all is well. I can duplicate this behavior on any new form with a "Docked" Text Label control. The Anchor property has no effect o ...Show All
SQL Server Problem using openrowset to query foxpro VFP 9 tables
Hi, I have been trying to query VFP Foxpro table using following command. Select * from OpenRowSet ( 'VFPOLEDB' , 'C:\ShareBridge\Dbf\WLK\Dbf\' ; '' ; '' , 'SELECT * FROM SOM.DBF' ) as A I have upgraded latest oledb driver for visual FoxPro 9 but, all the time it gives me following error message. /************************************************************** Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "VFPOLEDB" for linked server "(null)" reported an error. Access denied. Msg 7350, Level 16, State 2, Line 1 Cannot get the column information from OLE DB provider "VFPOLEDB" for linked server "(null)". ************************************************/ ...Show All
Windows Forms question of DoubleClick on ListView in C#,need help!!!
Hi, does anyone know to write the C# codes on how to create a double click event for ListView to delete/remove the item that i select from ListView control The following event methods and Timer should do it. It detects the second click (was made for DateTimePicker which doesn't implement the Click or DoubleClick events. It is not 100% conserning the time of detection, but you may figure that out yourself. It does detect the second click: /* The events */ void DTTime_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (dblclickTimer.Enabled) { txtSecondClick.Text = "You clicked twice within 1 second"; } } void DTTime_MouseUp(object sender, System.Windows.For ...Show All
SQL Server Database name
Is it indeed a requirement that database mirrors have the same name on a server The reason I ask is that I have several servers with the same database name, and I'd like to mirror all of them to a single (disaster) server and, by necessity, have each mirror to a distinct db name. Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Cursor.Hide() not working?
In my C# Managed DirectX application, I'm trying to hide the cursor. I have tried Cursor.Hide() from within the form constructor, and I have tried oveeriding WndProc and trapping WM_SETCURSOR. Neither approaches seem to work. What other methods could I use The code below shows 2 methods of starting the application; both fail to hide the cursor. class World : Form { /* code */ } #if DEBUG // Run in while loop mode (better for debugging). using (world = new World()) { while (!world.Exit) { world.Action(); } } #else // Run in invalidate/paint mode (more efficient). world = new World(); world.ShowDialog(); #endif I used the Cursor property and a clear bitmap. I also used ...Show All
Game Technologies: DirectX, XNA, XACT, etc. "Casting" Image to Texture2D for proper use in spritebatch
How can you make a Texture2D from an Image type Without saving it to a file and then loading it - that would be just too sad.. You can't just cast it like (Texture2D)SomeImage. It's really giving me a headache, especially since in assembly it wouldn't at all be necessary to change one type of image to an other - it would just work. You don't want to be using the System.Drawing namespace, unless you don't care about XBox compatibility. There is no System.Drawing on the XBox. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Xbox Live Arcade
Do any of you reckon that it's possible to make a game using the XNA express framework, and then get it published (by MS or otherwise). I think, looking at the standard of games on Xbox Live Arcade, that I can make a much better game than anything there. " I think, looking at the standard of games on Xbox Live Arcade, that I can make a much better game than anything there." That's easy to say but not so easy to do. That said, yes, from what I understand, a possible path to the XBox Live Arcade is: Develop game using GSE, Get game recognized/accepted by Microsoft for XBox Live, Get XNA Professional version when it comes out, Re-Compile/fix up game for XBox Live, Deploy to XBox Live. Som ...Show All
Visual Studio 2008 (Pre-release) App.config initialization problem w/ Beta 2
Hello! We have a problem getting the WCF system started. Basically the ConfigurationManager fails to initialize from the app.config. The problem starts as soon as the "system.serviceModel" element is included in the config. This happens before we even try to create the ServiceHost; accessing any of the application properties (that are provided through Configuration system), throws an exception. We have Beta 2 environment installed with WF 2.2 with Orcas support. Are we missing something general or does this imply that our runtime/SDK setup is somewhat broken Example of the configuration file is below (the initialization starts to fail as soon as system.serviceModel is included; even when being completely empty, or ...Show All
.NET Development gridview style problem
hello there; i am trying to modify some properties of the gridview, such as arranging rows and columns heights and widths, since my data from source is not regular.Can anyone show me the way how to do, thanks Sorry, and thanks for replying, the problem is that; have a design made by a designer and i am sure he has no idea about what a gridview is:) and what i am trying to do is to be loyal his design, what i mean is he made a html design, includes pictures,tables...i am trying to display exactly same design, but gridview, as you specified, already sizes itself which something i dont want to, i need to change some properties of it, how can do that thanks ...Show All
Windows Forms Displaying Pictures
i m working on a document scanned images management system.. the scenerio is, user will input a document in a form of scanned image , the document may contain more then on pages that means more then one image file. The problem: on displaying that document on the form, if i use 1 picture box that would display just 1 image if i use more then one picture boxes it will show more then on image at a time on one form. the number of document images is not know so how many picture boxes should be used is also not know. conclusion: so can any one tell me which best practice should be used in this case. is there any control other then picture box availbe for this purpose or there is any technique for its solution. my idea or what i need : if ...Show All
Visual Studio Tools for Office font formating
hi all i'm sending some data to a word document like this: Microsoft.Office.Interop.Word. ApplicationClass wordApp = new Microsoft.Office.Interop.Word. ApplicationClass (); wordApp.Visible = true ; object readOnly = true ; object isVisible = true ; object missing = System.Reflection. Missing .Value; object document = settingsfolder + "\\" + filename; Microsoft.Office.Interop.Word. Document oDoc = wordApp.Documents.Open( ref document, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); oDo ...Show All
Windows Forms DataGridView Datasource property
ArrayList Ips=c1.getIPs(); dataGridView1.DataSource = Ips; The getIps returns an arraylist with count 1 the content of arraylist 0th element is 'Pencil'. but in grid its displaying the length of string i.e 6 rather than displaying Pencil.What should i do to display the content of arraylist rather than the length. regards To solve the issue what i have done is i picked up data from arraylist and stored it into the datatable object. c1.registerServer( this .getHostName()); ArrayList Ips=c1.getIPs(); DataTable dt = new DataTable (); dt.Columns.Add( "UserID" ); DataRow dr; int i = 0; while (i < Ips.Count) { dr = dt.NewRow(); dr[ "UserID" ] = I ...Show All
