16,004,525 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Ralf Meier (Top 200 by date)
Ralf Meier
21-Aug-24 17:12pm
View
I suppose that my suggestion goes the same way as mentioned by Pete in Solution3.
You should create your own Event inside the UserControl and raise this Event with yout Button-Click. But the Sender in this case should not be the UserControl - the Sender has to be the Button and so you could get outside the UserControl all the information you need ...
Ralf Meier
3-Aug-24 18:24pm
View
Perhaps it is useful to see your code to be able to help you.
Basicly I would, if a special format is required, check the input and perhaps modify it before I transfer it to somewhere else ...
Ralf Meier
31-Jul-24 2:52am
View
If a different (higher) Baudrate makes no changes but your device is supporting it the bottleneck seems to be your system itself or the printer.
But a question : how long does it relly last to print and what kind of printer do you have ?
And remember : a serial connected printer is not "state of the technic"
Ralf Meier
28-Jul-24 7:17am
View
does your printer only work with 9600 Bits per second ? Or could it speed up to a faster rate ? (19200, 38400, ...) If possible it will work much faster ...
Ralf Meier
17-Jun-24 6:38am
View
you are answering a 12 year old question - and that with a more or less unuseful Solution ...
Ralf Meier
9-Jun-24 3:44am
View
... also the original question is 11 years old ... AND allready answered ...
Ralf Meier
5-Jun-24 15:42pm
View
1st: what is the difference from your answer to Solution 1 ?
2nd: you have answered a nearly 14 year old question - that looks like Reputationpoints-hunting and you could get banned for it ...
Ralf Meier
20-May-24 14:27pm
View
Thanls Maciej ... but btw : what was wrong ?
Ralf Meier
10-May-24 14:30pm
View
Sorry for my late response - it could have been earlier if you used the REPLY-widget insteat of writing a new comment.
Basicly @Grame_Grant has posted a possible Solution to do that.
You should use the SELECT CASE Statement with for example an Integer-Variable.
Now each Step of yor Statemachine is a new CASE of this with a new Value of that Integer.
After doing a step you should increase that Variable for the next step. Inside this next step you wait for the result to increase the Variable again ... and so on ...
Is that clear for you or should I create an example ?
Ralf Meier
5-May-24 6:14am
View
Please explain a little bit better what you are trying ... perhaps with some examples, What are the condition(s) to go to the next step ?
Ralf Meier
22-Apr-24 18:43pm
View
Have you ever checked with the Debugger if :
- GetSesionData is really called ?
- data is not Null ?
- what is data.Errorcode ?
- what is data.Chargerstate ?
Suspending the Layout isn't necessary - I suppose that one of those listed things is your problem ...
Ralf Meier
9-Apr-24 3:05am
View
Without seeing what your Debugger "says" I suppose that the assignment to the Eventhandler isn't realized at the right point.
I suggest that you don't do it manually and assign it with the Designer - so it will be established with the Form call.
Why have you coded it inside the TopliNapitciButton_Click-method ?
Ralf Meier
31-Mar-24 17:33pm
View
+5
Ralf Meier
21-Feb-24 5:39am
View
perhaps you show us the relevant code ...
Is your Textbox on one of the TabPages or outside the TabControl ?
Ralf Meier
15-Feb-24 3:40am
View
Have you realized that this question is nearly 12 years old ?
I suppose that the OP has allready a Solution ...
If you want to answer questions then please take those which are actuell ...
Ralf Meier
15-Feb-24 3:40am
View
Have you realized that this question is nearly 12 years old ?
I suppose that the OP has allready a Solution ...
If you want to answer questions then please take those which are actuell ...
Ralf Meier
13-Feb-24 14:53pm
View
Thanks a lot ... :-)
Ralf Meier
13-Feb-24 13:24pm
View
You are welcome.
I would be nice if you rate my Solution also ...
Ralf Meier
11-Feb-24 5:14am
View
based on this Solution I posted some little modifications for you - see below ...
Ralf Meier
9-Feb-24 3:29am
View
If you have a question to OG then use the "Have a Question or Comment"-Widget inside his Solution. In that case he is notified.
This is not an answer so it's downvoted !
To answer your question : you don't know how to add location-points ? Make a new Point and assign the Groupbox-Location to it. After that you add your Button.X-Value to the Point.X-Value and the same with the Y-Value. If you want that the Cursor is middle over the Button the add also the half of the Button-Height to the Point.Y and the same with the Width to the X-Value ...
Ralf Meier
5-Feb-24 4:12am
View
I'm not quiet sure what you are exactly doing (not much code posted) - but perhaps it could help if you write an Invalidate to your Label and after this an "Application.doEvents" before you start your method ...
Ralf Meier
20-Nov-23 15:21pm
View
what is thge sense of using an unvisible Listbox ?
and ... do you allways want to get the last Item of the Entries inside yor Listbox ?
In fact you could get any Item of your Listbox at any time - independant of the Listbox.Visible-State
Ralf Meier
15-Nov-23 18:13pm
View
I'm sorry but I can't use it - I only have VS 2010 which doesn't support a higher Framework than 4.0.
Since I'm not a professional .Net-Programmer this Version is okay for me.
Perhaps I will by a newer Version if it is cheaper to get ...
Ralf Meier
15-Nov-23 18:07pm
View
+5 It`s much easier as my own Solution ... 👍 (and works similar 😃)
Ralf Meier
15-Nov-23 11:09am
View
Also an additional a very good Sugestion from you was the PropertyName-Deklaration - some of the Properties have a Name which is not useful to be worked with the Deserializer - mean or example "input:0{sub-deklarations}" - here I could give a different Propertyname for the Deklaration and for the Deserializer ...
Ralf Meier
15-Nov-23 8:59am
View
Thank you very very much, Richard. My +5
Of course, you posted in C# - but that wasn't a problem for me (I only prefer coding in VB)
The de-serialisation is working now ... 👍
With the original posted JSON from me you are right - I had formatted it for better seeing without the commas (replace "," with vbCRLF)
Ralf Meier
14-Nov-23 4:27am
View
thanks a lot for that Info :-)
Ralf Meier
14-Nov-23 4:26am
View
thanks for your Reply, Richard.
The using of this Framework is a kind of Lazyness at me ... so now I will switch to 4.6.2
Ralf Meier
14-Nov-23 2:47am
View
Oops ... from where do I get the "System.Net.Http" ?
I'm using Framework 4.0 and it seems that there is no Namespace like that in it ...
Ralf Meier
14-Nov-23 2:32am
View
Since there is no useful information to be found in the web I decided to make an Article (later when I'm finished) which describes how to work with the Shelly-Devices (Smart-Home Relais)
Ralf Meier
14-Nov-23 2:29am
View
Thanks a lot for sharing your sample - I will a little later make tries with it ...
To make it easier for me : how should a request look like which gets an answer from the device ? Would you be so kind to improve your Solution with that Method ?
Ralf Meier
13-Nov-23 14:41pm
View
which part isn't clear for you ?
I want to send the HTTP-Command "http://192.168.xxx.xxx/relay/0?turn=off" with the click of a Button for example.
Freezes means that I could send it 2 times and it works and then teh application isn't responsive anymore ...
Don't you have a useful sample for that ?
Ralf Meier
12-Nov-23 11:30am
View
have you rad this article : https://github.com/dotnet/winforms/issues/3063
Ralf Meier
12-Nov-23 11:09am
View
did you set it inside the "InitializeComponent" of your class to false ?
Ralf Meier
12-Nov-23 11:07am
View
the next manipulator is your "SelectionIndent"-Setting inside the "InitializeComponent" of your class. With this you could manipulate the left position (left margin). I thought that this was planned by you ...
Ralf Meier
12-Nov-23 11:00am
View
but what I'm complete not understood is what you tried to achieve ...
It would be nice if you will explain it to me ...
Ralf Meier
12-Nov-23 10:57am
View
If I understood it right your problem comes from the Property "ShowSelectionMargin" you set to true - if it's false the shift from 10 pixes is away. I couldn't find out where this could be manipulated ...
Ralf Meier
12-Nov-23 9:32am
View
it is still untestable for me.
To see what I mean you should move this class to a new independant project ...
Ralf Meier
12-Nov-23 9:29am
View
it's only for me to be able to test it by myself ...
Ralf Meier
12-Nov-23 8:44am
View
I'm sorry - there are too much declarations/definitions inside your class which came from/point to outside it - change your code to let it independant from your project ...
Ralf Meier
12-Nov-23 5:13am
View
Please post your complete code - use the "improve question" widget inside the question.
While testing your actual code-snippet I found that the Cursor isn't set to standard when leaving the modified control. So you are doing something wrong - to make a suggestion I msut understand your issue ...
Another thing : if you want a reaction from some of us you should use the "reply"-widget at the comment you are refering ...
Ralf Meier
11-Nov-23 19:19pm
View
it could be helpful if you tell us (me) something more about the protocoll.
To get something similar work I would also let it 1st work inside the UI-Thread.
Ralf Meier
11-Nov-23 19:11pm
View
Please explain me what the sense of these code is - for you.
The behaviour you try to achieve (for me) is standard-functionality of a RichTextbox ... (without this code-snippet)
Ralf Meier
9-Nov-23 13:01pm
View
This is no Solution - use the "improve question"-Widget from your Question to add this Information (and perhaps some more )
Ralf Meier
16-Oct-23 2:57am
View
👍
Ralf Meier
14-Oct-23 8:29am
View
Have you ever read what OG has written in his Solution ? Here I mean at first of all his Point 1)
Ralf Meier
14-Oct-23 7:37am
View
what part of it doesn't work ?
Have you ever checked that you are working with the correct Cell inside your DataGrid ?
Set a Breakpoint at the Position of "next" and look with the DEBUGGER which result you get ...
Ralf Meier
10-Oct-23 4:29am
View
... and also, as Richard has mentioned, with the Properties-Dialog of the File when using the Windows-Explorer ...
Ralf Meier
4-Oct-23 12:05pm
View
have you ever took a look with the DEBUGGER what your Request delivers you ?
Ralf Meier
30-Aug-23 12:18pm
View
you are welcome ...
please be so kind and rate also the Solution
Ralf Meier
22-Aug-23 5:29am
View
Perhaps you could create a Component or a customized Control - but for this it is necessary to know what the goal is. That was the reason for my last comment ...
Ralf Meier
21-Aug-23 17:35pm
View
you've got an answer from Dave - but for my understanding : what is the final goal you are facing with this question ?
Ralf Meier
21-Aug-23 4:29am
View
could you give an example how the moving-path of your machine-part looks like ?
I think there is a way with customized controls and using more parts of the graphics-unit - but for this I need more infomation ...
Ralf Meier
19-Aug-23 11:13am
View
I suggest you should declare the _person outside the method GridviewToObject. In your sample this object only exists inside the method ...
Ralf Meier
27-Jul-23 7:51am
View
But Ahmed has written that the Color comes from the Author-Settings and not from the comment itself ...
Ralf Meier
27-Jul-23 7:48am
View
I'm sorry ... not really ... because I don't have your Document and also not your code.
But a suggestion : try to follow the sample from StackOverFlow ... and also : what does this Porperty deliver to you ?
Ralf Meier
25-Jul-23 6:29am
View
you might be right - with that I wasn't sure ...
bur nevertheless - the OP could make an Error-Handling which is even better as nothing (like mentioned by you)
Ralf Meier
23-Jul-23 14:54pm
View
very good approach ... +5
Ralf Meier
20-Jul-23 15:41pm
View
The provided code is more or less nothing - I can't imagine that it is the work you have done ... what are you awaiting from us ?
Ralf Meier
18-Jul-23 11:41am
View
and for your new problem the answer is the same : look what the Debugger tells you ...
Ralf Meier
18-Jul-23 11:40am
View
Don't post an answer as a Solution - for this we have the widgets "have a question or comment ?"
Ralf Meier
17-Jul-23 8:44am
View
... and your actual code is ...?
Have you took a look with the Debugger to see what is happening inside your code ?
Ralf Meier
17-Jul-23 4:41am
View
back to your method :
sender is an object - if you want to use it you must at first assign it to a variable which type it the original type of the sender - in your case Employee. Object is the base-type from variables and it doesn't consists of items and so on - it's more or less a kind of pointer ...
Ralf Meier
17-Jul-23 4:38am
View
complete agree with you ... but I suppose we are (he is) lightyears away from using the binding ...
Ralf Meier
17-Jul-23 4:36am
View
I see your code and in my opinion it's wrong at all - have you ever used the Debugger to see what is really happening ?
But at first : please explain what you want to happen inside the handler-method ?
Ralf Meier
17-Jul-23 4:24am
View
of course all your links are very useful for the OP - but I suppose the problem he has is using the List and especially the items in it in the wrong way.
Ralf Meier
17-Jul-23 4:20am
View
... but now the original Code is gone ... lets go back to there because there is the part which throws the exception because you make a complete wrong assignment. Please improve this question with that code and perhaps made corrections ...
Ralf Meier
16-Jul-23 16:55pm
View
... but when the OP doubleclicks a Excel-Cell then the Action must come from a VB-Script inside the Excel-Workbook which catches the Event from the Cell ... or am I wrong ?
Ralf Meier
16-Jul-23 8:41am
View
Perhaps (but I'm not sure) your mistake is that you try to change the item and not it's value - that depends perhaps on the type of the elements of your List.
You should provide more Info - also what kind of exeption do you get and where ...?
Ralf Meier
11-Jul-23 5:16am
View
It's your part do do - this was my suggestion because it was the first thought when I saw the code and whats happend with the string ...
Ralf Meier
10-Jul-23 16:26pm
View
Take a look at the Split-Method for strings. With that you can seperate it into the single values inside an Array. I can imagine that it makes it mujch easier ...
Ralf Meier
7-Jul-23 16:57pm
View
And what have you done to realize those calculation ?
Ralf Meier
5-Jul-23 2:37am
View
In Germany we say "ohne Fleiss kein Preis" which means "without working on it you have no success".
Thats your decission - I and everyone else here could only make suggestions ...
Ralf Meier
4-Jul-23 18:41pm
View
okay .. but that is a mistake in your Application and NOT in the answer of OG - a Solution could be not to use the same Method for both actions ...
And there is no reason to downvote this Solution because it's answer is quiet right.
+5 rom me to correct it ...
Ralf Meier
4-Jul-23 18:33pm
View
List is a Class-Object with own Methods and Properties.
One of it's Methodes is "Add" - with that you enter a new Entry into the List. Also you have other Methods like "Remove" and so on.
It's Property "Count" delivers you the Number of Entries inside the List.
As I allready pointed out : you should engage yourself with that - List is a very mighty Tool ...
Ralf Meier
4-Jul-23 12:18pm
View
I don't believe ... For your issue the best approach would be, as allready mentioned by me, the Solution with the List (of String).
Perhaps you take a look on in and engage yourself with it ...
Ralf Meier
4-Jul-23 5:43am
View
In my opinion the memory-usage comes from the underlying class. In your Solution your dimension of the BankNames-Array is done outside it.
What happens if you later (in same months or more) go back to your application ? Or someone complete different ? I suppose that is difficult to realize the/your layout. Also in my opinion it is complete against OOP - but that are my 2 cents ...
Ralf Meier
4-Jul-23 3:00am
View
I#M sorry - you version may work ... but it isn't a good way to realize that. I don't agree with it ...
Ralf Meier
4-Jul-23 2:58am
View
the Solution from Dave should also work if you use it in the right way. But a List is different to an Array - that is something you should realize ...
Ralf Meier
3-Jul-23 16:04pm
View
As I wrote at my suggestion - it is complete different --- but very much better ...
Ralf Meier
3-Jul-23 16:03pm
View
that isn't possible - sorry.
In this case you should think about the suggestion of Dave - but that isn't an Array - that is an empty suitcase which could be filled with your need. Perhaps you engage yourself a little with that ...
Ralf Meier
3-Jul-23 16:00pm
View
the difference is that the class now has a defined array in it which will be delivered with the Property. Using a Porperty like a public Variable isn't a good style at any time. It's allways better to use the Getter and the Setter Methodes of it ...
Ralf Meier
3-Jul-23 15:54pm
View
See my Solution - it is exactly like that ...
Ralf Meier
3-Jul-23 15:50pm
View
... so we are all back again ... ;-)
Ralf Meier
3-Jul-23 15:40pm
View
and what size has this Array "BankNames" inside your Class ?
What are you trying to achieve ?
Ralf Meier
3-Jul-23 5:15am
View
you are welcome - and thanks a lot ...
Ralf Meier
3-Jul-23 5:04am
View
I must add a last comment :
Inside the Solution of Grame_Grant was added a Link for explaining Arrays. When you take a look at that Description there you will see that my Explaining of Array-Dimensioning was complete right. An Array (4) consists of 5 Elements (0 .. 4).
This only for your Info ...
Ralf Meier
3-Jul-23 5:03am
View
I must add a last comment :
In your Solution you added a Link for explaining Arrays. When you take a look at that Description there you will see that my Explaining of Array-Dimensioning was complete right. An Array (4) consists of 5 Elements (0 .. 4).
This only for your Info ...
Ralf Meier
3-Jul-23 4:25am
View
this discussion goes to nowhere - inside my Visual-Studio an Array(1) has 2 Elements ... and my code-part 3 doesn't fail.
That has nothing in common with unallocated memory as mentioned by Richard - it simply works and as I remember that was every time like this.
If you create an Array (10) it is the same - it has 11 Elements and I can access the Index 10.
If wwe speak about Collections or Lists there is a Difference ...
So ... to finalize it : if no one can explain me why my code works (and my development system) I'm out of this discussion.
And ... also thanks for downvoting (to 1 !!!) my Solution ... very very nice ...
Ralf Meier
3-Jul-23 4:18am
View
if you speak about version-history you should also look at which time came which suggestions - especially at me ...
Ralf Meier
3-Jul-23 4:10am
View
as I wrote to Grame_Grant - part 3 doesn't fail ... and the dimnsioned Array (1) has 2 Elements ...
Ralf Meier
3-Jul-23 4:08am
View
So please answer :
why does my code-part 3 work ? I get the execption only with code-part 4 ...
If I create an Array with the Dimension 1 my Array has 2 Elements (Index 0 and Index 1) ...
Ralf Meier
3-Jul-23 3:56am
View
and finaly :
I'm very sad that your don't replied to my comments to make it to a real discussion - you only posted comments ... without any corresponding to mine ...
Ralf Meier
3-Jul-23 3:54am
View
9the oppinions are different as I see - I think that either my solution (and the answer) is useful and also all additions to it.
Of course your solution is correct ... but mine isn't incorrect ... and your solution (part 1) is a copy of mine ... and I don't gave you a downvote - I only voted +3 (which was your vote to me ?)
Ralf Meier
3-Jul-23 3:42am
View
my question now : why did my code sample works by me and not by you ? Where is the difference ?
Ralf Meier
3-Jul-23 3:40am
View
No ... of course List of is also an suggestion from me ... but please read my solution and the added parts carefully ...
There is a difference in dimensioning Arrays ...
Ralf Meier
3-Jul-23 3:34am
View
I made also an addition to my Solution as an add to our discussion ...
Ralf Meier
3-Jul-23 3:25am
View
No ... as I allready wrote - I tested it and it works ...
See also my comment to your Solution ...
Ralf Meier
3-Jul-23 2:35am
View
where is the difference between your suggestion_1 and my suggestion_2 ?
after dimensioning the Array to 1 it consists of 2 elements (Index 0 and Index 1) - I don't know if that is equal to C# ... but at VB it happens like described ...
Ralf Meier
3-Jul-23 2:29am
View
OK ... you are right ... but if you make a Class Static you create an Instance of it ...
Where do you think thta my code-sample will fail ? I have tested both versions ...
Ralf Meier
30-Jun-23 19:18pm
View
I'm sorry ... but my glassbowl isn't working well ... so without seeing anything of what you have coded it's impossible for me to make any suggestions ...
Ralf Meier
26-Jun-23 15:36pm
View
when reading your code I stuck at the dimension of the array - did you really want to have it ten thousand bytes large ? or do you originally want to size it 1024 bytes ?
Ralf Meier
21-Jun-23 17:39pm
View
Thanks Patrice
Ralf Meier
28-May-23 15:27pm
View
It could be useful if you give some samples of both texts ... how are they looking like ...?
Ralf Meier
24-May-23 16:57pm
View
You are welcome ...
There are several samples inside the search - I suppose you will find something matching.
With the Standard-Control it isn't possible to do what you like to have ...
Ralf Meier
21-May-23 16:25pm
View
If xou really want this you can set the Text-Property to the SelectedIndex when the SelectedIndexChanged is firing. But I wouldn't do so because normally you don't have a Selection if you are only scrolling through the items of the ComboBox ...
Ralf Meier
12-May-23 18:12pm
View
PLease answer the questions I asked as comment to your question.
Without those answers it's impossible (for me) to give you any advice ...
Ralf Meier
11-May-23 5:21am
View
I'm sorry ... which part of the code isn't working well ?
Or better which is the result you get what isn't like you expected it ?
Ralf Meier
6-Apr-23 2:36am
View
if you want to have a solution you should give much more information. This code-snippet says nothing to me. What is your goal ? Should we write the code for you ?
Ralf Meier
1-Apr-23 4:53am
View
For your Info :
- don't post a question as a Solution - for that we have the widget "Question or Comment"
- if you use this I don't think that you will get an answer because this Question is nearly 10 years old - but if you generally have a question you could ask it in "Quick Answers" as your own question ...
Ralf Meier
23-Mar-23 8:01am
View
For future questions :
"Help me to solve this problem" is not a qualified description or a title with sense.
Perhaps you think about that ...
Ralf Meier
21-Mar-23 9:22am
View
I'm sorry ... but for me this code-snippet isn't useful for having any idea about your problem ...
Ralf Meier
20-Mar-23 5:37am
View
👍
Ralf Meier
20-Mar-23 5:29am
View
Because, as Dave allready mentioned, Screen.AllScreens.ToString return a string into ScreenCount.
I have no idea what happend if you use the sample from Grame_Grant with a string - but I suppose that you allways will work with Screen(0) - that means your primary Screen.
Perhaps you look carefully at the sample you got and try it with the posted version ...
Ralf Meier
20-Mar-23 5:29am
View
No ... sorry ... I pushed the wrong Reply-Button.
My Reply should point to Hannes who is still on his "own" course ...
Ralf Meier
19-Mar-23 4:02am
View
Because, as Dave allready mentioned, Screen.AllScreens.ToString return a string into ScreenCount.
I have no idea what happend if you use the sample from Grame_Grant with a string - but I suppose that you allways will work with Screen(0) - that means your primary Screen.
Perhaps you look carefully at the sample you got and try it with the posted version ...
Ralf Meier
15-Mar-23 13:54pm
View
Hi Griff,
your answer is, as everytime, quiet correct ... but I suppose that it isn't useful for the OP because there are a lot of basics missing ...
Ralf Meier
14-Mar-23 13:29pm
View
I'm sorry, Bradley ... but I see absolutely no difference between the Solution 2 and 4 and I also can't see why one of these Solutions is better than the other because both are using the same mechanism.
In fact it is no Problem to give an additional answer to an old question if it's different and/or a complete new approach - but in this case I see more the point which is called "Reputation Points Hunting" - and that is a very often used practise in this Forum. Perhaps you take a look at the "community" and there to the "Spam and Abuse watch".
But also for me there is no need to discuss this further - sorry ...
Ralf Meier
11-Mar-23 15:44pm
View
It's the same than Solution 2 - and your Reply goes to a more than one year old reply from me ... 🙄
Ralf Meier
10-Mar-23 3:08am
View
I agrre completely with those who have written before - but to give you a hint :
In the last sentence of your reply your have the answer to your question - what do you think : how could you get the Discount-percentage ? Have you ever heard from dividing ?
Ralf Meier
2-Mar-23 4:57am
View
That is basicly the same question as asked here :
https://www.codeproject.com/Questions/5355899/Csharp-listbox1-all-items-have-picturebox-pictureb
Ralf Meier
27-Feb-23 15:44pm
View
I agree with Maciej - even when there are lot of problems for you it is absolutely necessary that you are able to describe your issue an ask a useful question. Try to do it step by step ...
I don't agree with Member 15627495 - VB.Net isn't harder to learn as C# - in my opinion it is easier for to get q starting point ...
Ralf Meier
27-Feb-23 7:27am
View
If you really want to get Help or Assistance YOU should give (like Andre Oosthuizen has mentioned as a Comment) MUCH MORE INFO ...
Your Comment here isn't a useful Info (for me) ...
Ralf Meier
20-Feb-23 15:30pm
View
at 1st :
I would code "if not flagDataLoading then ..." instead of "if flagDataLoading = false then ..."
But ...
when do you set flagDataLoading to True ?
I suppose that there is the problem ...
Ralf Meier
15-Feb-23 4:47am
View
OK ... and when you put this inside a Loop you get the same result - it is the same procedure - the only difference with the Excel-Sheet is that you have done this Loop manually ...
Ralf Meier
11-Feb-23 3:34am
View
??? ... and how did you realized it in Excel ???
Ralf Meier
4-Feb-23 12:00pm
View
+5 for that ...
Ralf Meier
4-Feb-23 11:57am
View
I don't understand your reply - sorry ...
The work could be done by the code and if you read my answer carefully you could see that the sentences 3 and 4 describe the code you need.
Ralf Meier
30-Jan-23 12:50pm
View
I agree with @Grame_Grant - somewhere in your code (perhaps the Countdown-Display) forces an Invalidate of the complete Form.
Ralf Meier
26-Jan-23 18:04pm
View
without understanding the sense of your question :
- take the Byte-Part (for example 1A) from the string
- build an integer-value from it
- divide it by 2 or do a shift right
- rebuild a string-value from the new byte-value
Ralf Meier
26-Jan-23 5:44am
View
Perhaps you can explain why you think that your "Solution" is an acceptable answer to this nearly 9 years old question ?
Ralf Meier
18-Jan-23 5:52am
View
how did you have adressed the Document itself ?
Ralf Meier
13-Jan-23 10:45am
View
I 've seen it -there are no more ... ;-)
Ralf Meier
13-Jan-23 8:48am
View
Sometimes I also have no idea where to start - so I agree with Grame_Grant.
Of course ... this is a quiet easy question and also of course ... with googleling it would be very easy to get also this solution.
So ... I would downvote the question and not the answer ...
Ralf Meier
12-Jan-23 14:15pm
View
Basicly I agree with Gerry ...
What we do here is helping those who stuck at a specific point. Perhaps it is possible to help you ... but without some code from you and a idea what you want to have it is impossible (for me) - or in other way : we don't sit in front of your PC and can't see what is happening.
The concept for game rules (generally) are the rules of the game itself - if you want to create a kind of KI it depends primary also on this rules ...
Ralf Meier
12-Jan-23 11:46am
View
I don't see a question ... or is it the ask for "do the remaining work for me" ?
Ralf Meier
9-Jan-23 16:49pm
View
If ypou don't understand what I mean I must ask you for your knowledge. Did you understood any of that what I've written ?
For example derive or customizing ?
Ralf Meier
6-Jan-23 13:22pm
View
Sorry - this code doesn't help ... :(
What I would do :
- create your owh (customized) Picturebox which derives from Picturebox and has some additional Properties as :
- Back-Image (which as to be seen when the Picturebox is not activated)
- Active-Image (which is to be seen when the Picturebox was activated)
- Active-Image-Code (same Images has the same code)
- Status (tell you that the Picturebox was activated)
and also additional Methods as :
- Change_to_Active_Image (when Clicked change the Image from Background to Active)
- Change_to_Back_Image (when called change the Image from Active to Background)
- now assign the Images (randomly) to those Pictureboxes and give them a code for identifying
- if you click the 1st PB memorise it and it's code
- when you click the 2nd PB memorise it and it's code
- compare the both codes - if they are matching switch them to unvisible
- if they are not matching change both to the Backimage
- the game is over when no PB is visible
Ralf Meier
5-Jan-23 13:43pm
View
The Description from Griff for me is quiet clear - but it seams not for you ...
I suggest you provide some of your code because without it it's complete senseless to give more advises.
I suggest also that you read the solution from Griff once more and this time more carefully ...
Ralf Meier
13-Dec-22 11:54am
View
OK ... very good ... that seems to be exactly (or nearly) what you have asked for ...
Since I am a kind of collector it is very interesting for me - who knows when I need something like that by myself ...
Thanks for your Reply :)
Ralf Meier
12-Dec-22 11:17am
View
Thanks for the Sample - I will take later a deeper look on it ...
The posted Solution I found (on CP) while looking for a complete different approach ...
Ralf Meier
12-Dec-22 8:05am
View
I have posted a way to a Solution for you ...
Ralf Meier
12-Dec-22 7:02am
View
you could be right - it seams to be a mix between C# and VB.Net ... (but perhaps it could be modified)
But now I have a little time - so I will try it by myself. If I get a Solution I will post it for you ...
Ralf Meier
11-Dec-22 11:56am
View
it looks good - you should provide it as a Solution ...
Ralf Meier
11-Dec-22 7:56am
View
Complete correct.
Wheen I do this I normally scan the Controls-Collection for the names and add them to a Listbox inside my Form (so I could see the Names) - often the Name itself says all about the Function of the Control. If not you should do the same with the Types.
I'm very interested on your progress - so please hold me informed ... ;-)
And of course if there are further questions ...
Ralf Meier
11-Dec-22 6:54am
View
As I wrote before :
You must use Reflection. Each Control has a Controls-Collection which holds all Sub-Control inside it (if there are some). Now what you have to do is : iterate through this collection and find the Name (and by this also) the Reference from the Tabcontrol. But perhaps (that could also be possible) the control is the TabControl (that means derives from it).
If you have the TabControls Reference you can add a new TabPage to it.
How familiar are you with doing something like this ?
Ralf Meier
11-Dec-22 6:35am
View
Basicly I can imagine that the Solution from Mike is working - but there is a lot of knowledge neccessary to do this.
In the past I often modified the windows-delivered Editors but mostly to exclude given controls or functions - but I suppose that the other way round is also possible. For this you need to know the content of the UI - that means : what is the Name of the Tabcontrol and where is it located. Now you can perhaps add another Tabpage to it with the content you like to have. The functions of your new Tabpage must deliver the selected value to the Return-Parameter from the original UI - for this you need to know how it is done. I think that this is the most problematicly part (and I have no idea how it could be done).
If you want to have this special function ... why don`t you create you own ColorEditor which works like you want to have ...?
Ralf Meier
23-Oct-22 6:45am
View
How does the data inside the CSV-File look like ... and how should it look inside the DGV ?
Ralf Meier
20-Oct-22 16:45pm
View
use the "improve question" widget to show the actual code - but not as "something like this"
Ralf Meier
20-Oct-22 9:17am
View
But independant from that ... the code, like it is posted, makes no sense and I suppose that there is also an Event-Problem (an Operation is started before it should be startetd) ...
Ralf Meier
20-Oct-22 2:52am
View
... and also makes no sense at all ...
Perhaps you post us the correct code for suggestions ...
Ralf Meier
19-Oct-22 10:48am
View
Show the complete code from this ... and tell when it is called ...
Ralf Meier
17-Oct-22 2:30am
View
Hi ...
I'm glad to see that you have accepted the solution.
If this answer is working for you please be so kind and rate it.
Ralf Meier
17-Oct-22 2:27am
View
Basicly, when working with a Com-Port, you should allways know how the communication-protokoll is. That means : what is the request und what is the answer. If the answer is variable you normally get this information from one of the first bytes of the answer.
In the moment I don't know how to give you more help ...
Ralf Meier
16-Oct-22 10:24am
View
I'm not quiet sure if I had complete understand your problem - but perhaps :
If you use the DataReceived-Event from the Com-Port you should realize that this Event is fired with the first incomming Character - that means that you should check if all the Characters you are awaiting are inside the Receive-Buffer - that may be a time later.
Baiscly you could check how many Chars are inside the Buffer before do anything further ...
Ralf Meier
29-Sep-22 6:10am
View
You should give much more Information - either about your control and also about the code you are using ...
Without this it is impossible to give useful advises - sorry
Ralf Meier
11-Jul-22 3:57am
View
you should 1st identify what is one weighting-sequence - I suppose that each time you get a string from your unit it is the actual value. So I suggest you not append your textbox (richTextBox1.Text += ...) but assign to it (richTextBox1.Text = ...).
but ... what device you are using - I think that your "problem" is to be solved with paramters of the device ...
Ralf Meier
29-Jun-22 3:28am
View
also it's not complete that what the OP has asked for.
In my opinion the 1st Solution from Griff was the best ...
Ralf Meier
2-Jun-22 8:29am
View
you want to have your graphic with more than one String in it ...?
or do you want to print your string inside an area with more than one line ? For example like this :
this is
my string
Ralf Meier
28-Apr-22 8:29am
View
I don't understand ... try to explain the relationship and the maximum content.
I suppose that you will need a main-class, which holds the properties, and some sub-classes, corresponding to the properties ...
Ralf Meier
19-Apr-22 9:31am
View
you have a kind of Line-definition : y= m*x + b
the only thing you need to do is to check how much of the point-pairs have the same Line-definition / matches to one line-definition ...
Ralf Meier
19-Apr-22 8:43am
View
do you know the Specification of the Line you are searching for ?
Or the other way round : with your 1st sample you work with the line (1,1 - 2,2 - 3,3) - who says that this is the right line ? the right line could also be 1,1 - 1,4 and then the 2 points between are wrong ...?
the same with the 2nd line ...
Ralf Meier
19-Apr-22 8:38am
View
Hi Eddie,
I have to say that I'm not quiet sure at the moment if the KeyPressed-Event is exactly the right approach (in the moment I'm not able to look for it). If it is right you will get the Enter-Key as possible KeyCode-selection. Otherwise you should look for what Richard has mentioned - the KeyDown-Event. Also there you have EventArgs which gives you much more Info than the "Standard"-EventArgs - but you are allways able to select that because all Special-EventArgs are deriving from this class ...
Ralf Meier
15-Mar-22 8:00am
View
To answer your question in your reply (to Griff) : Yes i did ...
Perhaps you haven't had any idea - but in this case you should give much more information. You did nothing of that - no ground to start from ...
And ... for me the answer you gave to Griff was abusive ...
Ralf Meier
15-Mar-22 4:17am
View
Think about what you write and don't be abusive ...
Of course you will get an answer if you give information where you stuck - but what you have done is : "do the work for me ..."
Ralf Meier
24-Feb-22 15:05pm
View
Thank you, Maciej ... :)
Ralf Meier
26-Jan-22 4:07am
View
Congratulations ... you have allready answered a question which ist more than 10 years old ...
Also an answer is allready given - more than 10 years ago ...
Ralf Meier
13-Jan-22 9:34am
View
I suppose that you look at it the wrong way round ...
If you have a UserControl which has several other Controls in it - why you don't give the UserControl new Properties which work with the Properties from the Controls inside which could by changed by the User.
I suggest you should be more specific ...
Ralf Meier
2-Dec-21 6:20am
View
Please don't answer a more than 5 years old question with an answer which is allready given ... (see both Solutions before)
Ralf Meier
2-Sep-21 9:03am
View
Which Property do you mean exactly ?
Do you have set the DesignerVisibility to DesignerVisibility.Content at the Property-Attributes ?
Ralf Meier
27-Aug-21 15:14pm
View
I agree completely with Bill because your own desciption says exactly what has to happen - you only have to create a code from it.
To give xou a little start :
- the Selection of you Combobox should depending on the Seletion assign something.
- the Button, if pressed, has to work with that what was previously assigned.
Perhaps you give it a try ...
Ralf Meier
17-Aug-21 5:41am
View
If you have an additional question then start another question and don't post it as a Solution ...
Ralf Meier
5-Aug-21 3:11am
View
Thanks Maciej :)
Ralf Meier
18-Jul-21 16:01pm
View
How do you get access to the Controls of your Form ?
And how do you think that your class could get it ?
How do you instance this class ?
Ralf Meier
17-Jul-21 15:55pm
View
If you have a question then you should ask your own question ...
actually have created a Solution - which isn't one ...
Ralf Meier
3-Jul-21 13:21pm
View
Sorry Richard ;-)
the 1st answer has the wrong average - it must be 7 and not 7,5 ...
Ralf Meier
3-Jul-21 2:44am
View
No ... sorry ... give it a try - it's easier as you think.
If you have some code which makes problems you are invited to come back and ask something ... but not "please write the code for me" ...
Ralf Meier
2-Jul-21 5:41am
View
Excuse me ... what part of my description is unclear for you ?
Don't you know how to handle the SPLIT-Function ? Or to handle Array-Elements ?
Ralf Meier
28-Jun-21 5:21am
View
I asked you to describe what should happen - as you see by the answer of OriginalGriff your code itself makes no real sense.
So what should happen ?
Ralf Meier
28-Jun-21 5:14am
View
Perhaps it is easier if you try to describe what you want to achieve ...
Ralf Meier
28-Jun-21 4:13am
View
If none of the given answers are matching to your issue you should think about the description of what you want to do.
Perhaps you should improve your question with much more information - for me it sounds that you want to have sub-items to your items ...?
Ralf Meier
28-Jun-21 2:50am
View
Hi Griff,
the Brackets ? Right ?
But you are right - today it's really very early in the morning ... ;)
Ralf Meier
20-Jun-21 3:36am
View
It is like Patrice allready has mentioned : you should set a Breakpoint (perhaps at the line 'TextBox2.Text = ArrayTag(2)') and look with the Debugger what REALLY is inside ArrayTag - I suppose that you will see that there are only 2 Elements inside ArrayTag (Index 0 and 1). Give it a try ... ;-)
Ralf Meier
11-Jun-21 4:08am
View
Initilized means that the Variable "exists" - if we speak about a Variable. If we have a Class-type you only have a placeholder - that doesn't mean that the Variable is instanced.
If you want to have a defined content you have to do it. If we speak about a (more or less) Standard-Variable you have to assign it. If we have a Class-type it could be done with the Constructor (to Default) or with a customized Contructor (as in your sample above) to special values.
Ralf Meier
11-Jun-21 1:28am
View
As Richard wrote in the other Solution : if you want to have a defined content you are responsible by yourself to ensure that.
I would never let a Variable unassigned - but that's my 2 cent ...
Ralf Meier
10-Jun-21 4:22am
View
I'm sorry - I refered to your Class-Example ...
The Struct must be initialized when used as a Variable (perhaps with the Constructor of the Class which uses it)
Ralf Meier
4-Jun-21 3:37am
View
it will be helpful to see the code from the method "CreateRoundRectRgn" - perhaps you improve your question (use the widget "improve question") and provide this missing code ...
Ralf Meier
1-Jun-21 14:17pm
View
+5very interesting Solution.
I never thought that it could also be realized in this way - until today I've allready realized that with "conventionell programming".
Thank for it ... :-)
Ralf Meier
19-May-21 9:06am
View
Congratulations ... you have answered a nearly 8 years old question - and this question was allready answered.
Only to get Reputation Points ?
Ralf Meier
1-May-21 15:54pm
View
... and what happens ?
Which result do you get ?
Ralf Meier
20-Apr-21 3:42am
View
to get a useful answer it's very necessary to give information about your issue AND information where you stuck.
Apologize ... but for me your question is complete un-understandable and senseless ...
Ralf Meier
15-Apr-21 8:44am
View
If you have a Question then ask it as Question and do not add it as Answer to an existing Question ...
Ralf Meier
28-Mar-21 6:50am
View
not quiet correct ... I suppose.
As I see each incomming sequence is ended with a LF - I haven't seen that before.
Your Solution might work (in the moment - but could make an error in future). You look if your incomming sequence contains a LF - I would change it to that your incomming data must End with LF ot ENQ or EOT. Also you should work only with that String-part which is ended with one of these Chars ...
Ralf Meier
26-Mar-21 13:43pm
View
Not really. It depends on your Communication-Protokoll.
The Serailport has the Property BytesToRead. This Property gives you the Information how much Bytes are actually inside the Buffer.
If your are awaiting (for exmaple) 10 Chars and there are only 6 in it you should exit the Method - with the next incomming Char the Event raises again.
If the Buffer contains more than 10 Chars - but you need only 10 - you should not ReadExisting - read only those which are needed by you.
Another Approach could be not to use the DataReceived-Event. You could also use a Timer (for example each 100 ms) and check there if the count of Chars are matching to what you need.
Give it a try - you know much better than I what is needed and when ...
Ralf Meier
19-Mar-21 9:04am
View
There is no real difference to the code from the OP. It must work with .Value as well ...
I suppose that one (or more) of the source-Cells doesn't exist ...
Ralf Meier
15-Mar-21 11:07am
View
OriginalGriff exactly wrote what your problem is - your Exeception says : "expected Typed is DateTime" - you give it a string ...
That means in other words : you want to get a car - and the seller gives you a cheese.
Ralf Meier
13-Mar-21 10:14am
View
Hi Bill,
I agree with you ... and I doesn't meant OriginalGriff as reference - I'm definately in the position to see there a difference ... :-)
I think you have also read the rest of my comment - I also try to be serious too ...
Ralf Meier
13-Mar-21 7:06am
View
I don't understand the calculation within your provided code. I suppose you try a kind of scaling.
But when you ask for Screen.PrimaryScreen.Bounds.Height==600 - why do you divide inside your scaling with 768 to get your faktor ?
Ralf Meier
13-Mar-21 7:01am
View
@Bill:
I have to break a stick for Patrice. This is an often given answer (as well as Solution) to questions like this. I you make a downvote here you must make this by each and every question which gets an "Solution" like this.
Of course - you are right - it's not a Solution, the Solution (in my opinion) could one if the OP gives much more Information about his problem. I also stuck at the point "conversion Symblos to Numbers" ...
Ralf Meier
11-Mar-21 14:00pm
View
Excuse me ...
tabselector.SelectedIndexChanged ?
That Event normally should come from the TabControl itself ... what is "tabselector" to you ?
Show More