| Right-To-Left Alignment in AutoComplete |
|
 |
Index ‹ Windows Forms ‹ Windows Forms General
|
- Previous
- 1
- 2
- Windows Forms General PictureBox control question.
Is it possible to open a multipage Tiff file using the .net 2.0 PictureBox control If not cananyone reccomend a reliable ( and prefferably cheap ) 3rd party control that will
Any help is greatly appreciated!!!
- 3
- Windows Forms General RichtextBox - AllowDrop vs. EnableAutoDragDrop
I'm trying to implement drag and drop between a RichTextbox and formatted text in a Word document.
I have placed a System.Windows.Forms.Richtextbox on a VB.Net usercontrol, and am displaying it on an Actions Pane so that it is available in a Word document.
All documentation I have seen points to an AllowDrop property on a RichtextBox, but I am not seeing this property in the design time window for the control. (I can, however, set the .AllowDrop property to True when the form is loaded).
Confusing me further, I am seeing a design time property called EnableAutoDragDrop (w/little or no documentation on this one).
Can someone clear me up on the difference between the two, and which one would be more useful for my purposes
Thank you
- 4
- Windows Forms Data Controls and Databinding Need DataGridView Read/Write Example ComboBoxVB2005, SQL Server 2000
The MS supplied 101 sample DataGridView ComboBoxColumn example is read only which is kinda dumb since I'm not sure when one would ever need a read only dropdown.
Has anyone seen a KISS example of connecting to a SQL Server 2000 table (spmething like the PUBS DB, authors table) using a DataGridView with a combo, say on the State field Need to see something that does not use the DataSource wizard objects.
In general: Is it possible to bind to a dataset using the auto generated columns and then change a column type to Combo Or does one have to construct all columns manually if any are other than the auto generated type
TIA
- 5
- 6
- Windows Forms General Switching between Console application and Windows Forms applicationsI was hoping to write a single application that can behave as Console application if specific run parameters are specified and behave as Windows Forms application otherwise (of course without the Console).
For example: public static void main(string[] args) { if(//check if args has specific run params) { //do stuff Console.WriteLine(//results); return; } else { //Show nice form and all that } }
Couldn't find any pointers as to how to achieve this.
Any pointers
Mad.Earth
- 7
- 8
- Windows Forms Data Controls and Databinding combobox selectedvalue vs text question
Is there one method for getting a value in a comboxbox (DropDownStyle set to DropDown) regardless of whether the user entered or selected a value. My combobox is initially populated with a datatable and has a Value and Display member. Since a user can enter thier own value, it would not have a ValueMember, therefore SelectedValue fails. It seems I may have to test the SelectedValue and the Text properties for both validation and saving the data. I was hoping there would be an easier way.
Also, I just noticed that I may not be able to use the DataBinding properties from my bindingsource because if I bind using the SelectedValue, if the value isn't in the list then it doesn't show up. If I use the Text, everything works but I can't leave the control, let alone close the form. It seems to get hung.
- 9
- 10
- Windows Forms Data Controls and Databinding Problem with RowChanging event
Hi,
if have a DataSet (SQLExpress) whith 2 Tables. On one table I add a RowChanging event handler. When I add a record in a boud datagridview then an exception occures in the handler. (After changing the postion in the DGV the event is fired). Here my handler:
| | void PCs_RowChanging(object sender, DataRowChangeEventArgs e) { if (PCsBindingSource.IsBindingSuspended) { return; } try { MessageBox.Show(e.Action.ToString()); } catch(Exception eX) { MessageBox.Show(eX.Message); } } |
I get and "Index out of range" exception and my DGV is a red rectangle with red lines across it. After the exception I can see my MessageBox telling "Add". For changes the things work fine - but the Add makes problems if I show the Messgebox - if I do nothing (comment out the messagebox)- no problems occure! The error comes up even if I only call MessageBox.Show("Hello");
Here is the stacktrace of the error:
************** Exception Text ************** System.IndexOutOfRangeException: Index 2 does not have a value. at System.Windows.Forms.CurrencyManager.get_Item(Int32 index) at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetError(Int32 rowIndex) at System.Windows.Forms.DataGridViewRow.GetErrorText(Int32 rowIndex) at System.Windows.Forms.DataGridViewRow.Paint(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, Int32 rowIndex, DataGridViewElementStates rowState, Boolean isFirstDisplayedRow, Boolean isLastVisibleRow) at System.Windows.Forms.DataGridView.PaintRows(Graphics g, Rectangle boundingRect, Rectangle clipRect, Boolean singleHorizontalBorderAdded) at System.Windows.Forms.DataGridView.PaintGrid(Graphics g, Rectangle gridBounds, Rectangle clipRect, Boolean singleVerticalBorderAdded, Boolean singleHorizontalBorderAdded) at System.Windows.Forms.DataGridView.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.DataGridView.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Is this a bug - or do I miss something
Cheers
Manfred
- 11
- ClickOnce and Setup & Deployment Projects Licensing and User Counts
I distribute software that I write and would like to accomplish two things:
(1) Produce a 'license key' for the user, so they cannot copy the application from someone else and use it. Perhaps a key based on the server domain or IP address.
(2) In the App.config file put some encrypted key that indicates the number of users permitted. I will then compare this to the total number of users added to a Users table to manage the license restrictions. (I license based on number of users defined, not concurrent users).
Thanks.
- 12
- 13
- Windows Forms General Combobox.Text unexpected behavior (C#)(C#, VS 2005) I have a Combobox (free typing + preset options) that is
used to enter a name. On it's Validated Event I want to check if the
name already exists in the (Array)List. If it does, I want to change
the text of the combobox back to the old value. The code is something
like this:
string oldName =
ListOfNames[0]; string newName = myCombobox.Text; if(ListOfNames.Contains(newName) { MessageBox.Show("Name already exists in the list."); myCombobox.Text = oldName; } else { ListOfNames[0] = newName; }</code>
It doesn't work the way I want it to. When It
validates and the name already exists, the messagebox pops up, the name
is changed back, but quickly changed back again (newName &gt;
oldName &gt; newName). The oldName is not visible to the eye
because it is immideatly changed again. Then, when you validate again
(right after the first try) it works fine. Any help is
appreciated.
- 14
- 15
- Windows Forms General Switching between Console application and Windows Forms applicationsyI was hoping to write a single application that can behave as Console application if specific run parameters are specified and behave as Windows Forms application otherwise (of course without the Console).
For example: public static void main(string[] args) { if(//check if args has specific run params) { //do stuff Console.WriteLine(//results); return; } else { //Show nice form and all that } }
Couldn't find any pointers as to how to achieve this.
Any pointers
Mad.Earth
|
| Author |
Message |
ymwymw

|
Posted: Windows Forms General, Right-To-Left Alignment in AutoComplete |
Top |
I am using the autocomplete feature in a textbox, the textbox is set to display right-to-left, but the autocomplete aligns on the left side and not the right. (The form is also set to display right to left.)
Windows Forms25
|
| |
|
| |
 |
| |
 |
Index ‹ Windows Forms ‹ Windows Forms General |
- Next
- 1
- 2
- Windows Forms Data Controls and Databinding Problem with DataGrid column width
I am working on DataGrid (VS 2003) and I am having problem with width of the columns.
I have added the DataGridTableStyle and DataGridColumnStyles to the DataGrid for each column. I have adjusted the width of each of the columns so that the total width of the columns equals the width of the DataGrid. My main intension is not to leave any area on the DataGrid blank.
Everything was fine on my machine but when I ran that application on another machine, the columns were not occupying the entire DataGrid area.
How do I make it same on all the machines
I appreciate any help!
Thanks Basani
- 3
- Windows Forms General Hi!! is there any way in C# n visual stdio 2005 that we can...........
Hi!! is there any way in C# n visual stdio 2005 that we can...........
i want to replace the conventional look of windows forms to a bitmap customize look of my software......there fore is there any way that i can load a bitmap...and on that bitmap i load the "-" "x" the minimize buttons and cancels in a superb look......i hope u understand what i want.....again.....i want to replace the form look through a bitmap...and on that bitmap i want to paste button and take work of forms through it
thank u.//
- 4
- Windows Forms General Urgent: NullReferenceException on the RenderControl method of the new Treeview web server control
I get a NullReferenceException on the RenderControl method of the new Treeview web server control for ASP.NET version 2.0.
The exception message is: "Object reference not set to an instance of an object."
The stack trace is: "at System.Web.UI.WebControls.TreeView.GetImageUrl(Int32 index)\r\n at System.Web.UI.WebControls.TreeNode.Render(HtmlTextWriter writer, Int32 position, Boolean[] isLast, Boolean enabled)\r\n at System.Web.UI.WebControls.TreeView.RenderContents(HtmlTextWriter writer)\r\n at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at dmgTools.UserInterFace.Web_Controls.WebTabControl.RenderTabs() in C:\\Projects\\Source\\Framework\\UserInterface\\Web Controls\\WebTabControl\\WebTabControl.cs:line 310"
Other posts have suggested setting the SkipLinkText property of the Treeview to "". I have done this but it doesn't help. I found that setting the ShowExpandCollapse property to false lets me run the RenderControl method but I need it to be true so I can navigate through the child nodes. I tried setting the ExpandImageUrl and CollapseImageUrl properties and setting ImageSet="custom" but this didn't help. I have run out of ideas. Can someone please help (maybe someone from Microsoft) This is really urgent.
Thanks,
Lance
- 5
- Windows Forms Data Controls and Databinding About encoding.
I have a datagridview in which the column Quantity is binded to a dataset column of type decimal. When I use the software in Chinese or Japan window, I use the Chinese or Japanese input method(which I suppose produce characters of the corresponsing codepage) I type in a number using those codepage, but it is not accepted(treated as non-numberous character), how can I convert numberical character of those codepage to unicode so that the datagridview accepts
Thank in advance
- 6
- 7
- Windows Forms General Replace string
i have a string "12:12:2006" and i wanted to remove ":" in the string.
I tryed stringname.Replace(":","") but it dosen't work.Can any one help me in this.
- 8
- ClickOnce and Setup & Deployment Projects Setup Project, prerequisite set to .net 3.0 wil not build
If I set .Net 3.0 as a prerquisite in my setup project the project fails to build with the following errors.
Error 1 No 'PublicKey' or 'Hash' attribute specified for file 'NETFX30\Dotnetfx3.exe' in item '.NET Framework 3.0'. C:\Program Files\Microsoft Visual Studio 2005\MyProjects\SetupHpTool\SetupHpTool\SetupHpTool.vdproj SetupHpTool
Error 2 No 'PublicKey' or 'Hash' attribute specified for file 'NETFX30\Dotnetfx3_x64.exe' in item '.NET Framework 3.0'. C:\Program Files\Microsoft Visual Studio 2005\MyProjects\SetupHpTool\SetupHpTool\SetupHpTool.vdproj SetupHpTool
Error 4 General failure building bootstrapper C:\Program Files\Microsoft Visual Studio 2005\MyProjects\SetupHpTool\SetupHpTool\SetupHpTool.vdproj SetupHpTool
If I set the prerequisite to .Net 2.0 project works fine.
Does anyone know how to fix this please
- 9
- Windows Forms Data Controls and Databinding Nulls in bound data grids
I have got a DataGridView which is bound to my custom business object. When no value is entered into a column when a new row is added it sends a Null value down to my string property in the business layer. Therefore when I call the stored procedure to save the data it fails.
I can check in the code for the value being null and assigning it an empty string but I would rather do it using the binding properties. I have tried setting the following properties but this doesnt work:
column.DefaultCellStyle.DataSourceNullValue = DBNull.Value;
column.DefaultCellStyle.NullValue = "";
To summarise, all I want to do is that if no string is entered in a column then it passes a space to the bound business layer instead of a null.
Regards,
Richard.
- 10
- Windows Forms General MissingManifestResourceException in a form of another projectHi,
I have a C# solution with several projects in it, which contain an application each. One of the projects contains common classes. Now I have added a form to that common project which I need to use from multiple applications of the other projects. I can access the form's class through the correct namespace, and a project reference is added. Only I cannot instantiate the form because there's a runtime exception error in the ImageList creation of that form: MissingManifestResourceException in myImageList.ImageStream = (...) you know the line that C# generates here.
I've tried to include the other project's form.resx file by reference, which didn't help.
Is there any way at all to use forms from other projects of the same solution or do I have to copy the files around and keep them in sync manually
Any help is appreciated.
- 11
- 12
- Windows Forms General Help with new programI need help with a program I am intending to do. Using C# obviously.
This program will display messages every 30 minutes (for example), and disappear after a few seconds. The messages will be stored in some dedicate folder.
So, in order to do that, how do you: 1) convert the C# program to a .msi or .exe for installation 2) operate in the background, and displaying the program icon in the windows tray icon 3) pop-up the messages every 30 minutes and hide it after a few seconds 4) start the program when window starts
As you can see, i'm very new at C#, and have never done anything this complicated in C#. So, much help will be needed and appreciated. Thanks.
- 13
- Windows Forms Data Controls and Databinding done!
Hi!
I am using the DataGrid control in framework 1.1. What i need to do is add an additional column in the DataGrid which display the serial number for each row. This column(field) has no relation or value in the table i will bind the gird to, but will only be used for display puposes.
I have looked at How to dynamically number rows in a SELECT Transact-SQL statement. and also creating stored procedures that will create a new identity field and put that data into a temp table from which i can bind the grid. They dont however solve my problem.
Is there a simpler way of doing this
Any help would be appreciated.
thanks,
Rohan
- 14
- Windows Forms Data Controls and Databinding How to Fill 1st textboxcolumn of Datagrid...
hi,
In my application...I have a datagrid on my form.My datagrid contains a textcoxcolumn & a comboboxcolumn…so I want to know how I can put values in textbox column on form load event….
Say I have 5 rows & I want those 5 rows to have 5 strings in the textbox column. Strings are(string1, string2, string3, string4 & string5).
So how I can put it in that datagrids 1st textboxcolumn (in form load event ).
Thanks,
Vinay
- 15
|
|
|