Thanks man, it works!!! Jure
Tavbi
Posts
-
Focus previous TextBox -
Focus previous TextBoxHi, how can I simple focus previous textbox when up arrow key pressed. When down key pressed I use SendKeys.Send("{TAB}"). thanks, Jure
-
How to get previous focused control?Hi, I wannt to know how can I get previous focused control. My problem is when I click on panel then focus in textbox is lost. I have 5 textboxes and wannt set focus back to proper textbox. I also tried OnLeave of textbox to discover which control will get focus, but I have problem too. Any suggestion? Thank in advance, Jure
-
Print to POS Printer on serial portCan you tell me what can I do in my code?
SerialPort serialPort=new SerialPort("COM1",9600,Parity.None,8,StopBits.One); serialPort.Open(); serialPort.Encoding = Encoding.GetEncoding(852); serialPort.Write(stringToPrint); serialPort.Close();
Thank, Jure -
Print to POS Printer on serial portHi, I am not using any drivers for my printer because I don't use graphical printing. I send text directly to serial port.
SerialPort serialPort=new SerialPort("COM1",9600,Parity.None,8,StopBits.One); serialPort.Open(); serialPort.Encoding = Encoding.GetEncoding(852); serialPort.Write(stringToPrint); serialPort.Close();
So I must urgently install driver if I completely understand you. -
Print to POS Printer on serial portHi, I have an application where I print bills to POS printer connected to serial port COM1. How can I check if printer in turned on and printer status is ok. When I do serialPort.Write(myString) I do not get any error. How can I check printer or serial port status? Thank, Jure
-
Disable show pop-up window when F10 pressedProblem solved, thanks to Hans Passant. protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.F10) return true; return base.ProcessCmdKey(ref msg, keyData); }
-
Disable show pop-up window when F10 pressedI think it's the system menu.
-
Disable show pop-up window when F10 pressedWhen I press F10 and then up or down arrow key there appear a box with options Restore, Move, Size, Minimize, Maximize and Close. I think that comes from system, because many windows has similar box (like properties on desktop).
-
Disable show pop-up window when F10 pressedOps! I mean when key F10 pressed.
-
Disable show pop-up window when F10 pressedHi, is there any way to disable show pop-up window in top left corner on form when key pressed? Thanks, Jure
-
Can't focus TextBox on TabPageHi, again! My problem is solved thanks to you. I move code from event TabControl.Selected to TabControl.SelectedIndexChanged as you have writen and now all work fine. Thank you very much!
-
Can't focus TextBox on TabPageHi, the use of Sendkeys or ActiveControl was just experiment from despair. I already have set TabStop=true and TabIndex=0. When I run my code with debugger I can see than code where I set focus is called just before show new tabpage. But focus stay in textbox on previous tabpage. Thanks anyway
-
Can't focus TextBox on TabPageHi, I tried this again, but doesn't work. Focus stay in textbox on previous tabpage. Thanks all the same.
-
Can't focus TextBox on TabPageHi, I have small but very annoying problem. My form contain tabcontrol with more tabpages. When I click on separate tabpage I want set focus to first textbox on selected tabpage. Second option for select tabpage is pressing keys from F1 to F8. I tried set textbox as ActiveControl on this form and I tried set focus but it didn't work. I noticed in some cases when I press tab after selecting tabpage focus go to textbox. So I use SendKeys.Send("{Tab}"), but dont't work when I focus tabpage with pressing key. I spent a lot of times to solve problem btu no success. Has anybody solution for my problem? Thanks in advance, Jure
-
Grid View (prevent down enter key from down)You are wellcome!
-
Grid View (prevent down enter key from down)Try this: private void dgrMyDatagrid(object sender, KeyEventArgs e) { if ((e.KeyCode == Keys.Enter) { e.Handled = true; } } Hope it helps, Jure
-
Have I DataBinding or DataRelation problem?Hi everyone! In dataset "dsbasis" I have table "ShopGood". I have another table "Good" which don't belong to dataset and contains only important data of ShoopGood for show in datagirdview. I add this table to dataset and I create relation betwen this two tables. I also have more textboxes bounded to dataset and datatable "ShopGood". My problem is, that when I change position in datagrid, values in textboxes stay unchanged. Can anybody tell me why? If I set datagrid datasource to the table which textboxes are bounded all works fine. My code: DataTable dTable = new DataTable("GoodTable"); // fill datatable for datagrid dTable = dShopGood.ListOfGood(""); // set datasource dgrShopGood.DataSource = dTable; dgrShopGood.DataMember = ""; // create datarelation betwen datatable shown in datagridview and // table ShoopGood in DSBasis dsbasis.Tables.Add(dTable); dsbasis.Relations.Add("rel_ShopGood_GoodTable", dTable.Columns["ID"], dsbasis.ShopGood.Columns["IDGood"]); // set databindings txtMark.DataBindings.Add("Text", dsbasis, "ShopGood.Mark", true); txtName.DataBindings.Add("Text", dsbasis, "ShopGood.Name", true); // fill dataset for bounded textboxes dShopGood.CRAllDetail(dsbasis); Thanks in advance, Jure :confused:
-
BeginInit() and EndIinit() performanceThanks
-
BeginInit() and EndIinit() performanceHi, I have some custom controls and all have methods BeginInit() and EndInit() in it. In most cases both methods are empty and probably will always empty. Is there any performance problem, because I notice in myForm.designer all controls have this two lines: ((System.ComponentModel.ISupportInitialize)(this.crLabel20)).BeginInit(); (System.ComponentModel.ISupportInitialize)(this.crLabe20)).EndInit(); I suppose for all controls both methods are called at runtime. Is this performance wasteful? Thanks and sorry my english, Jure