Answer Questions
o-t How to create the code into my own method but not InitializeComponent when add a my own compenent or control
I write a component and I want the code created in my method(void Create() ) how to archieve this I have a CollectionEditor derived from UITypeEditor, I also have class derived from component Then compile the project,there will be the component in the toolbox Then we can drag it from toolbox onto the winform Hello, May you explain more about what do you want to do ...Show All
rs12345 Help.ShowHelp locking up
I am having strange behavior using HTML help in an application... My application is an specialized editor, and when a user highlights text in the editor and then presses <F1>, I want to open up an HTML help file, to the appropriate topic. So my code on the form inside the event looks like this... Help.ShowHelp(Me, HelpFileLocation, HelpNavigator.KeywordIndex , SelectedText) It works great when there is only one topic in the help file's index for the selectedtext. When there is more than one topic for that keyword, an additional dialog opens entitled "Topics Found", which does display the multiple topics as expected. The problem is that this window (and now my application) are completely locked up, lea ...Show All
hvdtol use of DataGridViewCellCancelEventArgs on 2 grids causes a lock up
I have two datagrids on a form and they both use the DataGridViewCellCancelEventArgs To set the e.cancel to true if data valdiation fails, however if the focus is going from the grid to anything other than the other grid and the validation fails then setting e.cancel to true works fine however if focus would be going to the other datagrid then setting e.cancel will cause a lock up (infinite loop that is not traceable). Any ideas ...Show All
wish1267 Opening / Closing Forms
Hey guys, Really simply, how do you open forms when you click a button! ! (i.e. in VB its docmd.open 'Form'). I just want to click a button and it pop up another form i have designed. Thanks in advance Tom hehehe ... story of my life. :) Check your casing. It is case sensitive. Should it be FrmPassword Basically ive got 2 forms : frmFrontEnd and frmPassword. I want btn_1 to launch frmPassword from frmFrontEnd. I have: frmFrontEnd frmpassword = new frmFrontEnd(); frmpassword.ShowDialog(); This however, keeps opening frmFrontEnd... If I enter: frmFrontEnd frmpassword = new frmpassword(); frmpassword.ShowDialog(); i get a compile error: namespace ...Show All
RyuMaster Put a glass panel over form while processing?
Dear all What i would like to achieve is placing something like a glass panel over the form while is doing some processing and show a proress bar. Little something like that , which would informa the user that something is happening:) Any ideas or advice Is there any code examples Cheers Why not use another form rather than a panel. Set the opacity to 1%, give it the same text, size and location as the form doing the processing. You could also make it TopMost if you wanted to be really annoying. (1) 0x20 is WS_EX_TRANSPARENT (from C's "WinUser.h" file) (2) It should be cp.ExStyle |= 0x20; (ie use the OR operator rather than adding it.) ...Show All
Mr_White Fire events outside the form (KeyPress)
Hi, I need to know how can I be able to fire an event outside of my form. We all know that there are lots of events that are fired by some action of some control or the form, such as Form1_Load, Form1_KeyPress, Button1_Click, Timer1_Tick, etc..., but to be more specific I really needed to (sort of) fire the KeyPress event outside the form. Let me simplify this: Suppose I have a form with a textbox, and I have the Form1_KeyPress event to capture the keys I press within the form, and individually transforming them to different keys, by changing the content of the e.KeyChar value while the KeyPress event is running, thus changing its output. To put it simple, the program basically transforms the pressed keys into different ones. For examp ...Show All
John K&#228;ll&#233;n C# Form problem
I know you can open a window by using Form class. But this will give you a new window every time, which have its icon and title on the taskbar. So if i open three forms, this will give me three icons on the taskbar. But how can i open a new window without have its icon and title visible on the taskbar In other words, a seperate window but can not be clicked on the taskbar e.g., like the find and replace dialog in visual studio .net software, that is a seperate window to the main window, but can not be clicked to being activated on the taskbar. many thanks danny Danny, you can simply set the ShowInTaskbar property to false. HTH --mc that is the way to hid ...Show All
Gaurav Arora disabling click event while a process is running
I would like to start a new process (.exe application) from my form when a button is clicked. I dont want to get back to my form till the application exits. So I use waitforexit(). However if I click on the button in the form when the application is running, the click event is stored and when the application ends the event is processed and the application starts again. How do I get any click events that occurs on the form to be ignored when another application is running Don't use WaitForExit() but just set a boolean flag that the process is running. Ignore clicks while that flag is set. Implement the Process.Exited event to reset the flag back to False. Please yell if you need cod ...Show All
Lejing How to stop creating new row during sorting.
I have a datagridview, I found out when you click on a new row, then click on the header to perform a sorting, it will create a new row. If you do this multi. times, it will create many new rows. I wonder how to stop this happen ...Show All
lsb_lsb IE Favorites
I tried to restore a backup of my "IE Favorites" folder and now I can not view my favorites or add new links. I get "Unable to create folder, or access denied". I need help This group is for the development of windows forms applications, you will need to follow the support links for the windows xp system, you can get to this from the windows xp home page on Microsofts main site. On a side not, make sure that you have copied them to the right directory and that you have the correct permissions on the objects. You may have to go into the advanced options in the permissions section and take ownership of the files. ...Show All
Will Durning DataGridView DataBinding Events
I am having problem with DataGridView DataBinding. simply put, I set the DataSource of such grid to a DataTable in a form's constructor. and subscribe the grid's RowsAdded, RowsRemoved, DataBindingCompete, DataSourceChanged events. Here is sample codes public partial class FrmTest : Form { public FrmTest () { InitializeComponent(); dataGridView1.DataSource = someTable ; } private void dataGridView1_RowsAdded( object sender, DataGridViewRowsAddedEventArgs e) { System. Console .WriteLine( "Add " + e.RowCount.ToString()); } private void dataGridView1_RowsRemoved( object sender, DataGridViewRowsRemovedEventArgs e) { System. Console .WriteLine( & ...Show All
franziss Limit rows in datagridview
VS 2005 I want to limit the number of lines added in a gridview, can anyone show me the code and which event to place it. Thanks In advance When a user enters the add new row the DefaultValuesNeeded event fires. i did this dgvResult.DataSource = null; dgvResult.DataSource = patientBindingSource; this.patientTableAdapter.FillByTop10( this.hPMDataSet.patient ); problem persists ;( when i configure the query in design view, execute the query, the result only shows the 8 specified columns, however, in the dataset design view, when i right click on the query and select preview data, the result listed all the columns of the database, with only the 8 specified column ...Show All
cablehead Auto resize
How can I make to my application resize all components(or to adapt to the new size) automatically when I click maximize Thanks Check the Dock property of the controls... And maybe Anchor property is also what you want. ...Show All
Laurent67 Calls to the set and get methods of a property
hi, I've got a question about properties, and how / when their set and get methods are called. Imagine the following example : [TypeConverterAttribute(ExpandableObjectConverter::typeid)] public ref struct CVector3 { CVector3(void) { x = 0.0f; y = 0.0f; z = 0.0f; } CVector3(float X, float Y, float Z) { x = X; y = Y; z = Z; } property float x; property float y; property float z; }; public ref class CClass { public: CClass(void) { /* ... */ } property CVector3 ^ position { void set(CVector3 ^ value) { m_pNode->SetPosition(value->x, value->y, value->z); } CVector3 ^ get(void) { return(gcnew CVector3(m_pNode->GetPositionX(), ...Show All
Tridex Problems with a DataGridVew with a DataGridViewComboBoxColumn
My objective is that a field value in Column1, a DataGridViewTextBoxColumn, selects the items listed in Column2, a DataGridViewComboBoxColumn. Also, I have a datasetA with the fields (id_A, name_A) and another datasetB with the fields (id_B, id_A, name_B); so the field id_A selects the values in dataSetB. First, I have a DataGridView bound with a DataBindingSource linked to a DataSet, that is: TypeA_BindingSource.DataSource = dsDataSetA Also, I have another DataBindingSource linked to another Dataset: TypeB_BindingSource.DataSource = dsDataSetB and in the autogerenerated code I have dgv.AllowUserToAddRows = False dgv.AllowUserToDeleteRows = False dgv.AutoGenerateColumns = False dgv.ColumnHeadersHeightSizeMode = System.Windo ...Show All
