Ayman Shoukry - MSFT's Q&A profile
Windows Forms Drawing a textbox/combo
is there a way to override drawing a textbox or combo i have a MyTextBox control that inherits from textbox, i want it to draw normally if a boolean normal is set to true, or draw as a button/rectangle/frame (or sometrhing else) if the boolean normal is false. I tried overriding paint and paintbackground, not calling the base onpaint etc.. to no avail. ...Show All
.NET Development Sharing code between projects
I have two projects containing a webservice and a corresponding webpage in asp.net. Both projects are written with C# code. It seems to me that in VC2005 the code needs to be placed in App_Code folder to be picked up and compiled. However with the increased level of code beeing shared between these projects I'd like to setup a shared path which both projects can access. Perhaps I'm missing something obvious but it seems that I cannot do that since the code will be outside the "default" folders and thus won't be picked up by the compiler. Is it possible to create a "shared" directory outside the project paths and have the projects us ...Show All
Visual Studio Express Editions displaying complete text in a dropdownlist control in
hi i am populating a dropdownlist from database. the query is working fine. problem is the full text is not appearing in dropdownlist. e.g if it is "expenses-legder full details" in database. in dropdownlist its showing only "expenses-ledger " and omitting rest of the characters. is there any property of dropdownlist i can set to get this work. thanks CS When you display the list you are most likely seeing it only be as wide as the instance of the DropDownList itself, this indicates that your instance is not wide enough to display such a long string and given that it doesn’t have an AutoSize property the way many ot ...Show All
SQL Server Selecting ProfileName to use by the SQLMERGXLib.SQLMerge
Hi I am trying to set the profile name for the merge agent to use during replication. currently I am setting .ProfileName = "High Volume Server-to-Server Profile" But it still defualts to the defualt profile during merge. Has anyone had any luck in setting the profile I know I can do it opn the server but we are imaging the computers on the lan first and then rolling them out to the client sites. Some will be only using dial up to merge changes hence the need to be able to change the profile in the Vb code calling the merge. Cheers Davide Hi Davide, Using a custom profile or any other built-in profile ...Show All
Visual Studio 2008 (Pre-release) Anti-aliasing in a generated bitmap?
In WPF if I create a RenderTargetBitmap and render a Visual into it, how do I create high-quality anti-aliased graphics (lines etc...) within the bitmap My goal is to create art-quality graphics on a very large bitmap for printing. Going via an XPS doc (XpsDocumentWriter Write method) doesn't seem to anti-alias either. Doing all the obvious stuff that works on-screen (RenderOptions.SetEdgeMode on the pens for example) doesn't seem to work - lines and ellipses are jaggy. Am using Jan CTP for the moment. I'm looking for the equivalent of SmoothingMode on a WinForms Graphics object, so all suggestions welcome (or it's back to WinForms for ...Show All
SQL Server typed XML parameter for a CLR stored procedure
does anyone know how to pass a typed XML parameter to a CLR stored procedure Cheers The only reason of passing typed XML to CLR SP is to verify it against schema, because CLR cannot use the benefits of the typed XML. Unfortunately, built-in autodeploy feature in the VS 2005 cannot create CLR SPs with typed XML parameters (as well as many other useful things), so I use predeployscript.sql and postdeployscript.sql files to manually recreate SP: predeployscript.sql IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N 'dbo' AND SPECIFIC_NAME = N 'ExecRequest' ) DROP PR ...Show All
SQL Server Rebuilding dimensions with huge fact tables
Hi, I have a dimension which is used in two Measure Groups. It has many levels (let's say 10). One fact table handles level 1-8, the other 8-10. The facts are huge, about 2 billion records for the first table (for level 1-8) and 100 million records for 8-10. We discussed a fitting partitioning schema and this will not be the big issue. Our problem is, that in the last levels (9-10) members can move from one parent to another. That means that the dimension structure changes, it has to be updated which also means a reprocession of all partitions related to this dimension. This is really a problem because of the first fact ta ...Show All
Windows Forms DataGridView: Auto fill empty rows ???
How can I fill empty data rows in DataGridView if all records do not fill up the entire grid Many thanks. There'll be always one empty row at the bottom of the datagridview. You can use DefaultValuesNeeded to fill the blank rows. ...Show All
.NET Development Com+ Error
I am using Com+ object pooling in my application .I specified the attribute for connection string using [Transaction(TransactionOption.Required),ObjectPooling(MinPoolSize=-1,MaxPoolSize=3), JustInTimeActivation( true ),SecurityRole("Authorized Users", false ), ConstructionEnabled(Default="Provider=OraOLEDB.Oracle;data source=DBOracle;uid=XXX;password=XXXXXX")] Then later on I modified it to [Transaction(TransactionOption.Required),ObjectPooling(MinPoolSize=-1,MaxPoolSize=3), JustInTimeActivation( true ),S ...Show All
Windows Forms Encrypting password field in SQL table.
Hi all!!! :) I'm using VC++ 2005, created a CLR Windows Forms project. Connecting to a sql express database using SqlClient namespace. SqlConnection, SqlCommand etc. How can I encrypt a field of text, which contains a user password Thanks! You should use one of the HashAlgorithm (SHA1 is most common) derived class to store password's hash value so there is no way for anybody to gain access to the original password. And then in application just compare hash values of entered password against one in the database. ...Show All
Visual Studio Express Editions SetDesktopWallpaper
Hi all, I'm new in windows programming and I would like to know if exist a kind of function in C++ that does the same thing of setDesktopWallpaper as in C# or VB. Thanks all sav SetDesktopWallpaper There's no such function, even in C#/VB (unless you know something I don't). But anyway, check the PSDK help for SystemParametersInfo(SPI_SETDESKTOPWALLPAPER, ...); I suppose you could also look up the value in the registry, but don't tell Raymond Chen if you do this. ...Show All
SQL Server rsExecutionNotFound
I can preview a report I've written in VS (BIDS) without error. However, when I've deployed it to the report server, I'm unable to execute the report. I receive the following error: Reporting Services Error What are you using to view the report The HTML viewer What happens if you close IE and try to render it again ...Show All
Windows Forms Why can't I change a simple name
If I start a simple Windows application a Window called Form1 is created. I have found out that it's not possible to change this name. I get a lot of error messages telling me that the change is not reflected fully in the sourcecode and when compiling that Form1 is not found. Also if I did the namechnage in the Form1 properties Window and then tried to change the name back to Form1 it didn't work. Neither is it possible to change the name in the Solution explorer (but here I could change the name back again). What is the correct way of doing this simple namechange Hello, From my understanding of your post, you want to change the text t ...Show All
Visual Studio Express Editions Error: No Symbols are loaded for any call stack frame. The source code cannot be displayed.
Hi, I am a student working on a DirectX 3D game. I usually work with Visual Studio .Net 2003 but thought I'd try to switch to C++ Express 2005 for the improved compiler - and that the IDE seems to run faster on my PC.. However when I try to step through the code as soon as I hit the 'Break All' button I receive an error message - "No Symbols are loaded for any call stack frame. The source code cannot be displayed." I've tried EVERYTHING. Any suggestions are welcome please.. I've included my buildlog below. Thanks, David Springate ---------------------------------------------- Build Log Rebu ...Show All
Visual Studio Tools for Office ServerDocument.AddCustomization NullReferenceException
I'm trying to attach managed code to a Word document. I've came across a weird behaviour. When trying to customize a document which have been customized in the past, it works fine. For brand new documents, I get a NullReferenceException. I use the following code to customize the document: Assembly assembly = Assembly.LoadFile(new FileInfo(args[1]).FullName); string version = assembly.GetName().Version.ToString(); &nb ...Show All
