Click here to Skip to main content
15,889,882 members
Home / Discussions / C#
   

C#

 
QuestionQuery a DataSet C# - Array Throwing Null Error Pin
Member 1195658922-Sep-15 10:50
Member 1195658922-Sep-15 10:50 
AnswerRe: Query a DataSet C# - Array Throwing Null Error Pin
Garth J Lancaster22-Sep-15 13:58
professionalGarth J Lancaster22-Sep-15 13:58 
AnswerRe: Query a DataSet C# - Array Throwing Null Error Pin
Agent__00722-Sep-15 17:11
professionalAgent__00722-Sep-15 17:11 
AnswerRe: Query a DataSet C# - Array Throwing Null Error Pin
Winner7823-Sep-15 22:52
Winner7823-Sep-15 22:52 
QuestionInheritage with multiple abstract classes Pin
TMattC22-Sep-15 8:57
TMattC22-Sep-15 8:57 
AnswerRe: Inheritage with multiple abstract classes Pin
TMattC22-Sep-15 9:24
TMattC22-Sep-15 9:24 
AnswerRe: Inheritage with multiple abstract classes Pin
BillWoodruff22-Sep-15 9:42
professionalBillWoodruff22-Sep-15 9:42 
Questionfonts are Changing alone in a strange way - Windows CE , i update my first question Pin
goldsoft22-Sep-15 2:53
goldsoft22-Sep-15 2:53 
i 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 ?
AnswerRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
OriginalGriff22-Sep-15 3:00
mveOriginalGriff22-Sep-15 3:00 
GeneralRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
goldsoft22-Sep-15 4:15
goldsoft22-Sep-15 4:15 
GeneralRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
OriginalGriff22-Sep-15 4:24
mveOriginalGriff22-Sep-15 4:24 
AnswerRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
Pete O'Hanlon22-Sep-15 4:49
mvePete O'Hanlon22-Sep-15 4:49 
QuestionHow to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr22-Sep-15 1:06
Benjamin.Buhr22-Sep-15 1:06 
AnswerRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen22-Sep-15 1:15
professionalEddy Vluggen22-Sep-15 1:15 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr22-Sep-15 1:36
Benjamin.Buhr22-Sep-15 1:36 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen22-Sep-15 2:12
professionalEddy Vluggen22-Sep-15 2:12 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr24-Sep-15 1:09
Benjamin.Buhr24-Sep-15 1:09 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen24-Sep-15 1:20
professionalEddy Vluggen24-Sep-15 1:20 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr24-Sep-15 2:23
Benjamin.Buhr24-Sep-15 2:23 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen24-Sep-15 3:46
professionalEddy Vluggen24-Sep-15 3:46 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr25-Sep-15 0:08
Benjamin.Buhr25-Sep-15 0:08 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr28-Sep-15 1:39
Benjamin.Buhr28-Sep-15 1:39 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen28-Sep-15 5:38
professionalEddy Vluggen28-Sep-15 5:38 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr28-Sep-15 22:49
Benjamin.Buhr28-Sep-15 22:49 
QuestionRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen29-Sep-15 1:25
professionalEddy Vluggen29-Sep-15 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.