Answer Questions
JoelErik DataBinding to TextBoxes
I have been tring for weeks to figure out how to do this and am failing and about ready to give up and find another programming language.... What I am doing seams so simple. I have a winform that I want to display all the data in text boxes. the database is in Access and has at least 4 tables in it. The tables are related using an ID number in each table. The child tables also has a column that stores a text code that defines which set of text boxes the rows is storing data about. The code below is an attempt to make this work. It works in that the peogram does not come up with an error but the text boxes doesn't display the data in the different rows. All the textboxes display the same data. Can anyone help me Is there a better ...Show All
marco.beninca Remove blank lines from a textbox
Blank lines in a textbox can be: A series of spaces followed by a carriage return OR A carriage return OR A line filled with tabs How can I remove all blank lines from the text entered in my textbox Easy to do with Regular Expressions: // Remove trailing blanks textBox1.Text = Regex.Replace(textBox1.Text, "\\s+\r\n", "\r\n"); // Remove duplicate end-of-lines textBox1.Text = Regex.Replace(textBox1.Text, "\r\n\r\n", "\r\n"); The 1st one replaces one or more (+) white space characters (\s) followed by a end-of-line (\r\n) by end-of line. The 2nd one replaces a double end-of-line with a single end-of-line. not quite. I guess you could go through e ...Show All
ReLoad Looking for good setup system...
I authored an application and need to create a setup program for it so it can install on peoples computers. I tried to use the publish feature that came with Visual Studio 2005. It either seems stripped down or something perhaps I'm doing wrong. I can't find out were to tell it what custom user files I want installed and where to put them. Is the built in publish feature that comes with Visual Studio 2005 ok or is there a better solution Thanks for help, Devin in the full VS (non express) you have the publish but also the full setup and deployment project, which is a proper installer if you like, which automatically downloads the .NET Framework for you, installs it and continues on with t ...Show All
ShrikantBijapurkar How to trap keyboard event. like Esc and Delete etc.
in my case , i want the same ability like in VS IDE which is when on design surface, select a control and then press ESC ,the Selection Control will turn to it's parent control. i trying to add the messageFilter to handle the key event . but it will trap all key events in the application. Apperently this not meet my requirement, i just want the design surface handle the message. i have tried to handle Message Loop as well it doesn't work ; for example: System.Windows.Forms.Application.AddMessageFilter(_msgFilter); ...... public class MessageFilter:IMessageFilter { private BaseForm _owner; private const int WM_KEYDOWN = 0x0100; private const int WM_RBUTTONDOWN = 0x0204; public MessageFilter(BaseForm owner) { this._o ...Show All
SLang Help understanding NotifyIcon
Hi, I have written a standalone application that uses a 'notifyIcon' that displays an icon in the windows toolbar. Users can minimize the window. The icon remains visible and can be double clicked to make the window visible again. The application does various processes/threads via separate threads that includes allowing DialogResult boxes to appear on screen (without displaying the main application) so the user can decide the direction of each thread/process. One of the processes/threads requires making the main application window to be visible (so the user can enter a password), the application is then hidden again upon completion of this process/thread. All this works fine except: 1. I sometimes have more than one notifyIc ...Show All
zybernau DataGridView ComboBox column - formatted items
As an example, in a regular ComboBox, I can catch the Formatting event and set e.value to a reformatted string. Is it possible to do the same thing in a DataGridView ComboBox The column is similar in concept to a list of IP addresses, where the underlying value is a decimal but I want to display it MSB-NextByte-LSB 001-022-003. I have the code for formatting I just don't know how to fill the DGV ComboBox. Thanks, Roger You may try handle the DataGridView.CellFormatting event. ...Show All
Larry_t Progress through questions in math test
I am using windows forms and developing in managed C++. I am developing a simple math-test application. So what we have after the user pushes the start button, and the test is generated is: § An array with calculations § One time limit that is the same for all calculations Say we start with the first calculation at the beginning of the array (index 0). Suppose the user does nothing at all under the steps. This will happen in the following order: 1. The calculation is displayed and the time starts ticking 2. The time limit expires 3. It is indicated that the user have failed the task and the program stops and nothing happens. Now let’s look at step 3; at this point the user has misse ...Show All
Jb4e How to change a sql string "on the fly"
I am using vb.net 2.0 visual studio professionel. In my dataset i have a sql command that look like this: SELECT jumboId, nr, navn, tekst, aar, dato, pic FROM tblJumbo ORDER BY nr created with the TableAdaptor configuration wizard. I wonder, is it possible to change that string, or add a new one, when the program is running It is called like this: .TblJumboTableAdapter.Fill(.JumboDataSet.tblJumbo) If i want to change the select command to: SELECT jumboId, nr, navn, tekst, aar, dato, pic FROM tblJumbo WHERE nr = 2 ORDER BY nr (This is only a simplified eksample, the real one is much more complicated). The string is depending of the users choise. Anybody know how to do this Maybe i am blind, i just can seem to ...Show All
waheyluggage Incorrect Serialization of Collection property in IExtenderProvider
I have recently been playing with IExtenderProvider trying to implement a Collection Property and came upon this curious scenario: If I set up a property to return a Component Array the code is correctly serialized as follows: \\\ this.foo1.SetBar(this.button1, new FooBarExtension.FooBar[] { this.fooBar1}); /// If, however, I change the return type to a Collection the Collection is incorrectly serialized as a property of the component which is extended and, therefore, the IDE throws an error stating that the property does not exist for this component: \\\ this.button1.BarCollection.AddRange(new FooBarExtension.FooBar[]{ this.fooBar2}); /// Manually correcting it as follows results in the correct behaviour: \\\ this ...Show All
CompanyProfile Bug in VS.NET 2003?
Ok I had some time to make a sample project to demonstrate what I feel is a bug. Either that or I am doing something wrong here. http://www.myshack.net/fotty/VSBugSLN.zip Here is a link to a simple windows form app project and class library project (both part of same solution) Zip contains only the uncompiled project files. the class library contains 1 class which extends to textbox class (just makes the font red, this is just to illustrate the fact that its a class inheriting from a control) the windows forms app contains just 1 form, and references the class library project. Open the project, and compile it in debug mode prior to viewing form1. This is because the class library DLL needs to be compiled before it can be used on the fo ...Show All
Andy Ho About FileSystemWatcher
hi to all.. my question is about the style of work of a FileSystemWatcher.. i mean how it does work when only one or all of the files have changed and for example while i am watching 50 .doc files in a folder and 20 of them are changed by different users how can i do some changes on only the changed files. if using a for loop how can i determine the number of the changed files. how can i do that yes this clears some doubts but what if i want to do different actions on each of change types.. or for each of the files .. for example if i wanna watch all types of files.. with Filter="*.*" then then how will i determine whther the changed file is a .txt file or a .pdf file.. ...Show All
RyGiL c# Insert Text into Textbox
I have a series of textboxes on a Windows Form and a Series of buttons aswell. What I am trying to achieve sounds quite simple but I cannot figure out how to do it. Basically all Im trying to achieve is each button has some predefined text associated with it and when the user clicks the button, it inserts that text into the textbox which has the focus. The problem with this is that when you click on the button you lose the focus from the Textbox. The only way I have figured out is to save which control has focus before the button is clicked. This works but when you have 32 textboxes on a form, surely there is a better way than creating an On_Enter Method or similar to set the value of the Control which needs the text. Any help would be ...Show All
Trev72 How can I drag selected text from a textbox control
When I select text in a textbox control, then click on the text to initiate a drag with the mouse, the selected text immediately dissapears (the selectedtext is set to nothing even before the MouseDown event), so that the following line of code in the MouseDown event, TextBox.DoDragDrop(TextBox.SelectedText, DragDropEffects.Copy Or DragDropEffects.Move) results in nothing at all being dragged. The RichTextBox behaves very differently: when text is selected, when I click on selected text in a RichTextBox control, it remains selected until the mouse button is released. How can I cause the Textbox control to behave in a similar way There are times when I want to drag only a portion of the text in the textbox control, not all ...Show All
Fatalerr combobox autocomplete on double click
using vb2005 i have turned on autocomplete on my comboboxes with SuggestAppend method. it all works ok, its just that i'd like to have the suggestappend window pop up if i double click on the blank area on the combobox. much like clicking on the down arrow, but im trying to mimic for example browser behavior when i double click on an entry form textbox and my history of typing appears (this happens in firefox for example). thanks try setting the DroppedDown property to true. Is this what you are after However this will show all the contents of the combobox, even if you are using the autocomplete feature. I am unsure as to how to do it the way Windows does somebody replied me on another forum sa ...Show All
Shalin Dalal Print Preview problem(Bug)
Hey, I have this code in the PrintDocument control under the PrintPage event: private void printDocument_PrintPage( object sender, PrintPageEventArgs e) { RtextboxUC thisrichtextbox = GetCurrentTextBox(); //Start printing text and store last letter... checkPrint = thisrichtextbox.Print(checkPrint, thisrichtextbox.TextBox.TextLength, e); //Check if there should be more pages if (checkPrint < thisrichtextbox.TextBox.TextLength) { e.HasMorePages = true ; } else { e.HasMorePages = false ; } } There are no errors, but when I test it on my program and click print preview...when it opens the PrintPreview dialog It shows the dialog that is telling you how many pages it is det ...Show All
