Sachini's Q&A profile
Visual Studio Problem addin a toolbox in the right panel
Hi, I’m coding a Visual Studio Add-in and I want to add a ToolBox docked to the right panel (where the Solution Explorer and Properties live). But when I add the toolbox, it is located in the bottom. Can you provide me an example of this or tell me what I'm doing wrong This is the code I’m writing: … _toolWindow = windows2.CreateToolWindow2(_addInInstance, asm.Location, "MyAddin.ToolBox" , "Content" , guidstr, ref programmableObject); _toolWindow.Visible = true ; _toolWindow.AutoHides = false ; _toolWindow.IsFloating = false ; _toolWindow.Linkable = true ; _toolWindow.SetKind( vsWindowType .vsWindowTypeToolWindow); _applicationObject.MainWindow.LinkedW ...Show All
Windows Forms array assigning problem
i want to assign the value 500 in this position and else 8 Dim arr() As Integer = {70, 71, 72, 73, 74, 111, 113, 114, 116, 117, 119, 120, 122, 123, 125, 126, 128, 129, 131, 132, 134, 135, 137, 138, 140, 141, 143, 144, 146, 147, 149, 150, 152, 153, 155, 156, 158, 159, 161, 162, 164, 165, 167, 168, 170, 336, 424} the total array size is 554 arr2(554) how can i do this arr2(0)=8 arr2(70)=500 note 70 is the 0 element of the arr() thanks Hi, As mentionned,your problem description is a bit vague, but from what I can understand, you will need 2 arrays. The first array is your array with 554 elements, the other one is your array with the "secial indices". When you want to assign, simply ...Show All
.NET Development XPathNavigator.MoveToFollowing
Hi, I am using MoveToFollowing method to get info about xml element which I want to modified or so. However after moving to one element I cannot move to the previous one! It is need to move to the root first. It is not a good solution. What should I do in order to have access to all elements no matter where they are thanks for help Ela Can you show us a sample where MoveToPrevious fails I have made a simple test case string xmlMarkup = @"<gods> <god>Kibo</god> <devil>Xibo</devil> </gods>" ; XPathNavigator navigator = new XPathDocument ( new StringReader (xmlMarkup)).CreateNavigator(); if (navigator.MoveToFollo ...Show All
Visual C# Export PowerPoint with C#?
Hi, Currently i am working on small application where i export all the slides in the powerpoint and display then in slide show using C# form.My Problem is that when my application runs on a system on which office is installed it works fine but it is giving me error when i am running on a system where office is not installed. I know two methods of exporting the power point one is using export option and other is using screen capture method. Please told me the solution to my problem that how i run my application on a system without office being installed on it.And i am com Heya dude. The thing is, if you reference assemblies from other applictaions and software, you need to make sure that the dll's you referenced are located in the ...Show All
Visual Studio Tools for Office CommandBarButton not getting deleted in MS Word
I am developing an Add-In for Word/Excel/PowerPoint applications. I am using Office 2003. In the OnBeginShutDown method, I am trying to delete the existing button. The button gets deleted for Excel and PowerPoint. But for Word, it is throwing " Exception from HRESULT: 0x800A01A8 " exception. Please suggest me a fix for this or atleast an alternative to prevent this exception. Hi Pavan, Thanks for your suggestion. I implemented the solution mentioned in the thread. But still I am getting the same exception while trying to delete the button. In addition to that I am getting a confirmation message saying that "Do you want to save changes made to temp.dot" which is irritative to the end user. ...Show All
Visual Studio Team System Sorting by Rank sorts incorrectly
Rank is an integer field - but when you sort it and you have say 13 items ranked from 1 to 13. When you try and sort it in the UI by Rank it will rank them 1, 10, 11, 12, 13, 2, 3,4,5... Since the UI only allows integers in this field - sorting it like a string isn't right - I am using the RC version. Is there a work around for this besides entering numbers like: 0000000001 0000000002 etc... Is there a way to change the sort behavior ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Game completed and posted online. Have a look...
I recently developed a 3D game using XNA and have posted the binary and source on www.threesixbox.com . The game's name is Snake and it can be found at http://www.threesixbox.com/project/ id=f580fc1536 I've been developing games since the early 80's but just downloaded XNA last week. During the course of the project I went through several iterations of optimizations and learned quite a bit about XNA. I know that whenever I'm learning a new development language or library, working examples are very helpful to me. If nothing else, this project can be used as another source of information for anyone interested in XNA development. Let me know what you think... I just finish ...Show All
SQL Server Route optimization
Hi, I am trying to generate scripts for route optimization, that is in what order a machine should operate on different sites with lowest cost of transportation. I alreday have generated the matrix with distances between all sites. And the problem now is how to generate the lists of all possible routes. That is all possible combinations of in which order the sites can be operated. Does anyone have a clue Thank you in advance Sten-Gunnar Thanks Dave and Steve. What I have found so far in terms of code is this http://technology.amis.nl/blog/ p=1221 Sten-Gunnar ...Show All
Visual Studio Team System Merge by WI
Hi, I would like to have the option of merging all the changesets that are linked to my WI as one unit and not allways to take some specific changeset and merge it. what is the best way to implement it Thanks in advance, Shmulik. You can write a bit of OM code to automate things, but you'll still need to merge each changeset individually in the general case. Merge only works on contiguous ranges. ...Show All
Smart Device Development How to Get g_hInstance In CustomForm
Hello, Everyone: Does anyone know how to get g_hInstance value in CustomForm sample(or Tv_inbox sample) In this sample, the g_hInstance value is setted by LibMain( ), HINSTANCE g_hInstance = NULL; /****************************************************************************** LibMain - Entry to dll ******************************************************************************/ BOOL WINAPI LibMain(HINSTANCE hinst, DWORD dwReason, LPVOID lpv) { switch (dwReason) { case DLL_PROCESS_ATTACH: { g_hInstance = hinst; break; } } return TRUE; } But, in this DLL was called, the function LibMain() was never called, so the value of g_hInstance is always NULL. I want to use g_hInstan ...Show All
Visual Studio Express Editions Can one item hold more events ?
Can, lets say a button handle two events. I need this Private sub btnStart () handles btnStart.MouseEnter btnStart.Image = (" somewhere ") End Sub Private Sub btnStart () handles btnStart.MouseLeave btnStart.Image = ("somewhere") End Sub Yes a function can be used to handle more than one event. Just list all the events separated by commas after the 'handles' keyword Private sub btnStart () handles btnStart.MouseEnter, btnStart.MouseLeave Obviously the signature of the function has to match the signature of both the event's handlers. For example, one function can't handle both MouseEnter and MouseDown because MouseEnter requires an EventHandler function while MouseDown requ ...Show All
Software Development for Windows Vista Trying to __debugbreak() in a service
On XP I just stick a __debugbreak() in the code and start the service and when it's hit I get a Debug button in the fault dialog which attaches to VS2005 and I can then start debugging from that point. On Vista I get the fault, but no option to debug. Is it possible to debug in this way on Vista If not, how does one debug a service on Vista It has a manifest set for "asInvoker". It currently runs fine on XP, and it runs on Vista, but behaves differently on Vista and I need to investigate. I found this blog to be useful: http://blogs.msdn.com/cjacks/archive/2006/12/12/debugging-a-service-on-windows-vista.aspx ...Show All
Audio and Video Development Taking Screen Snapshots
Is anyone aware of a way to take screen captures of the video and save those to the player storage for later viewing Jacco - Once you've taken the screen shot, its in the filecache and ready to use - you don't need to copy it to the p-stor and then copy it back to use it. Putting the screenshot in p-stor is for when you want to access it later. You only need to copy from p-stor back to the filecache after your app restarts (ie, you've ejected the disc) and the screenshot is removed from the filecache (or if the screenshot is removed from your filecache during your app due to garbage collection). Xavier - FileIO is its own object, it is not a member of application (use FileIO.copy). Once you've finishe ...Show All
Software Development for Windows Vista Samples, link error while building x86 version of GraphChat : p2pgraph.lib
Hi-- I'm trying to build the sample project: GraphChat using MSVS2005 TeamSuite on a x64 Vista install using the default win32 config (I also created and unsuccessfully tried an x64 config). On the win32 config I get the following error: fatal error LNK1104: cannot open file 'p2pgraph.lib' The only copy of p2pgraph.lib I can find is under C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x64 Of course linking to this causes a ton of errors. I re-ran the windows SDK setup to verify I also installed the 32 bit libraries. Is there a x86 version of this library for vista Any idea on what I need to do to get this to build Thanks, rschlend All the x86 library files are directly und ...Show All
Visual Studio Team System error with unit testing web site
I have a web site (IIS based) and now trying to write unit test for that. I keep getting following error for a simple method test: - "Could not connect to the web server for page 'http://localhost/Support/Training.aspx'. The remote server returned an error: (404) Not Found.. Check that the web server is running and visible on the network and that the page specified exists." I can browse the page without any error though. Here is my code in Training.aspx.cs public string SayHello() { return "Hello"; } and my test code is - [TestMethod()] [HostType("ASP.NET")] [UrlToTest(" http://localhost/Support/Training.aspx ")] public void SayHelloTest() { PrivateObject po = new PrivateObject(TestContext ...Show All
