AlexLancaster's Q&A profile
Visual Studio 2008 (Pre-release) ComboBox doesn't handle NotifyCollectionChanged, when bound in code to a Collection
I am switching the ItemsSource binding for a ComboBox on the fly, in code. When I do so, it appears that the ComboBox isn't registered for the NotifyCollectionChanged Event As a result, it does NOT pick up changes to the bound collection. I would expect WPF to wire this up automatically when I set the binding Not sure that what I am seeing is consistent with that, but I would like to understand the details. Currently my implementation is working because I am binding to a member class derived from ObservableCollection. Unfortunately using a class is ugly because I have to backdoor it to mopdify the collection if the underlying data changes (yuk). Here's how it works now: 1) Control.ItemsSource is bound t ...Show All
Visual Basic in my richtext box i need to load a ms word document file content
in my rich text box control i need to load the msword document file my word document file contain but it is accepting onely a text file can any one help me If you save your word document as "Word 97-2003 & 6.0/95-RTF" it will save the file as an rtf file with a doc extension...this format will allow you to open the document in previous versions of word and in your rtb Me . RichTextBox1 . LoadFile ( "C:\TheDoc.doc" , RichTextBoxStreamType . RichText ) ...Show All
Visual C# Is it possible to use a constant namespace wide?
Hi All, C# only allows for the defining of a constant inside a class. Is it possible to have other classes use that constant Here is an expample // Assume in file MyFile1.cs namespace MyNameSpace { // Assume in file MyFile1.cs class MyClassToUse { public void WriteMe() { String strHi; strHi = MYCONST_TOUSE1; } } } // Assume in file MyFile2.cs namespace MyNameSpace { class MyClassToDefine { public const MYCONST_TOUSE1 = "Hi!"; } } The above code produces a compiler error, because VS05 only knows about the constant in MyFile2.cs. Is it possible to use a constant namespace wide Thanks in advance, Marci Weinberger Glad I could be of help. To expand o ...Show All
Visual Basic How web client download a pdf file from my Window/Ldap server
Hi! I really don't know if this is the right place to post this question. . I have some confidential pdf statements (such as monthly statements from bank) on my window server (could on Novell directory also) and I will provide a download link in the web applicaiton for the web user so they can download or open the pdf file based on their login credential. the web client can not access those physical pdf files and only can download those files for themselves. I don't know how to implement this. Any idea or help will be appreciated. Thank you for your response. I want to store those statements in the window server (or Ldap server) directory for securrity. The web client user only can download thoes statements they have authority to acc ...Show All
Software Development for Windows Vista SqlWorkflowPersistenceService - how does it work?
I'm going through one of the Hands-On Labs for Workflow Foundation, and am curious about the SqlWorkflowPersistenceService. The lab has me creating a workflow that outputs the time to the console, delays for 5 seconds, and outputs the time again. If I run this, the two times are 5 seconds apart, as expected. If I change the delay to one minute and 5 seconds, the two times are more than 1:05 apart (sometimes almost 30 seconds longer). Does the runtime periodically poll the database to see if there are any instances that need to be loaded from the database How often does this happen Thanks Yes - there is a timer that the SqlWorkflowPersistence runs periodically to see if any timers need to "awaken&qu ...Show All
Visual C# Getting applications Paths
Does the System Namespace has something like system.path I need print out the current cs files path.. because for some reason I'm trying to load some images in a program that I'm creating.. but for some reason.. It only works when I add in the full path to it. What path are you really after It's not very clear from your question. You have: System.Environment.CurrentDirectory for the current directory System.Environment.GetFolderPath(SpecialFolder specialFolder) for various system folders like My Documents, Application Data etc. System.Windows.Forms.Application.StartupPath for the path where the app's executable resides in ...Show All
Visual C# Subtracting Days From Date
I know that this should seem simple, but I can't seem to be able to figure out how to subtract days from a particular date using C#. For example: 9/11/06 - 7 Days = 9/4/06 So how do I do this in C# I used to use the DateAdd function to do this with VB, but can't seem find any way to do it with C#. Thanks in advance for any help, Russ Seems so simple, I don't know why I couldn't find it online, and it's not even in my C# book. Thanks for your help as always, Russ ...Show All
Smart Device Development Including Symbol dll in Smart Device CAB Project
My Visual Studio 2005 project references symbol dll files in C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\Symbol Technologies. I have them copied to a local folder under my solution folder, along with some other 3rd-party dlls. They are set to Copy Local when I include them in the Visual Studio project. I don't understand why the Symbol dlls are not included with the "Primary output from ASF.BlueWave.BarcodeCF.UI" in the Smart Device CAB Project The other 3rd-part dlls apeared magically in the File System Editor, but not the Symbol dlls. They all show up under Detected Dependencies along with the .NET framework dlls. When the user tries to run my program, he sees: File or assembly name 'Symbol.Barcode, ...Show All
Visual Studio Team System TFS Dual Server Deployment Licensing Question
One doc I read on TFS licensing said that you need a license for every server you install TFS on. That sounds reasonable but what does that mean in a dual server (separate App/Data tier) deployment Does that mean you need to buy two TFS licenses for a dual server deployment I mean it's a single "logical" server, right I have to admit I was a little suprised by this so I went and rechecked the licensing white paper:- http://www.microsoft.com/downloads/details.aspx familyid=1FA86E00-F0A3-4290-9DA9-6E0378A3A3C5&displaylang=en Richard is totally correct in what he is saying, from the whitepaper:- " One license is required for each server on which Team Foundation Server is deployed, inclu ...Show All
SQL Server Where can I locate and see my connection string of my databas?
Hi, as the subject suggest. Thanks in advance Whats the use of the '@' Example: string connectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\sample.mdf;Integrated Security=True;User Instance=True" ; ...Show All
Visual C++ C++/CLI /CLR Managed Support in Native Library
Hi, I have a C++ project, a .dll project in Visual Studio 2005, which uses all native C++. I was able to compile the project with the /clr option (just /clr for common language runtime support). I am able to add the a reference to the dll with another C++ project, which is also compiled with the /clr option, and the entire application runs fine. The problem comes when I try adding the .dll project reference to a test C# project and add a "using MyCPPNamespace" to my C# class. I don't see the new C++ project namespace anywhere within my intellisense in the C Sharp project and I can't just add it as a using. I thought compiling my native C++ project with the /clr option allowed us to add references to these projects in other manage ...Show All
Visual Studio Express Editions Real Time Display
Anyone knows how to implement a real time, time on a label in VB.Net 2005 (ASP.Net 2.0) My thought here is VB Express doesnt allow creation of web pages, thats visual web developer or other VB/VS products If would also recommend using the ASP.NET forums at forums.asp.net This is really there domain and they should be able to help assist you in getting a realtime label working. ...Show All
Visual C++ try catch how do i make it work?
Hi, not very sure how to use try catch statements, first time using, and don't understand why the below code is not working: int connected = OPCClient::connectOPCServer(hostName, serverName, username, password, domain); try{ if(connected == 0){ LOG4CPLUS_INFO(logger, "Connected to Server " + CString(serverName)); WORD wMajor, wMinor, wBuild; LPWSTR vendorInfo = NULL; if(!getStatus(&wMajor, &wMinor, &wBuild, &vendorInfo)){ LOG4CPLUS_INFO(logger, "Version: "<<wMajor<<"."<<wMinor<<"."<<wBuild); LOG4CPLUS_INFO(logger, vendorInfo); ::CoTaskMemFree(vendorInfo); } } else throw "cannot connect to server!"; } catch( ...Show All
Visual Studio 2008 (Pre-release) Forcing Update of UI before my function exits
I know this question has been asked before, but none of the answers given work for me. I have a function that performs a long operation. Before that function does all its work, I want to set a Status message in my Status bar. The problem is that UI updates don't seem to occur until the function has exited, by which time the Status Message is no longer relevant. What can I do to force the UI to update I've tried calling UpdateLayout(). I've tried calling InvalidateRender(); I've tried setting the Status Bar properties within a delegate passed to Dispatcher.Invoke with DispatcherPriority.Render. None of these work. I have, elsewhere in my App succesfully used Background worker to perform longer running operations asynchronusly. I ju ...Show All
SQL Server Dynamic Row group in matrix
Hi All ! I want to show row groups as hierarchy levels and need the sub total values belongs to each group and sub group levels. But the most important point is that my top next top group (from child to parent ) is not static its dynamic.i.e for a diffrent senario my under displayed example can have Universe--->Earth as parent for Australia and USA. eg: 1.Australia |-------sydney |-------Melbourne 2.USA |------North US |------North US(1) |------North US(2) |------South US |------South US(1) |------South US(2) Can I get some help from anybody for making a dynamic row groups in the matrix. Waiting for a kind help. R ...Show All
