Answer Questions
Toby Sharp Adding a new line in a richtextbox
it just doesn't work, I went over all the code in this forum and none of them worked. I may have did something wrong, we will see here is my code: rtbMain.Lines = new string [] { DateTime .Now.ToString() + ": " + Encoding .ASCII.GetString(byteResponse)+ "\n" }; rtbMain.SelectionStart = 0; rtbMain.SelectionLength = DateTime .Now.ToString().Length; rtbMain.SelectionColor = Color .Red; why it overwrites the next time I have to run this code the previous line how can I do Add to the following line thanks the reason its not working is because you are adding new lines (string[]) every time you press a button or wherever the code is being executed, and as a ...Show All
armandino ListView AllowColumnReorder
I would like to enable the AllowColumnReorder property in a ListView control, but cannot determine whether there is a way to do either of the following: 1.) Either disable moving certain columns or receive an event prior to column move to prevent it form being moved. (I would like to keep column 0 always as column 0) Would also like to have some control over where a column is moved to. 2.) Receive an event after the column is moved (with details on where it is moved), or be able to query/set the column order. I need this for 2 reasons - a.) I need to be able to determine the column based on the mouse click location, only way I know how is based on column width and order; b.) I would like to save & restore re-arranged columns. ...Show All
Ken_Bussell dll.config file
In my Visual Studio 2005 VB Solution I have three projects. A Windows Service, a Class Library, and a Setup and Deployment Project I have a config file for my Class Library project, but I cannot seem to properly get it to be included in the setup without either manually including the file or by including the source files and then applying a filter to it so that only the config file is included. If I set the App.Config file to be "Content" and then add the content, it adds the file as App.dll.Config instead of <Project>.dll.config. (It actually seems to work correctly using the Source Files option, however I am concerned that if the dll project is expanded, some source files might accidentally get added to the setup proje ...Show All
S&#233;bastien Nunes Gridview elements
I have a gridview, and i would like in the code, when i check the NO radio button for it to display a text box in the next column. I am new at this and i do not know exactly how to do it. I set up a postback event on the radio buttons. I would appreciate your help Thank you Shot in the dark here, but instead of checking for it constantly, why not just have two events, one when your data is loaded, and one when the radio button changes, and if the new value is the right value, then you can do like myCell.OwningRow.Cells[column_number_of_textbox].Visible = true Does visible work right on a per-cell basis Thanks for your reply, I already have the radio buttons ...Show All
poita Winform for GUI developmwnt
Hi, I want to make use of Winform (part of Microsoft Visual studio 2005) for developing a UI layer for my application. I have following constraint- I want to distibute my application to different users whose desktop does not contain .NET runtime environment I want to come up with Rich UI layer that makes use of C++ language as my core application to be integrated with UI layer is in C++. Can I make use of Winform (extended version of MFC librbary) to do this without bundling any .NET component to my application. Your early reply to this is highly appreciated. Thanks ...Show All
Jive Dadson Helpprovider problem?
I made a .htm hlep file. I open it with the help provider. I have 6 links in the .htm file that jump to somewhere in that file. I have tabpages on my form, when I press F1 on tabpage 2 i wont to open one link in helo file, and when I press F1 on tabpage3 I wont to open another link. Is there a way to do that I tried something with the helpkeyword but it always opens the start of the .htm page. links are: file:///D:/OdMomka/Diplomski/Pomoc/POMOC%20ZA%20PROGRAM.htm#_Toc158655547 file:///D:/OdMomka/Diplomski/Pomoc/POMOC%20ZA%20PROGRAM.htm#_Toc158655548 file:///D:/OdMomka/Diplomski/Pomoc/POMOC%20ZA%20PROGRAM.htm#_Toc158655549 file:///D:/OdMomka/Diplomski/Pomoc/POMOC%20ZA%20PROGRAM.htm#_Toc158655550 file:///D:/OdMomka/Dip ...Show All
shmulik_segal Toolbar RTL
My toolbar is inside a Forms.Panel. How do I make the toolbar RTL I want the icons to start at the right side. I tried using the following code on the panel, but the text on the icon got flipped as well.. protected override CreateParams CreateParams { get { CreateParams CP; CP = base.CreateParams; if ( m_mirrored ) { CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL; } return CP; } } If I include WS_EX_NOINHERITLAYOUT to ExStyle, the toolbar won't even start on the right side. Please advice. Thanks. I have a simple workaround. You can flip your image in an image editor and give it to the toolbar control. I would also advise you to use the ToolStrip control. ...Show All
Gagandeep Singh Send keystroke to another application
I am writing a little tool for a friend who works behind the scenes for TV shows like Criminal Minds and CSI. He needs an application that simply sends a keystroke to the foreground window. Do you know of an API that can accomplish this task that can be used in c# of vb.net Thank you in advance, Steve Bostedor Bozteck Software http://www.bozteck.com well there should be an example there :-) a typical one: SendKeys.SendWait("A") 'would send the letter A to whatever application is currently focused Maybe I'm having a brain dumb evening but can you please point me to an example of how that can be used to send a keystroke to another application Thank you! ...Show All
Jan Byvaly Make an application runs on WindowsForm
i'll try be more clear as possible and in advance i thank any kind of help. Well, i'm making a simple directX application based on my studies on this book Introduction to 3D Game Programing with DirectX 9.0 , the problem it's how i make the scene created runs inside a windows form to be more clear, i'm trying to render my scene inside a form but don't know how call a specific function to do that. Another thing, the code i'm posting here create by itself a window and i know that to runs on windows form i'll need erase thoses line of code, 'cause that i needed know how do that using a windows form. I'm using native C++ language and the code of the program i trying to run is down below. Thanks for any help. ...Show All
ChrisHelt WebBrowser on a Thread throws InvalidCastException
Hi everyone, I have following piece of code: One class called Browser, which is a simple form with a WebBrowser component and few buttons. This class is inherited by Playing class. In the constructor of the Playing I have: toolStripButton6.Click += new EventHandler (toolStripButtonPlay_Click); mainWebBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler (mainWebBrowser_DocumentCompleted); mainWebBrowser.Navigating += new WebBrowserNavigatingEventHandler (mainWebBrowser_Navigating); The handlers for the events above are: void mainWebBrowser_Navigating( object sender, WebBrowserNavigatingEventArgs e) { documentDone = false ; } void mainWebBrowser_DocumentCompleted( ...Show All
zenox PLZ HELP! Deployment identity error when executing installer. TIA
Hi. Thanks for reading and also for helping me out! I created an app, signed, and publish on a 5.1 IIS. I can install the application from my computer, but when I tried to installed on a different computer the system always says: "The deployment identity at the deployment provider is not the same as the original deployment identity" The certficate I am using is a free code signing certificate from http://www.ascertia.com/ . VS 2005 accepted the certificate well. This is the error.log: PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM ...Show All
Paul Burg Highlight the cell with an error...
Hello everyone! I've got a DataGridView and when the user forgets to enter a value into a required field I would like that field to get focus when the error occours. Also if invalid data is entered I would like the invalid data to be marked (highlighted). Any ideas on how I could do this Right now I'm only showing a messagebox in the DataError event. Thanks in advance! -Martin For all those having errors with reentrant code, try using the BeginInvoke method before taking the action that causes the error. In my case, I was using the CellEndEdit method to send the edited cell value somewere and our framework forced a refresh of the UI in which I am doing stuff with the datagrid, which triggered an ...Show All
gifuran Problem somewhat solved
I'm running into this same problem: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=356806&SiteID=1 Databinding seems useless. The idea of the disconnected data model is a really difficult process, mainly because of relational databases. Many of my tables have identities, and if multiple people are hitting the database at once, there is no guarantee that the identity generated in your datagrid is going to be the same when you actually submit the in memory dataset to your database. This makes it a real pain to update related records. Can anyone shed some insight on complex databinding with identities and relationships Perhaps, someone has some good documentation on some methodologies used to create windows forms applicati ...Show All
Bakerboy60 Prepend new rows to DataGridView instead of append?
Just like the subject says, I'm looking for a method to prepend new rows to a data-bound datagridview instead of the default append. Thanks in advance for any advice. When you data-bind to a grid, you can only display rows from the datasource. So the solution is to add new rows to your datasource. Have you tried using DataGridView.Rows.Insert(index, row) This should work if you set index to zero I think. Hi, Is your problem solved Thank you, Bhanu. hello I have the same requirement, but your suggestion doesn't work with databound datagridview. Error msg - you cannot add rows to a bound datagridview. so whats the solution to this ...Show All
Sam Jost IList itemsByProduct = new ArrayList();
hi all, whats the use of declaration in c# IList itemsByProduct = new ArrayList(); can anybody explain me the technical specification and use of above declaration help me..... IList is an interface, and it is generally considered good practice to code to an interface rather than an implementation. This allows the internals of the method to be hidden from the user. Later, if it is discovered that another type of List would be better, the internal implementation can be chanced without the calling programs need to be aware of this change. Moreover, this thread is the same as http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1062544&SiteID=1 Please avoid posting a same question ...Show All
