smonet's Q&A profile
Visual Studio help with VB macro in .NET '05 IDE
hi, i wrote a macro to break into a running application while i am debugging. i did so because in C# when i break the "Program.cs" file is opened. i don't want it to open and i always dismiss it. here is the macro: Sub MyBreak() Dim i As Integer Dim Wnd As Window Dim FileName As String FileName = "Program.cs" DTE.Debugger.Break(True) 'find the window and activate it For i = 1 To DTE.Windows.Count Wnd = DTE.Windows.Item(i) 'MsgBox(Wnd.Document.FullName) If (Wnd.Document.FullName.Contains(FileName)) Then Exit For End If Next Wnd.Activate() Wnd.Close(vsSaveChanges.vsSaveChangesNo) 'now close it 'DTE.ExecuteCommand("Win ...Show All
Software Development for Windows Vista Non-IMAPI2 error codes (HRESULTs)
I discovered that IDiscFormat2::InitializeDiscRecorder returns 0x80070002 (ERROR_FILE_NOT_FOUND) when you pass it the unique ID of a drive which once existed but has since been safely removed from the system. To detect this situation, I use the following code: if (SCODE_FACILITY(hr) == FACILITY_WIN32 && SCODE_CODE(hr) == ERROR_FILE_NOT_FOUND) Is this going to be a reliable method to determine when a drive no longer exists I am currently handling a subset of common error codes which are defined in IMAP2ERROR.H or IMAP2FSERROR.H (and return an "unexpected" return code for the rest). I am discovering other codes as I go. I know this may be difficult to answer, but are there any other OLE-defined error codes that a ...Show All
.NET Development Calculating with measurements
Hi, I want to make an application which asks for example "how much is 23 centimeters in millimeters". This should be random and showed in a label and the answer should be typed in a textbox. The problem is, i don't know how to randomize the measurements and how to get for example the "23 centimeters" and "millimeters" in a string. I hope i made myself clear about what i'm trying to do. Any one any suggestion Thanks in advance! Hi, Yes, but not just numbers, also the measurements. These are the measurements i wanna work with: kilometer hectometer decameter meter decimeter centimeter milimeter So these have to be random aswel... ...Show All
Visual Studio Express Editions How do I Lock a button from being clicked?
Hi, how to lock a button from being clicked , and also how to achieve the "locked" or "unavailable" style Thanks. ...Show All
Visual Studio Express Editions Application distribution file with SQL Server 2005 Exp db
Hi Im new to VB .NET 2005 Exp and SQL Server 2005 Exp. I want to know what are the components required to distribute when deploying a VB 2005 Exp application that connects to a SQL Server 2005 Exp database. In VB6 and SQL Server 7, there was this Jet Database Engine that was used to connect to a SQL Server 7 database. Hows it for .NET 2005 Exp Totally dependent on the .NET 2.0 fx alone or need to check for an existing component on the user's PC Thanx anjanesh, When you install VB Exp and SQL Server 2005 Exp application, please connect to the database with Database Explore in VB Exp. In View menu, you can see the Database Explore, just open it and connect to the database by the connection wizard. Actually, there is an instance ...Show All
Visual Basic How to read specified block of bytes from a file?
I want to read only bytes from (startindex) to (length) from A LARGE FILE ie: I don't want load all bytes to memory but only bytes I need, and those bytes may start from the middle of the file and end before the end of the file . eg: Suppose mydata.bin as binary file that has more than 100000 bytes how to read from byte 24000 to byte 30000 only. thank you!!!! Dim Start As Integer = 24000 Dim COunt As Integer = 6000 Dim sr As New IO . StreamReader ( "FilePath" ) Dim TheBuffer (6000) As Char sr . ReadBlock ( TheBuffer , Start , COunt ) ...Show All
Visual C# Drawing outside my program
I've seen applications do this but I can't narrow down exactly what they're doing enough to get information on how to do it. For example, in the app, you get a list of running programs. You pick the one you want, and it draws controls on top of that window that you can actually interact with. I'm pretty sure this relates to win32 api programming with GDI but I'm having a little trouble finding what I'm looking for. Just some function names and/or some DLL names would help me out a great deal thank you The simplest solution to this I've found is using the wrapper for the ToolStripDropDown. This way you can create any control you like and pop it anywhere on the screen, the code I gave shows the ...Show All
SQL Server passing multiple values from parent to child package
Starting with "How to: Use Values of Parent Variables in Child Packages" in the SQL Server 2005 Books Online ( http://msdn2.microsoft.com/en-us/library/ms345179.aspx ), it seems I need to create a separate package configuration in the child package (of type parent package variable) for each variable I want to pass from the parent to the child. Is that really so The XML configuration file type allows me to specify any number of variables; how do I do that with the parent package variable For that matther, why doesn't the Execute Package Task simply allow me to specify the values of child variables (or other properties) directly It seems SSIS has made something as trivial as a series of function calls completely opaque: MyC ...Show All
Visual Studio SandCastle Getting Started Help
So I've become completely spoiled with msdn-style help and with tutorials. I've never used nDoc so this is all new to me. I have a C# console app with xml (///<summary>... etc.) comments for every method both public and otherwise. I've used the SandCastle Help File Builder to execute against my solution file. The solution has xml comments and I get no errors at all. The problem is that I also don't get any documentation. I get a chm file with "Namespace" at the top and none of my classes or the program.cs are represented in the chm. Is there a getting started, 101 tutorial out there that will help me figure out what I've done wrong and get me grooving I have a major asp.net application that I have to document for a cl ...Show All
Visual C# Completely Invisible/Hidden Application
I wanna create such an small application/exe which will be completely hidden/invisible to the user when it is run. Even it will not be displayed in the taskbar, system tray, task manager(application tab). I've no problem if it is: a) a console application or any other types of application (but i don't wanna see the splash screen of MS-DOS screen when I'll click on my .exe file) b) only showed in the task manager (processes tab). Anybody can help me providing snippet of code/idea or anything else. No it won't show up in the taskmanager under applications but only under processes. Most hidden applications are build this way. In this way you don't see a form but there is still a message loop you can us ...Show All
.NET Development ERROR: The path is not of a legal form.
I started getting this occasional error. Usually it goes away when I rebuild. Any idea why this is happening --------------------------- Error Detail --------------------------- The path is not of a legal form. System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck) at System.IO.Path.GetFullPathInternal(String path) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencies(Project project) at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly() at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEnt ...Show All
Visual Studio 2008 (Pre-release) How to update DescendantBounds.X and DescendantBounds.Y of a Visual after creating
Hopefully this time somebody will read and reply back.... my questions i how can we update the DescendantBounds.X and DescendantBounds.Y of a Visual after creating. In my scenario I have visuals which I move on the the canvas, I can do the translateTranform them but still in the visualCollection their bounds are not updated, which makes sense. But I need to make that a permanent move. How can I do that Do you wish to move all of the geometries together, or do you wish to update them independently Are you creating a child Visual for each Geometry, or are you placing them all in the same DrawingContext via many calls to DrawGeometry If you are placing each in a separate child Visual ...Show All
Visual Studio 2008 (Pre-release) .Net AJAX and WPF
Does WPF support .Net AJAX implementation Please provide details. Did you check WPF/E initiative http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx "WPF/E” is the Microsoft solution for delivering rich, cross-platform, interactive experiences including animation, graphics, audio, and video for the Web and beyond. Utilizing a subset of XAML (eXtensible Application Markup Language)-based Windows Presentation Foundation technology, “WPF/E” will enable the creation of content and applications that run within multiple browsers and operating systems (Windows and Macintosh) using Web standards for programmability. Consistent with Web architecture, the XAML markup is programmable using JavaScript ...Show All
Visual Studio Team System 0 error(s), 47 warning(s) --> Failed Compiling sources
Hi! I have no errors, but the build failed Where can I set that option Thanks! Regards Simon I think I found the problem, in the buildlog.txt C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(478,5): error MSB3202: The project file "C:\net\DLL\DAKOTA\BUILD1\DAKOTA\Daily Build\BuildType\..\Sources\Globalization\Globalization.sln" was not found. C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(478,5): error MSB3202: The project file "C:\net\DLL\DAKOTA\BUILD1\DAKOTA\Daily Build\BuildType\..\Sources\WebControls\WebControls.sln" was not found. C:\Program Files\MSBuild\Microsoft\VisualS ...Show All
Microsoft ISV Community Center Forums Find worksheets starting with "xxxx" using an outside dll
Hi All, I am trying to find the names of worksheets starting with some kind of string, like "intrest" and then passing the array containing the names of all 'correct' worksheets back to the dll that asked for the information. As added information: I am starting a program using an Excel Add-in. That program later refers back to the Add-in for a couple of functions, the first of which is the one mentioned below. I tried to accomplish getting the names of worksheets with the following code in the dll, where the names refer to the following elements: objExcel refers to the Excel workbook activating the program sExcelFile refers to the .xla-file activating it sNameToFind is the string I am searching for ("intrest" for ...Show All
