Rhubarb's Q&A profile
Visual Studio Express Editions Not sure how to do this
How to describe this: I have a String Variable that will contain a specific string. I have another variable may or may not contain a different string that i want to use if this variable has the string instead of the first string variable. For example: Dim Variable1 as String Dim Variable2 as String Variable1 = "Test" Variable2 = "Something Else" (Which it may or may not contain something based on user input/selection) If Variable2.Contains = True then Variable1 = Variable2 End If This is not working.....Ideas Regards, LVB You might need to initialize the variable first for this to work, try this: Dim Variable1 as String = "Test&qu ...Show All
Windows Forms Application.Run(...)TargetInvocationException -> OperationCompleted already called
Hi. I get above mentioned error after my Application finished and the programm trys to call Application.Run(...) again. I have a Backgroundworker-Thread in the application and I think that this is somehow causing the problem. I just don’t know why. I set the the backgroundworker to "supportsCancel" and have already tried to explicitly cancel the BW. Still, the problem presists. Does anyone know how to solve this or at least where to look for an answer Thanks in advance. Brokit I think you are trying to "resurrect the dead." Post the logic on how you call the Application.Run() again. My initial guess is that you are passing the same object reference that has already terminated to the second call ...Show All
Visual Studio 2008 (Pre-release) WPF with C# only?
hi, can i work with the WPF using C# only (without xaml) if i want to create all of my shapes in the code (without using design software) why i need xaml You might want to look at the zam3D app... its more targetted at creating 3D apps in WPF ...Show All
Windows Forms Problem with an OCX file in a windows service?
Hi all, I was converting a windows application to a windows service. The problem is with an ocx file. The windows application is using a server.ocx file and I created an instance of that ocx control by drag n drop from tool box in that windows application. Now when I tried to convert that application to a service I couldnot use that ocx file by drag n drop. Then, as an experiment to use that ocx file, I added a windows form in to the windows service project,added the ocx control and handled all the events of the ocx control in that form. Also I added two public functions called Initialize() and UnInitialize() and I called these functions in the OnStart and OnStop methods of the service. Then I am getting the following error in ...Show All
SharePoint Products and Technologies New data type
Hi, i need to make a lookup column in list, and I want this column to have a list of columns (from another list) as a data source is that possible thanks for suggestions ...Show All
.NET Development dynamically inherting
I am working on a C# desktop application In my project i have two master forms(master1.cs and master2.cs). i created a inherited form,child1, of master1. While running the application can i change the parent form of child1 to master2. The purpose is that to change the apperance according to user needs. can anyone tell is this possible I would consider inheriting a child1 from master1 and child2 from master2 then swap the user between child1 and child2 instead of trying to change the parent... ...Show All
Windows Forms Drawing multiple circles
Hi, I want to draw more than one circle say for example 8 I know i can draw circles with the use of the following code Graphics g = this .CreateGraphics(); int x = 100; int y = 100; int r = 10; g.DrawEllipse( new Pen ( Color .Lime, 5), x - r, y - r, r, r); g.Flush(); g.Dispose(); but what i want is more than one circle. Also after i have drawn them how can i make say 7 hide and one visible with the timer set. would i have to use another interger or a string and assing it to graphics g=this.CreateGraphics() function and then on form load say that the interger has to be hidden. Could someone please help. Also please bear in mind i am a begginer so could you direct me step by step please Th ...Show All
Visual C# #defines in C#
does C# have an equivalent to a C #defines - ie one with a value not just a presence. I know I shouldn't need one but it for the decorations and documentation text I want it, not the C# code tks phild I’m afraid not... the #define support that exists in C# is limited compared to that in C/C++ and does not support replacement but does do conditional compilation. Take a look at this article for more information. ...Show All
Windows Forms String with color
Hi all, Anyone knows how to put some color to string output For example, I have this output in my listbox: string value1; string value2; myListbox.Items.Add(String.Format("{0} - {1}", value1, value2)); and now I want to color value1 red and value2 blue. How can I do that Idea/suggestion are very much appreciated. Regards. thanks guys, i guess there is no way i can format my strings with color. using ownerdrawn listbox is a way to do it. btw, thanks wang chi for the code. nice for my other apps. ...Show All
SQL Server Question on OUTPUT feature of DML
I need to audit inserts/updates/deletes on active tables to audit tables on a set of tables that have foreign key constaints with the update cascade and delete cascade defined. I can explicitly code the delete/update on the parent table to perform an OUTPUT to an audit table, but how do I OUTPUT the cascaded delete/update that happens on the child table because of the FK constraint with delete cascade defined without having to resort to triggers. Thanks, -chiraj You might want to check into the use of DML triggers for this kind of issue, but this is not something that I have used much. Dave ...Show All
Software Development for Windows Vista Where is the >detailed< Vista Software Logo Spec documentation?!
I've been looking for months to find more information about the Windows Vista Software Logo program, and have basically come up with nothing... Is anyone else having this issue There seems to be only one document available called: "Windows Vista Software Logo Spec 1.0.doc". However, this document can barely be called an outline of what really should be available. If you look at the DFW XP and DFW XP x64 counterpart program on the http://www.microsoft.com/winlogo site, you will find an overwhelming amount of information including test framework docs and in-depth technical requirements docs for engineers, totaling well over 400 pages of highly detailed information. But for Vista we only get 24 pages ! So much has changed between X ...Show All
.NET Development How to indentify a managed exe or dll.
What's the best way to identify a managed exe or dll so one knows what debugging interface to use. Thanks. - Dan. In Whidbey (v2.0), we added some new APIs for this: mscoree!GetVersionFromProcess - tells you if a currently running app has the CLR loaded, and if so, gets the version string in the version of another process mscoree! CreateDebuggingInterfaceFromVersion - creates an ICorDebug for a given version string. See here for usage details. pre-whidbey, there is also mscoree!GetRequestedRuntimeVersion - predict version of CLR that an exe will load. This is just a prediction and so may not be accurate. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Loading a Model from a List<> problem?
Hi, I`m storing info in a list which I`ve written: List < float > mapList = new List < float >(); I`m storing mapList[x] = `ModelName`, mapList[x +1] = `ModelpositionX`, mapList[x +2] = `ModelpositionZ` amongst others. ..and would like to. DrawModel( mapList[x], Matrix .CreateTranslation(mapList[x +1], 0, mapList[x +2]) ; Which gives the error: Error 2 Cannot convert type 'float' to 'Microsoft.Xna.Framework.Graphics.Model' : for mapList[x] above. Is there anyway I can convert mapList[x] so its accepted I`ve only just starting with lists and arrays, which one would be better for the type of thing I`m doing above Any information on any of the above would be great. I`m off to read up some more. Tha ...Show All
Visual Studio Team System Specifying custom properties for Unit Tests at class level
Hi, I am having a test project with one class "UnitTest1". "UnitTest1" is having 10 unit test methods say "TestMethod1" to "TestMethod10". Now I can define custom properties for any testmethod by doing like this: [TestProperty("PropertyName", "PropertyValue")] Now if I want to define the same custom property for all 10 tests in my testclass then I've to repeat the above statement 10 times. I don't want to do it. Because say a property "Reviewer" is applicable for all tests and I expect the same value for "Reviewer" for all tests with in a testclass. So I want to define such property at higher level(Test Class) so that it become applicab ...Show All
Internet Explorer Development Programmatically reading Cookies on Windows Vista using .NET?
My toolbar (as referenced in my other posts) has a "Login" link on it, that dynamically changes to "Logout" if my user is currently logged into the website the toolbar is tied to. This code works fine in 9x, 2k and XP: string currentUser = System.Environment.GetEnvironmentVariable("USERPROFILE"); string[] cookieFiles = System.IO.Directory.GetFiles(currentUser + \\Cookies , "*" + myHost + "*"); However, in my Vista Ultimate beta this code explodes saying, "Access is denied." On further investigation, there are no cookies in this folder. A different post suggested they were in User\AppData\Roaming\Microsoft\Windows\Cookies, but I can't seem to find them there either. ...Show All
