|
I have a usercontrol made of some labels. As soon as I add the usercontrol to a tabControlPage, all the fonts in the usercontrol are resized to whatever the font setting of the tabControlPage is.
How do I stop this?
|
|
|
|
|
Set the .Font property of the controls inside the container. You could do it dynamically with a loop at runtime if your willing to take the performance hit, or just set em manually in the designer.
|
|
|
|
|
Have sorted it out
UserControl has a property called 'AutoScaleMode'. Setting this to 'None' prevents the usercontrol from being resized when added to a container control.
|
|
|
|
|
hi ,
i am going to create a counter app, to count the number of pages the user printed, no matter where to print(for example from office or notepad or paint and... just print!)
is there any way? is there any unmannaged code?
|
|
|
|
|
|
but these didn't help me so much, i need sth like (PrintStart event) to handle!
|
|
|
|
|
They don't have any events, you're right about that. One possibility could be using WMI, but that's not so familiar to me. When I answered I was thinking if you could for example pause the queue and just let those jobs through which you have already recorded.
|
|
|
|
|
I am realy Confused
|
|
|
|
|
This may not be the best idea, but since you can pause the queue, you could leave it like that. When a new job is submitted to the queue, you have the time to gather the information from that job and after that you can release it. I don't know if it's possible but if the queue can be configured so that every new job is paused by default, then you could do the release per job. That would be more reliable.
|
|
|
|
|
Ok! i'll give it a try, thanks
|
|
|
|
|
No problem, but as I said, this may not be the best way, so don't bang your head against the wall for too long
|
|
|
|
|
but due to there is no event to handle, should i run and get the printer queue, in an infinite loop?
|
|
|
|
|
Perhaps you could build a service and use polling?. For example a timer with 1 second interval...
|
|
|
|
|
|
what?
|
|
|
|
|
I think those are the classes..
I are troll
|
|
|
|
|
|
I need to place into DataGridView columns with ComboBoxes, but i have to fill them(ComboBoxes in each Cell) with different datasources...
How can i do it?
ThanX.
|
|
|
|
|
By setting different datasource for each cell.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
No i try to do it... no effect...
Datasource for every cell conected with Column datasource, and when i cheange datasource for current cell all cells takes cheanges...
P.S. Sorry for English...
|
|
|
|
|
If you cast the cell of your combobox column as datagridviewcomboboxcell, then you will get a datasource property. Set it for each cell separately. It definitely works.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
|
This works for me.
this.dataGridView1.DataSource = dt1;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DataSource = dt2;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DisplayMember = "col1";
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DataSource = dt3;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DisplayMember = "col1";
It would be good if you can share some code.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
I need to place different Datasources into differents cells...
For Ex.
this.dataGridView1.DataSource = dt1;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DataSource = dt2;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[0].Cells[0]).DisplayMember = "col1";
((DataGridViewComboBoxCell)this.dataGridView1.Rows[1].Cells[0]).DataSource = dt3;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[1].Cells[0]).DisplayMember = "col2";
((DataGridViewComboBoxCell)this.dataGridView1.Rows[2].Cells[0]).DataSource = dt4;
((DataGridViewComboBoxCell)this.dataGridView1.Rows[2].Cells[0]).DisplayMember = "col3";
modified on Friday, January 16, 2009 12:16 PM
|
|
|
|
|
I made my own Column with combobox in it...
It works...
If smb whant to see sources, i'll publishing them...
|
|
|
|