I also have a laptop with 4K screen (3840X2160) 220% scaling and I also changed AutoScaleMode to Font. and still cut the screens in the my program
goldsoft
Posts
-
The forms are cut for me using high resolution on WinForm -
The forms are cut for me using high resolution on WinFormThanks for the answer, so if I understood correctly, I need all the controls to be AutoSize = true ?
-
The forms are cut for me using high resolution on WinFormI got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
-
Everything works fine in the Crystal-report, only the image does not displayi'am trying to print through Crystal-report a report with picture that i attached. i try this:
1. i add a picture object to the report.
-
format Object -> Picture -> Graphic location
-
i add my logo path: 'c:\LOGO\LOGO.jpeg'
Everything works fine in the report, only the image does not display. i work on C# WinForm with Visual-studio 2010 + Crystal-Report thanks
-
-
Having trouble closing and reopening of communication port RS232i try this.... still same problem
-
Having trouble closing and reopening of communication port RS232hi I'm trying to get the weight attached to a computer using RS232 com port. I can read the weighing, but when I walk out the form , and came again - My program and computer freezing. this is my code: private void Main_Load(object sender, EventArgs e) { port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One); port.DataReceived += new s system.IO.Ports.SerialDataReceivedEventHandler(Recepcion); if (port.IsOpen == false) { try { port.Open(); } catch (Exception oex) { MessageBox.Show(oex.ToString()); } } } private void Actualizar(object s, EventArgs e) { //I try this lblMSG.Text = ExtractDecimalFromString(port.ReadLine()).ToString(); port.DiscardInBuffer(); //Also I try this lblMSG.Text = ExtractDecimalFromString(port.ReadExisting()).ToString(); port.DiscardInBuffer(); } private void Recepcion(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { try { this.Invoke(new EventHandler(Actualizar)); } catch { } } and when i close the form i do this: port.DataReceived -= new System.IO.Ports.SerialDataReceivedEventHandler(Recepcion); GC.Collect(); //also i try to remark this port.Close(); port.Dispose(); this.Close(); It is not always freezes, sometime yes...sometime no.... I searched the entire network still does not answer and solution. I'm really despair. I wish to find a solution here
-
cant recive data from WebService via Android ksoap2i'am trying to send string to webservice and get replay from. i use android studio for programming on java for android and visual-studio 2010 for programming the C# webservice. i have this code on android private static final String SOAP_ACTION = "http://tempuri.org/HELO"; private static final String OPERATION_NAME = "HELO";// your webservice web method name private static final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/"; private static final String SOAP_ADDRESS = "http://10.0.0.2/WS\_TEST/Service1.asmx"; SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo info= new PropertyInfo(); info = new PropertyInfo(); //Set Name info.setName("HELO"); //Set Value info.setValue("New User"); //Set dataType info.setType(String.class); //Add the property to request object request.addProperty(info); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS); try { httpTransport.call(SOAP_ACTION, envelope); Object response = envelope.getResponse(); tvData1.setText(response.toString()); } catch (Exception exception) { tvData1.setText(exception.toString()); } and this my C# WebService [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HELO(string Name) { return "Hello : " + Name; } } and i got only Helo: without the string that i send instead of Helo: New User thans
-
cant run my C# program after installation - only if i Run as administratorhi cant run my C# program after installation - only if i Run as administrator. in my setup i set the InstallAllUsers = True i change the app.manifest file to
allso i try to remove this **app.manifest** file and i try to change to requestedExecutionLevel level="asInvoker" uiAccess="false" - and same problem and after the install, when i try to run the program - The software is not running only if i click on the exe file and run as administrator. thanks
-
Removal and delete of duplicate records in my tablehi i have this table: id | Name | Age ================== 1 | AAA | 22 1 | AAA | 22 2 | BBB | 33 2 | BBB | 33 2 | BBB | 33 3 | CCC | 44 4 | DDD | 55 i need to delete from this table all the duplicate records and leave only one record. the table will looks like this: id | Name | Age ================== 1 | AAA | 22 2 | BBB | 33 3 | CCC | 44 4 | DDD | 55 i work with sqlCE for Mobile thanks
-
how to get Image from DataSetthank for the help ! i try this and i got: InvalidCastException i work on C# Windows-Mobile thanks
-
how to get Image from DataSethi i have DataSet that contain Image. i need to save this Image to File. i try this: SQL = ItemCode,PIC from ROW; dsView = new DataSet(); adp = new SqlCeDataAdapter(SQL, Conn); adp.Fill(dsView, "ROW"); adp.Dispose(); foreach (DataRow R in dsROW.Tables[0].Rows) { ItemCode = R["ItemCode"].ToString().Trim() ; TEMP = R["PIC"].ToString().Trim(); Image image = R["PIC"] as Image; if(image != null) { MemoryStream ms = new MemoryStream(); image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] imagedata = ms.ToArray(); } but image Always is null and in TEMP i see System.Byte[] need some help, thanks
-
lost focus on form in Windows-Mobilei have C# Windows-Mobile program, that open frmWork form - from Main form. my Forms Directed for: WindowStat = Maximized TopMost = True FormBorderStyle = None from Form1 to Form2 i do something like this: this.TopMost = false; Form FG = new frmWork(); FG.ShowDialog(); this.TopMost = true ; i try allso do this: Form FG = new frmWork(); FG.ShowDialog(); i try on frmWork to do something like this: this.BringToFront(); this.TopMost = true; But unfortunately nothing helps, Sometimes the form is opened below the main form and can not see it. I'd love to get direction to solve the problem
-
lost focus on form in Windows-Mobilei have C# Windows-Mobile program, that open frmWork form - from Main form. my Forms Directed for: WindowStat = Maximized TopMost = True FormBorderStyle = None from Form1 to Form2 i do something like this: this.TopMost = false; Form FG = new frmWork(); FG.ShowDialog(); this.TopMost = true ; i try allso do this: Form FG = new frmWork(); FG.ShowDialog(); i try on frmWork to do something like this: this.BringToFront(); this.TopMost = true; But unfortunately nothing helps, Sometimes the form is opened below the main form and can not see it. I'd love to get direction to solve the problem
-
Looking for a solution for combine WebService and jQuery (web app)hi, i have this code for reading xml file into my list. var zfullname, zphone_M, zphone_F, zMail, zFname,zLname; var ALL; var Fname, Lname, Phone_M, Phone_F, Mail; function XX() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "Phone.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; $("#ZIZI").empty(); var x = xmlDoc.getElementsByTagName("MEN"); for (i = 0; i < x.length; i++) { try { Fname = x[i].getElementsByTagName("Fname")[0].childNodes[0].nodeValue; } catch (err) { Fname = "0"; } try { Lname = x[i].getElementsByTagName("Lname")[0].childNodes[0].nodeValue; } catch (err) { Lname = "0"; } try { Phone_M = x[i].getElementsByTagName("Phone_M")[0].childNodes[0].nodeValue; } catch (err) { Phone_M = "0"; } try { Phone_F = x[i].getElementsByTagName("Phone_F")[0].childNodes[0].nodeValue; } catch (err) { Phone_F = "0"; } try { Mail = x[i].getElementsByTagName("Mail")[0].childNodes[0].nodeValue; } catch (err) { Mail = "0"; } if (Mail == "0") Mail = " "; if (Phone_M == "0") Phone_M = " "; if (Phone_F == "0") Phone_F = " "; ALL = '* ' + '[' + '
' + ' **' + Fname + " " + Lname + '** ' + ' ' + Phone\_M + ' ' + ' ' + Phone\_F + ' ' + ' ](men.html)
-
Looking for a solution for combine WebService and jQuery (web app)hi, i have this code for reading xml file into my list. var zfullname, zphone_M, zphone_F, zMail, zFname,zLname; var ALL; var Fname, Lname, Phone_M, Phone_F, Mail; function XX() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "Phone.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; $("#ZIZI").empty(); var x = xmlDoc.getElementsByTagName("MEN"); for (i = 0; i < x.length; i++) { try { Fname = x[i].getElementsByTagName("Fname")[0].childNodes[0].nodeValue; } catch (err) { Fname = "0"; } try { Lname = x[i].getElementsByTagName("Lname")[0].childNodes[0].nodeValue; } catch (err) { Lname = "0"; } try { Phone_M = x[i].getElementsByTagName("Phone_M")[0].childNodes[0].nodeValue; } catch (err) { Phone_M = "0"; } try { Phone_F = x[i].getElementsByTagName("Phone_F")[0].childNodes[0].nodeValue; } catch (err) { Phone_F = "0"; } try { Mail = x[i].getElementsByTagName("Mail")[0].childNodes[0].nodeValue; } catch (err) { Mail = "0"; } if (Mail == "0") Mail = " "; if (Phone_M == "0") Phone_M = " "; if (Phone_F == "0") Phone_F = " "; ALL = '* ' + '[' + '
' + ' **' + Fname + " " + Lname + '** ' + ' ' + Phone\_M + ' ' + ' ' + Phone\_F + ' ' + ' ](men.html)
-
Memory leak deterioration in performance in working with weight in rs232 Win-CEMaybe I'm not an expert like you, I do my best. Right now I have a problem and I'm really trying to solve it in all ways
-
Memory leak deterioration in performance in working with weight in rs232 Win-CEthanks for the help, i change my code to: private SerialPort port; StringBuilder SB; private void Recepcion(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { try { SB = new StringBuilder(1000); SB.Append(port.ReadLine()); port.DiscardInBuffer(); this.Invoke(new EventHandler(Actualizar)); } catch { } } but still same problem..... my program fonts change alone for no reason.....:confused::confused:
-
fonts are Changing alone in a strange way - Windows CE , i update my first questionI tried to do everything offered, but not helped yet
-
fonts are Changing alone in a strange way - Windows CE , i update my first questioni have Windows-Mobile program that work with weight Connecting through rs232. its work excellent, but If the program works in a period of time - fonts are Changing alone from big to small font I noticed that the problem is in the first part 1 - if i mark this part1 The fonts will not change. (I have no idea why this is happening....) my code: //PART 1 port = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One); port.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(Recepcion); private SerialPort port; StringBuilder SB; private void Recepcion(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { try { SB = new StringBuilder(1000); Application.DoEvents(); System.Threading.Thread.Sleep(122); SB.Append(port.ReadExisting()); port.DiscardInBuffer(); this.Invoke(new EventHandler(Actualizar)); } catch { } } //PART2 string MOMO1, MOMO2; string[] WI; string ALL; private void Actualizar(object s, EventArgs e) { ALL = SB.ToString().Trim(); WI = ALL.Split(','); ALL = WI[2].ToString().Trim(); MOMO1 = ALL.Replace("+", "").Replace("g", "").Replace("ST", "").Replace("GS", "").Replace("US", ""); if (MOMO1 != "") { MOMO2 = MOMO1; } lblMSG.Font = new Font("Ariel", 48, FontStyle.Bold); lblMSG.Text = MOMO2; Check_Weight(); GC.Collect(); // <-- is it OK ? } Can anyone advise me why and how to solve it ?
-
Memory leak deterioration in performance in working with weight in rs232 Win-CEMany thanks for the detailed answer ! If this is not hard, I'd be happy if you can change things problematic in this code.