Click here to Skip to main content
14,775,888 members
Home » Discussions » C#
   

C#

 
QuestionHow to switch the whole DataGridView Left-To-right? Pin
Alex Dunlop4-Nov-20 8:46
MemberAlex Dunlop4-Nov-20 8:46 
AnswerRe: How to switch the whole DataGridView Left-To-right? Pin
BillWoodruff4-Nov-20 15:21
mveBillWoodruff4-Nov-20 15:21 
AnswerRe: How to switch the whole DataGridView Left-To-right? Pin
Mycroft Holmes5-Nov-20 11:50
professionalMycroft Holmes5-Nov-20 11:50 
QuestionMoving VS 2019 solution from on-premise to cloud Pin
Member 144746074-Nov-20 8:27
MemberMember 144746074-Nov-20 8:27 
AnswerRe: Moving VS 2019 solution from on-premise to cloud Pin
Richard Andrew x644-Nov-20 15:05
professionalRichard Andrew x644-Nov-20 15:05 
QuestionWinForm - Localize DataGridView with automatical generated columns Pin
Mc_Topaz4-Nov-20 0:08
MemberMc_Topaz4-Nov-20 0:08 
AnswerRe: WinForm - Localize DataGridView with automatical generated columns Pin
BillWoodruff4-Nov-20 3:35
mveBillWoodruff4-Nov-20 3:35 
QuestionCsharp InTheHand.Net read bluetooth data on received event Pin
nowis773-Nov-20 9:07
Membernowis773-Nov-20 9:07 
Hello,

I have a simple Arduino robot that communicates through a Bluetooth device (HC-05).

First I made an application in Microsoft Visual C# 2008 that continuously could receive data from the HC-05.
In this Csharp application I just have to place the serialPort1 object and use the serialPort1_DataReceived event. This is working great ! Each time my robot sends three bytes of data, my application successfully receives this.

Now I have Microsoft Visual Studio Professional 2019 and it seems that I could not use the serialPort1 any more...
So I looked on internet and I found a solution with the package "In The Hand Bluetooth from 32feet.NET".
I installed and used successfully this package. Now I can sent and receive data with the HC-05 device.
However, I can only let this work on the event of a button...

So the big problem that I have now is that I cannot receive continuously data like my old application.
I was trying to make a thread that continuously reads data but it doesn't work:

<pre>
FormManager.BluetoothStream = FormManager.bluetoothClient.GetStream();
try
{
    Array.Clear(bufferBluetooth, 0, bufferBluetooth.Length);

    do
      {
      	FormManager.BluetoothStream.Read(bufferBluetooth, 0, bufferBluetooth.Length);
      }
    while (FormManager.BluetoothStream.DataAvailable);
     System.Diagnostics.Debug.WriteLine("--> bytes received " + bufferBluetooth[0] + " " + bufferBluetooth[1] + " " + bufferBluetooth[2]);

}
catch
{
     System.Diagnostics.Debug.WriteLine("Receiving Error");
}

AnswerRe: Csharp InTheHand.Net read bluetooth data on received event Pin
jsc423-Nov-20 11:33
professionaljsc423-Nov-20 11:33 
GeneralRe: Csharp InTheHand.Net read bluetooth data on received event Pin
nowis7710-Nov-20 22:01
Membernowis7710-Nov-20 22:01 
QuestionBusiness Layer Question Pin
Kevin Marois2-Nov-20 7:31
professionalKevin Marois2-Nov-20 7:31 
AnswerRe: Business Layer Question Pin
Richard Deeming2-Nov-20 7:45
mveRichard Deeming2-Nov-20 7:45 
GeneralRe: Business Layer Question Pin
Kevin Marois2-Nov-20 8:27
professionalKevin Marois2-Nov-20 8:27 
Questionuse connection from login form in other forms Pin
Newkid on the block31-Oct-20 6:43
MemberNewkid on the block31-Oct-20 6:43 
AnswerRe: use connection from login form in other forms Pin
OriginalGriff31-Oct-20 6:57
mveOriginalGriff31-Oct-20 6:57 
GeneralRe: use connection from login form in other forms Pin
Newkid on the block31-Oct-20 11:21
MemberNewkid on the block31-Oct-20 11:21 
GeneralRe: use connection from login form in other forms Pin
Dave Kreskowiak31-Oct-20 12:26
mveDave Kreskowiak31-Oct-20 12:26 
AnswerRe: use connection from login form in other forms Pin
Dave Kreskowiak31-Oct-20 7:30
mveDave Kreskowiak31-Oct-20 7:30 
AnswerRe: use connection from login form in other forms Pin
BillWoodruff1-Nov-20 16:12
mveBillWoodruff1-Nov-20 16:12 
GeneralRe: use connection from login form in other forms Pin
Newkid on the block3-Nov-20 6:45
MemberNewkid on the block3-Nov-20 6:45 
GeneralRe: use connection from login form in other forms Pin
BillWoodruff3-Nov-20 15:46
mveBillWoodruff3-Nov-20 15:46 
QuestionCrystal reports and datagridviews Pin
Damir Djordjevic31-Oct-20 5:39
MemberDamir Djordjevic31-Oct-20 5:39 
AnswerRe: Crystal reports and datagridviews Pin
Gerry Schmitz31-Oct-20 6:15
mveGerry Schmitz31-Oct-20 6:15 
QuestionIF Else statement on background colour of label. Pin
Member 1497767230-Oct-20 3:29
MemberMember 1497767230-Oct-20 3:29 
SuggestionRe: IF Else statement on background colour of label. Pin
Richard MacCutchan30-Oct-20 3:36
mveRichard MacCutchan30-Oct-20 3:36 

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.