RDMarkus's Q&A profile
Visual Studio Express Editions Text replace with File IO of binary/text data
Perhaps not the appropriate forum, but..... I have a need to replace text in a file with new text. The files may or may not be text files in the sense that there may not be "lines" and they may not contain printable characters. I tried the StreamReader and StreamWriter approach and the String.Replace method. It works well, except that not all the file contents gets preserved. Three bytes at the start of the file are omitted. These occur just before the CRLF characters. Can I read the file in a binary way and then use the equivalent to the String.Replace The input will no longer be a string Fisrtly, I posted this query before I started the application. It is now largely complete except for the handling of d ...Show All
Visual C# Denied access to my app!
Right in the middle of codeing, I suddenly can't access my app. What I mean to say is, I can open it, and I can enter code, but when I try to run or debug it, I get this error: Error 1 Unable to copy file "obj\Debug\GenTestInCsharp.exe" to "bin\Debug\GenTestInCsharp.exe". The process cannot access the file 'bin\Debug\GenTestInCsharp.exe' because it is being used by another process. GenTestInCsharp The problem is, there's nothing running that could be using this app. I've tried closing it and re-opening to see if that would correct/release it but it's still locked. I then closed Visual Studio down and restarted it and still get the same error. My last resort is to shut down my computer, but I'd rather like to be ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Placing Objects
Hi all, I want to place objects on my map. Is it better to use an object layer ( of my tilemap ) or place them by the coordinates (perhaps out of an arraylist)... please give me an advice.. thanks i want to know the best way.. to use a object layer (of my tile map) or place them by using coordinates sorry, is my first try and thats why i ask ...Show All
SQL Server two dimensional array using form designer
How can i create a two dimensional array within a form using the form designer. This is in visual c++ form creation using the form designer. I want to create a form with five 4 byte fields across and four rows going down. ...Show All
Software Development for Windows Vista OnKeyDown event problem in FreeformActivityDesigner
Hello. I'm working on a FlowChart example of Ramrajprabu Balasubramanian ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=579662&SiteID=1 ) I'm trying to override OnKeyDown of FlowDesigner (which inherits from FreeformActivityDesigner) My problem is that only few keys are intercepted. Only arrow keys, enter, page up, page down work OK. None other key is intercepted. Similar problem is described in post here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=682589&SiteID=1 Can anyone help I'm particularly looking for intercepting Delete key. Thank You Hi, Unfortunately this is a bug in Workflow Foundation. One possible workaround would be to have properties on the activities that are in the designer that could ...Show All
Visual Basic ComboBox and Messge
How do you pass a name from a ComboBox list to a variable and then give a message in a message box via a Select Case Statement i.e Case 1 - meesage 1 Case 2 - message 2 etc etc. Ta you don't need to store the item selected in a variable then based on that do a case statement. You can totally avoid this step and just get the Text chosen from the combobox and do your case statements. http://msdn.microsoft.com/library/default.asp url=/library/en-us/vblr7/html/vastmselectcase.asp Example: Select Case Me.theComboBox.Text Case " Bob " MessageBox.Show("Your name is Bob") Case " Jim " MessageBox.Show("Your name is Jim") end select you can of cour ...Show All
Visual Studio Express Editions Open Word.doc
Here's the code I use to open a word document, why does it lose all its formating ie Bold in word is just plain text in my program objWord = CreateObject("Word.Application") objDoc = objWord.Documents.Open(OFD1.FileName, , True, , , , , , , , , False) objDoc.Select() rtbText.Text = objWord.Selection.Text objDoc.Close() objWord.Quit() Now I could display that. Why couldn't you Obviously I'm not as clever as you Now that you have shown me here it is S= {\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}} {\colortbl ;\red0\green0\blue255;\red255\green0\blue0;} \viewkind4\uc1\pard\lang2057\i\f0\fs24 This \cf1 has\i0 been\cf0 \b writ ...Show All
SQL Server use of 'inserted' table (move data from a table to another AFTER INSERT)
Hi using: SQLServer 2000 I need to move some data from T1 to T2 (both with identical fields) as soon as a register is inserted in T1. The register might exist in T2, and after that the register should be removed from T1 (althoug this is not completely necessary). I have tried something like this but I keep getting the message: "Syntaxis error near reserved word SELECT". CREATE TRIGGER my_trigger ON T1 AFTER INSERT AS BEGIN DELETE FROM T2 WHERE KEY_COLUM = (SELECT KEY_COLUM FROM INSERTED) INSERT INTO T2 VALUES (SELECT * FROM INSERTED) DELETE FROM T1 WHERE KEY_COLUM = (SELECT KEY_COLUM FROM INSERTED) END Thanks in advance Mequetrefe: Please try changing: DELETE FROM T2 WHERE KEY_COLUM = (SE ...Show All
Windows Live Developer Forums Problems displaying custom emoticons...
(this problem happens to me both in Live and Msn Messenger 7.5) Recently I've been having problems displaying custom emoticons that people sent me - some custom emoticons work, while others show up as an empty space (i.e. image won't show up) and though I'm using a new PC right now, the same is happening. I think the same may be going for display pictures, some work and some don't. The only thing I can see that would be causing this is ZoneAlarm Security Suite, but I've enabled MSN Messenger to have full privileges and this is still happening. If it is not the privileges, does it have anything to do with blocked ports I'm also seeing other image display problems, such as in FirstClass (the client), if I view someone's resume, I cannot see ...Show All
Visual Basic How do I put line breaks in my email message using Stringbuilder?
Hello All, I am busy writing an application where i need to send email. I would rather use the computers default email application rather than go down the SMTP route. Towards this I found some code on MSDN kindly provided by Graham Wade: Dim myApp As New Process Dim theStringBuilder As New System.Text.StringBuilder() theStringBuilder.Append("mailto:") theStringBuilder.Append("&subject=my subject") theStringBuilder.Append("&body=my body message") myApp = System.Diagnostics.Process.Start(theStringBuilder.ToString()) This code works brilliantly, but.... I am finding it very dificult to put line breaks into the text when it transfers over. I have tried .appendline and vbCrLf but these seem to have no effe ...Show All
Visual C# Best external data storing
Good day, I'm almost not experienced with C#, and lately I have been doing the Absolute Beginners Tutorial with the RSS Reader thing ( url ). Anyway, the person who made these video's prefered Microsoft SQL Server Database File to store the data, which is indeed very handy to use. But after finishing my RSS Reader I found out no one else could use it simply because they don't have an SQL server running. I was quite surprised because I didn't even know there was one running on my PC, it seems VS did that all in the background. Actually it's quite stupid I didn't think of this earlier. :p Now my question is, what's actually the most regular way to store a database withouth having to run an SQL server in the background I could of course use f ...Show All
Windows Forms Changing border color of GroupBox
Is there any way to change the border color of GroupBox Thnx! Hi Zhi, Thank you so much for your kind help. Will you please tell me how to use this class Should I create a control project and build first with this class Please give me an example. I haven't done this kind of thing before! By the way, how do u format the code block in the forum when you post Regards! ...Show All
Software Development for Windows Vista Is it possible to exchange a running workflow for a different workflow?
Hello everybody! Let me explain my situation: I created an ASP.NET web-application which is based on a state machine workflow. When one of our customers is not satisfied with the default implementation of the workflow, I need to exchange the running workflow with a different workflow. The changes to the workflow are minimal, but they are required for the customer. Is it possible to exchange a workflow for a different one, even if it is already running and there are persisted workflow instances in the database If not, what can I do to accomplish this Ah! That's a nice concept, thanks! Does my workflow assembly need to be in the GAC or can it also be located in the "bin" fol ...Show All
.NET Development Error while building the following code
Below is first.il code.... I am compiling it with ilasm /nologo /quiet /debug first.il...... while compiling i m getting this error Error: Reference to undefined class 'System.Console' (token 0x01000003) Could not create output file, error code=0x80004005 .assembly Test1{} .class Test1 { .method public hidebysig static void Test() il managed { .entrypoint ldstr "Hello" call void System.Console::WriteLine(class System.String) ret } } I am not getting what's wrong in above programm..........can anybody please help me out........ Thanks reid for reply... But still it's giving the same error.......... have u tried compiling this............ I have tried ur program only but ...Show All
Visual Studio Express Editions how to save files
Hi! I have tried this code (from Spotty) for saving and opening files and it works perfectly with my program but i need to add more TextBoxes, one ComboBox, one RichTextBox (text and picture from paint). How can i solve the problem I'am useing WinXP and VB Express Grateful for answers. I.HJ Public Class Form1 Private Mod_strFilename As String = "" Private Sub BtnLoad_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnLoad.Click Dim ObjFileBrowser As New OpenFileDialog If ObjFileBrowser.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Dim str_Filename = ObjFileBrowser.FileName TextBox1.Text = My .Computer.FileSystem.Re ...Show All
