Nils VG's Q&A profile
Visual C# Dll Import
How do I import a dll into my project and then use it for the project's layout Well, if you want to keep your entire form style in blue, try creating your own ToolStripRenderer class. If you just retreive the values from ShellStyles.dll, it will just be the same as the Olive style, if that's what the user has enabled. It won't just display blue, it's a global link library that reflects the system settings. Try this: public class CustomRenderer : ToolStripRenderer { protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) { LinearGradientBrush brush = new LinearGradientBrush(e.AffectedBounds, Color.DarkGray, Color.Black, 90); e.Graphics.FillRectangle(brush, e.AffectedBounds); brush. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Can I create an empty XNA project?
I would like to make an empty XNA project, a project without any template code. Selecting the "Empty Project" template in Visual C# doesn't seem to enable certain XNA features, such as the ability to select the Content Importers and Processors in the Properties area of an image file. The only way to get these features is to create a "Windows Game" project, but that creates a bunch of template files that I don't want! Can I create an empty Windows Game project Hi; When I exported the Template, it automatically added to the Visual C# Templates and create a .zip folder in C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\My Exported Templates. If I want to share ...Show All
Visual Studio Express Editions File Renaming
I am trying to make a really small program that simply renames a file when a button is pressed. I am using Visual C++ Studio Express (2005) I have searched the HELP topics and came up with the following C++ code snippet that is supposed to do the trick... public : static void Move ( String^ sourceFileName , String^ destFileName ) I assume that "sourceFileName" and "destFileName" are variables that need to contain the local file addresses. For example: sourceFileName would be "C:\test\file.jpg" and destFileName would be "C:\test\new.jpg". I am getting errors when I build the program saying that I am using an invalid escape technique in those variables... How do I specify the file address without using a "\" What ...Show All
Visual C# Integer (Unit) Conversion Help ---
I have an integer in the unit bytes (like kilobyte and megabyte). How can I convert it or multiply it so the unit is in gigabytes (GB) Thanks, Hi, if you have the unit in bytes then: 1KB == 1024 bytes 1MB == 1024KB == 1024 * 1024 bytes 1GB == 1024MB == 1024 * 1024 * 1024 bytes You can just use those conversion to calculate your values, unless there was something specific to C# that you wanted to do Hope that helps Mark. ...Show All
SQL Server SQL Client Redirect - Database Mirroring
Hi All, My apologies if this question seems abit basic, but I'm a DBA by trade and programming .Net isn't my strong point ;) I've enabled database mirroring on 3 SQL 2005 servers, a principal, a mirror and a witness. Principal - SQL 2005 Enterprise Edition, SP1 Mirror - SQL 2005 Enterprise Edition, SP1 Witness - SQL 2005 Express, SP1 I've written some test code to test the mirroring but as soon as the connection is pulled from the principal, the client re-direct doesn't work and the program bombs. I'd be grateful fi someone could have a look at my code below and tell me if there's any schoolboy errors (NB, the user running the code is a sys admin on all 3 servers) Thanks in advance. Im ...Show All
Windows Forms Making a second non dialog form active
Hi I have a main form which then creates and shows a second form. I want this second form to be the active form with the title bar highlighted. If I use ShowDialog to display the second form all is ok. However I want to show it non modally so use Show. However this shows the second form but does not then activate it The title bar of the first form stays highlighted. I tried using Activate but that suprisingly did not achieve it either. Steve Yes I called Show and then Activate. Since posting I have discovered that the problem occurs because I am creating my second form in the Load event of the first. If I place a button on my first form and have the second form created and shown in th ...Show All
Windows Live Developer Forums using the 3d activex in winforms
i am currently trying to find out how to use the 3d activex control in my winform app, anybody got it yet David Buerer has an example app on his blog http://heptazane.spaces.live.com/ ...Show All
SQL Server SSAS Poor resource usage
Our users use Excel 2003 pivot table to analyze data on our SSAS 2005 database. They experience poor performance as soon as the products dimension is involved (800.000 leaf members), query performance is worse than with AS2000. At the same time, we notice that msmdsrv.exe only occupies 350 Mb of memory at the peak, and only 25% of processor time (bursts above 25% of processor time do occur, but are extremely rare). This is on a dual-core x64 Opteron, effectively a 4-way processor, with 16 Gig of memory. Why is msmdsrv waisting time constantly allocating and freeing-up memory at the 100 to 400 Mb level, where we have about 12 Gig of memory on that server sitting idle How can we make msmdsrv aware of those available 12 Gig and 7 ...Show All
Software Development for Windows Vista Find in XPS How ?
Dear Sirs. Please Show us with a simple code, how to find string in XPS (DocumentViewer class in .net 3). If i want to make my find dialog, how we can do it is it posible with .net 3.0 Thank you in Advance. You'll need to traverse the XPS documents and search for the string in the glyphs. I'd look in the WPF samples under DocServices. This article might also help: http://msdn.microsoft.com/msdnmag/issues/06/01/XMLPaperSpecification/default.aspx ...Show All
SQL Server Draw marking line on Chart
I want to mark a value on the x-axis of a (stacked) bar chart. (So I want a horizontal line that is fixed on a chart.) What I tried so far is adding an expression that says: =260 to the dataset, and I added that field to the Data Area of the chart. Then I plotted that value as a line. This approach leaves me with 2 problems: 1. When the category grouping only has one group, there is no line, just a dot (or another marker you can select). 2. Because of the extra field in the Data Area of the chart, the legend holds useless information. Isn't there another way to plot a horizontal line on a fixed value of the X-axis I also took some screenshots so you can see for yourself. The charts display the ManDays per Year. The gree ...Show All
Visual Studio Team System TSD 1030 Error in Project
I have a number of TSD 1030 Errors in my DBPro project. However, the file (schema object) each one refers to are objects no longer in my project. For example, one of them refers to a stored proc that used to be in my project. When I go to Schema View and look for the stored proc, it's not there (because it's been removed). Can someone tell me why I am getting errors like this on schema objects that are no longer part of my schema Thanks - Amos. Hi Amos, you might check whether the .sql files are still in the file system. They shouldn't be if they were deleted. Regenerating the .dat file might be the answer to getting rid of the errors (see your other post What is in the .dat file ). However I ...Show All
Visual Studio 2008 (Pre-release) hierarchical view to select path
Hi everyone, I want to know how to pop up a dialog where i can select the path of a folder or the path where to save a file for example in WPF (or windows forms). Regards, Pascal. hi, in fact, i want to have a button so that when I click it, a browser pops up which will enable me to select a (file) path that can be used afterwards to appear in a text block. How can i do that Thanks Pascal ...Show All
Architecture Still unclear on how to use Typed Datasets in BLL...
OK, I have decided to use typed datasets in my data access layer (DAL). So, my question is, do I really need to create a business logic layer (BLL) From what I have read, you can extend the dataset classes in the DAL using partial classes and place business logic there. Doesn't this combine the DAL and BLL into one component Or is there something I'm missing Do you create the BLL and start by referencing the DAL project and inheriting the classes from the DAL and extend the classes there I don't get where one ends and the other starts. OR, if it really makes a difference. ...or do I even know what I'm talking about... Background: VB 2005, Winform app, expertise level: intermediate+, small application audience, single develo ...Show All
Internet Explorer Development IE7 Breaks IE6 Javascript/OWC Client Display
I have a very large application that uses a Javascript menu with many items and grids created using Office Web Components (OWC 11). In IE 6 everything worked fine, but in IE7 some of items in the longer menus appear behind the grids, making those items unavailable to my users. At first I thought it might be the "windowed" vs. "non-windowed" controls issue (see MS KB article ID# 177378), but then I realized that if that was so then the problem would have occured in IE6 as well. Can anyone shed any light on what is causing this problem and what I might do to fix it This is an app running at a very large and famous corporation (I guarantee you all have heard of it) with over 2500+ users, and this problem needs to be ...Show All
Visual Basic prevent null exception from occurring
Hi there, I'm fairly new to VB.NET and love it but I'm not sure how to prevent a null exception from occuring. I can use the Try ... Catch to prevent the program crashing but I would prefer not to use this method. Is there a way to test for this without throwing exception I need to return a blank value for objUserInfo.Properties.Item( "mail" ).Value for example if nothing is found. I'm building a string from data gathered in active directory to output to a CSV file. It seems if a value is blank then an exception is thrown. The relevant section of code is: Dim objUserInfo As DirectoryEntry Try objUserInfo = GetUserInfo(objSubFolder.Name) ' ' Exception occurs on the following line s = s & ",&qu ...Show All
