Thanks for the response. I suppose I should have said no forum for the Visual C# IDE :). I have two drop down's on the menu bar with the following tool tip text: "Solution Configurations" and "Solution Platforms". The Configurations one seems like the right one but I can't findout. Both drop down's are disabled and I can't find out how to enable them. I should also add that this "Debug" issue only occurs in a project I imported into my solution and didn't write from the begining. All the other projects in my solution seem to generate debug code because when I use those modules I can actually use the debuger with them and I don't get he warning mentioned earlier. Thanks in advance.
Beringer
Posts
-
Setting Debugger Mode -
Setting Debugger ModeHello, I didn't see a forum specific for Visual C# so I am asking this question here. I am getting the following error when compiling: "The following module was built either with optimizations enabled or without debug information: myfile To debug this module, change its project build configuration to Debug mode..." I am using Visual C# 2005 Express and when I compare the build options tab under the project's properties to the options presented in the link below http://msdn2.microsoft.com/en-us/library/027febhz(VS.80).aspx[^] The build tab in Express doesn't have the "Configuration" list mentioned in the above link. Can someone point me in the right direction to configuring the build process in Express to allow "Debug Mode"? Thanks in advance, Eric
-
"Background Printing"Hello, I would like to do what I call background printing. What this means is the user clicks a print button or a link to print a document without acutally having the document visible. I have searched the site for this and haven't found a posting covering this. The only way I could think to make this happen would be to load the document in a hidden control and print from there. This seems kind of clunky and I was wondering if there was a more elegant approach. Thanks in advance, Eric
-
Designer IssuesHello, I have been making some custom controls and dialogs that utilize several assemblies that I have created. When I try to use the Desinger to modify the dialogs/controls, I get an error that states the designer is unable to load "one or more of the requested types. Retrieve the LoaderExceptions property for more information." However, if I create the controls or open the dialogs in an application I don't have any problems. Does anybody have some suggestions as to why the Designer isn't able to load my objects but if I dynamically create them there is no issues? Thanks, Eric
-
Complier Error QuestionI get the following error when compiling some of the projects in my solution but not all. 'A strong-named assembly is required. (Exception from HRESULT: 0x80131044)' Can someone tell me what this means and provide some suggestions on how to resolve this? thanks, eric
-
Using in XMLCan the < and > characters be used in XML data? If so how are they written to not be confused as tags? Thanks Eric
-
Word's Table Control?Hello, I am looking for a way to get something similar to the tables that are seen in Word. I can draw a table onto a RichTextBox control using the appropriate RTF syntax, but what I would ultimately like is the ability to resize columns and rows using the mouse. Does anybody know how this is done? Is there a third party control that allows this to happen? I suppose you could trap mouse movement and such, but this seems really hard, because how would you even know where the table is within the textbox? Thanks in advance, Eric
-
RTF tablesI once came across an article posted in Code Project that explained how to programatically insert tables into RTF. I wasn't smart enought to bookmark this and now can't find it. Does someone remember a similar article and can provide a link? Thanks, Eric
-
Links in RichTextBoxI know this might be a stretch but I'm trying to insert an image into a RichTextBox and make it a link. I currently insert an image using the methods presented by, Khendys Gordon: www.codeproject.com/cs/miscctrl/csexrichtextbox.asp and am successful in doing so. But when I actually go to set the inserted image string as a link, the image isn't displayed. So I'm begining to think it isn't possible but thought I would ask others. Thanks, Eric
-
Printing questionI'm new to the printing aspects of .Net and have a question. I have implemented the basic printing capabilities and have been able to direct a RichTextBox to a printer. I figured that when printing occured that same series of "drawing" routines called to display the text in the TextBox would be called again when drawing on the graphics object for the printer. However, what I have found is that my drawing methods are not called again to draw on the printer's graphics object (at least I assume so since the debugger dosen't break on my drawing code when printing). So my question is how is printing done? Does .Net take the control's output and format it on the graphics object without actually calling my drawing code? If so, is there a way to choose what parts of the TextBox get printed or for that matter reformat the appearance of the text to make it look different than "what you see"? Thanks, Eric
-
RichTextBox and hidden TextI don't have the ability to make an MFC program, but I will definately let Microsoft support know. Thanks for your help. At least now I don't feel stupid! Eric
-
RichTextBox and hidden TextOk, thanks again for the input. I have looked at what is going on and still believe I'm doing things right (probably wrong since it doesn't work, but oh well!). I created a little test app to do what you did and was able to create the issue I'm having. If you don't mind please try: Create an form with richTextBox1 and button1 objects. Use the code below:
private void button1_Click(object sender, EventArgs e) { int index = this.richTextBox1.Find("hidden2", RichTextBoxFinds.MatchCase | RichTextBoxFinds.NoHighlight); this.richTextBox1.Select(0, index); int temp = this.richTextBox1.SelectionStart; int temp2 = this.richTextBox1.SelectionLength; this.richTextBox1.SelectedText = "Eric"; } private void Form1_Load(object sender, EventArgs e) { this.richTextBox1.SelectedRtf = @"{\rtf1\ansi te\v hidden1\v0st1\par}"; this.richTextBox1.SelectedRtf = @"{\rtf1\ansi te\v hidden2\v0st2\par}"; //this.richTextBox1.SelectedRtf = @"{\rtf1\ansi\v hidden1\v0test1\par}"; //this.richTextBox1.SelectedRtf = @"{\rtf1\ansi\v hidden2\v0test2\par}"; }
Now if you run the app with the first two lines of SelectedRtf statements (basically like your example) and run the app the selection process in the button click method works well; the resulting text in the RTB is: "Ericst2". Now if you use the other two lines of SelectedRtf statemsnt (basically what I'm doing) you will find the Select doesn't work. And behaves like I mentioned and the RTB shows: "test1Erictest2." Note the SelectionStart and SelectionLength properties don't match what was sent to Select. Thanks, Eric -
RichTextBox and hidden TextThanks for clearing this up. I won't be able to try this out until later. I'll let you know if I'm successful. Thanks Eric
-
RichTextBox and hidden TextI insert the Rtf string as follows at the current position of selection. textBox.SelectedRtf = "{\rtf1\ansi\v " + text + "\v0}" I also am aware that the Text property will have the hidden text in it. The Find method returns the correct index. The problem occurs when I try to move the selection to the location returned by Find and set the length of selected text. Please let me know if the above insertion is not valid. Thanks for your help, Eric
-
RichTextBox and hidden TextEven more strange behavior: It seems that the Select method and setting of SelectionStart/SelectionLength will result in: SelectionStart = SelectionStart + SelectionLength and SelectionLength = 0 This appears to be the case no matter what the values are and the settings will occur after both properties have been set. Thanks, Eric
-
RichTextBox and hidden TextI have investigated further and noted the following behavior: If I set the SelectionStart property to 45 it will stay at 45. However, when I set the SelectionLength property to say 0; then the problem arises. So it seems you can set one of the properties and it will store properly but when you set the second one the "switch" occurs. Thanks, Eric
-
RichTextBox and hidden TextI have come across an issue using the RichTextBox control and using hidden text. I have programatically placed hidden text in the control and then attempt to search for that text using the Find method. The indexes it returns are correct. However, when I call Select (or even set the SelectionStart and SelectionLength properties) to select some text that includes the hidden text this fails to work properly. The actual behavior is to reverse SelectionStart and SelectionLength. For example: this.textBox.SelectionStart = 45; this.textBox.SelectionLength = 0; -or- this.textBox.Selection(45, 0); Now look at the property values in the debuger and you will see SelectionStart = 0 and SelectionLength = 45. If I remove hidden text from the control everything works fine. Has anybody experienced this behavior? Just to be sure I wasn't messing with the values somewhere else, I commented out all other Selection calls and setting of the properties from my code and still had the issue. Thanks Eric
-
HashcodesThanks for all the suggestions. Much appreciated. Eric
-
HashcodesDoes anybody know a good hashcode algorithm to generate unique codes? What if you have two objects and their properties are equal? How would a hashcode be unique then? Here, I am making an assumption that the hashcode is created using the properties of the control. So I guess the real question is: Is there a way to generate a unique hashcode that doesn't rely on the properties of the object? Thanks Eric
-
Strings and InteropThanks Andy, this seems to work! Eric