Norbert Thek's Q&A profile
.NET Development Converting streams
I have a Stream which is Stream stream = httpWebResponse.GetResponseStream(); I need to convert this System.IO.Stream into System.IO.MemoryStream. How can I do that with C# 2003 The data that a server returns is an image. I would do byte [] data = webClient.DownloadData(uri); but for certain reasons I have to use HttpWebRequest/Response. Thank you. You can't convert it from one to the other .. you would read data from that stream into a memory stream. Although I am curious why you need to read it into a memory stream as opposed to using the response stream directly I can write code such as .. public void DoSomething(Stream s) ...Show All
Visual Studio Express Editions MSDE 2000 access from C# Express
Hello all, I would like to access an existing MSDE 2000 database from C# Express, but the wizard will only connect to the SQL 2005 Express instance. Is there an easy way to do this Thanks The express products are limited to only connect using the wizards to cirtain database systems, and MSDE is not one of them. But you can use the system to connect to the MSDE system. To do this you will have to put together your own data layer and expose it as objects, then you can use the wizards to bind to the data objects you have exposed. Now I know that this is not a web forum, but if you look at the personal web site sta ...Show All
Visual C# interface
Hi i have Visual C#. Just wondering: i have made an interface for a program launcher, but i do not know how to to link the buttons with the program. can someone help please. Thanks in advance Martin Hi, if you made your interface in the VS' designer then a double click on the button will create an event handler that will run whenever you press the button when running the application. You just have to insert the code in that method (event handler created). You can also go manually to the event properties and add the event handler's name and VS will automatically create one with the name yo ...Show All
.NET Development ??? MethodInfo Props are Wrong (or Docs are Wrong) ???
Hi everyone, I hope you can comment on this -- I'm pretty darned sure that either some of the MethodInfo properties are wrong or the Microsoft documentation is wrong. Please have a look at the program below. It attempts to print out the accessibility (i.e., "visibility") of each method in the class. I've included the program along with its output. The Microsoft documentation for MethodInfo tells us that the IsAssembly property "Gets a value indicating whether this method can be called by other classes in the same assembly." Okay, great. Public methods can certainly be called from other classes in the same assemb ...Show All
Software Development for Windows Vista State machine workflow design questions
I have a few starter questions here. Pardon my ignorance as I come upto speed on some of these. Also let me know if any of these are really off the mark and if I gotto rethink some of our requirements: I would like to be able to compose a state m/c WF dynamically... I presume it would be a validation error to not to have the ‘TargetStateName’ property on a SetState activity set...I am just trying to imagine if one just (dynamically) composes a state machine workflow with a couple of State activities leaving out the state transitions given that they anyway would be determined/changed dynamically. If this is a no-no then I guess ...Show All
Game Technologies: DirectX, XNA, XACT, etc. using Microsoft.Samples.DirectX.UtilityToolkit
I just started working again on a game I had been writing and abandoned for quite a while. I have managed to get it working with the latest release of the SDK but now I have run into a problem trying to add a new UI. Im am trying to add some of the the controls from the customUI tutorial that came with the SDK . I added "using Microsoft.Samples.DirectX.UtilityToolkit;" to my code but of course the compiler didn't reconize Microsoft.Samples... After some googling I realized I had to include the files from "Microsoft DirectX 9.0 SDK (October 2005)\Samples\Managed\Common" in my project. the problem is when I do this and try to compile I ge ...Show All
SQL Server Visual Studio Command Prompt
Hi, I searched the forum and found nothing useful for my case. I also posted a reply to a partly (for me) answered question about the subject and got no reply. So I post my question again hoping for the best. I use the 2005 Express versions of Visual Basic, Visual Web Developer and SQL Server. As far as I know, those products are part of Visual Studio 2005 Express. But they are downloaded separately and therefore, there is no Visual Studio option in the Start menu and no Command prompt either. How do I create a strong-name key pair with the following command: sn -k SampleKey.snk I use Windows XP Pro SP2. Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DirectInput not recognizing wired Xbox 360 controller for Force Feedback
I want to implement force feedback in a game I'm working on. The controller is reocignized fine without checking for force feedback. So if I write... //create force feedback capable joystick device. foreach(DeviceInstance di in Manager.GetDevices( DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly)) { joystick = new Device(di.InstanceGuid); break; } if (joystick == null) { //Throw exception if joystick not found. throw new Exception("No joystick that supports forced feedback found."); } It recognizes the joystick, but if I modify that foreach statement to... //create force feedback capable joystick device. foreach(Devi ...Show All
Windows Forms Remoting or webservices or other
Hi all, i need to write a application but i'm in doubt wich Data-technology to use. 1. The app (winform) is running localy on users computer 2. The data that should be loaded in on a intranet environment. 3. The users are locaded al over the country and have a intranet connection 4. the amound of users is between 70-100 5. The data is changing almost continously Remco Hi Remco, The architecture of this project would depend on the data integrity requirements. Is it important that each client has the latest and greatest information as it is updated at the data store If each client has to have ...Show All
Visual Basic Relase the Fix for Visual Basic Compiler Error &H8013141e&
Hi all i just want to know when is going to be released the fix for visual basic compiler error &H8013141e& this is already reported in the microsoft productfeedback site. i think this is a very urgent patch that must be released asap and please do not repond that i should go back to vs.2003 because i have lots of code developed in VS 2005 to framework 2.0 .. JSB PS: this error pisses me of, i need to restart VS.IDE every 5 minutes. i think this is too bad for a recent relesase product ( its full of Bugs ). Hi, João, This is a good opportunity (in the ...Show All
Visual Basic StreamReader end of file not working
I have a Visual Basic .net application that reads a flat file using StreamReader. When the end of the file is reached it should be exit the Do Loop and execut ethe next statement. What I'm experincing is an exit of my application. I've posted the code below: Try Dim DismissalFile As StreamReader = New StreamReader(FileLocation) DismissalRecord = DismissalFile.ReadLine() DismissalCaseNumber = DismissalRecord.Substring(2286, 30).Trim BuildSelect(DismissalCaseNumber) Do Until DismissalRecord Is Nothing DismissalRecord = DismissalFile.ReadLine() DismissalCaseNumber = DismissalRecord.Substring(2286, 30 ...Show All
Visual C# Design Issue
I have the following forms and the MDIparent can open 3 different types of child forms. MDImain form. ChildForm1 ChildForm2 ChildForm3 So the MDI has to transfer fileNew() or fileOpen() to each childform since the child knows best how to handle this. Should I use a property to trigger this event from the MDi fileNew_click event Something like ChildForm1 childform = new ChildForm1; childform.MdiParent = this ; childform.setNewFlag(true); <<===== trigger event in child which can invoke &nb ...Show All
Visual Studio Team System Migrate from Seapine Test Track
My company is moving towards using VSTS but we need to migrate from our existing bug tracker, Seaping Test Track. Are there any utilities to perform the migration We don't provide any converter for Seapine out of the box, but perhaps a third party will. You could create your own using the Work Item Tracking client API. You can find documentation in the Visual Studio SDK at https://affiliate.vsipmembers.com/ . The current release is the October SDK, and that will be updated within the next week or so. Buck ...Show All
Visual C++ MS FlexGrid : How to merge 4-cells to a single cell?
Hi All, I am using MS FlexGrid with VC++ 6.0(MFC). I want to know how to merge these four cells a a a a to this single cell in the FlexGrid. a TIA, Regards, Jahfer V P oops, I just kinda did it in my head... Theoretically, It should definitely work... I tested it on VB6, VC++ 6, VC++ 2005 Express... and sad to say that it definitely wouldnt work... It only works on Columns or Rows but not the both! I also tinkered with DataGrid (which probably was the closest FlexGrid control in .net) I'm not quite sure on this, but i think it does not support merging cells... I suggest tha ...Show All
Software Development for Windows Vista Bug in RuleSet Editor/Parser
When building a RuleSet from within Visual Studio I'm getting an error when trying to call a method on my Workflow. I'm validating an incoming message, and need to call a method which adds additional information to the incoming message and validates various business rules. When I add a rule action which looks like: this.AddBrokenRule(this.Request.Employee, "First Name is Required", "FirstName") I get the following error from the rule designer: Error Parsing the Action(s): Object reference not set to an instance of an object. The error arises when there are overloaded versions of the associated function availab ...Show All
