Click here to Skip to main content
14,740,393 members

Comments by lukeer (Top 200 by date)

lukeer 20-Oct-20 4:02am View
   
Thank you.
That looks as if I would essentially create a custom header of the size I want it to have.

Is it possible to not do that for a particular TabControl but in a way that it can be applied to several (or all) TabControls in a Window?
lukeer 1-Oct-20 3:20am View
   
Ok, then let's forget about that article.
How do I load that filter graph file in a WPF application to get the video from camera to desktop?
lukeer 30-Sep-20 4:30am View
   
Actually, I need to display a live video from a USB camera, not from file. What would I have to set MediaElement.Source parameter to to capture from my camera?
lukeer 23-May-18 8:19am View
   
That works. Thank you very much.
Make that an answer and I'll upvote it as much as it gets.

May I ask if you know a rule behind when to use quotes and when not or what is causing this behaviour in this case?
lukeer 27-Mar-18 3:02am View
   
Is it in Windows Forms or XAML?
Which chart control do you use?
lukeer 19-Jan-18 4:19am View
   
Technically, you will always have to download the file. You can only choose the destination: memory, temporary file, user defined file, etc.
lukeer 19-Jan-18 4:19am View
   
Deleted
Technically, you will always have to download the file. You can only choose the destination: memory, temporary file, user defined file, etc.
lukeer 19-Jan-18 4:16am View
   
By "it's output", you mean the result of d.ToString() or items.ToString(), or items1.ToString(), am I right?
If yes, then you need to write a function for that which iterates over all elements of the array and prints them. That's a different topic from removin an element from a n array.
lukeer 19-Jan-18 4:11am View
   
That's because the List<whatever> class is already brought to you by the .NET framework.
lukeer 8-Dec-17 2:15am View
   
Ad far as I understand it, yes. There's an unlimited number of passwords that all give the same hash and therefore are accepted by the password checking function.
Finding such a password that matches the hash is called a "collision".
But those passwords are not guessable from looking at the hash. You have to try them all. And there are far more possibilities that don't match than those that do.
lukeer 2-Nov-17 6:07am View
   
Give user a user interface.
You could put 4 DataGridViews on a form, along with RadioButtons that indicate which one to use.
User can then put his/her preferred filter values in one of the grids, you would make every input to also select the respective grid.
The form is then responsible for providing a
public double[,] Kernel
{
    get
    {
        // export correct values
    }
}
property. And there you have your values.
lukeer 27-Oct-17 7:04am View
   
So you need user to select one of four possible kernel sizes.
That's OK, your kernel property is of type double[,]. It should be able to handle different sizes. And the code that uses it checks for the actual kernel size in int foff = (kernel.GetLength(0) - 1) / 2;. Where exactly do you see the problem?
lukeer 25-Oct-17 7:12am View
   
Yes, it is declared in interrupt.h.
interrupt.h is #included in the code file in question.
And the path to interrupt.h is given to clang with -I path/to/interrupt.h (without the actual file name). So why is the macro not recognized?
lukeer 31-Aug-17 3:20am View
   
Of course you do.
I'm citing your question: "[...]passing the pointer of a 2D array to another function that then prints the 2D array.[...]"
You want another function that operates on the 2D array.
Operate == print
2D array == matrix
lukeer 27-Feb-17 3:27am View
   
C# doesn't care about files. It cares about objects and classes thereof.
Where exactly is the problem in CTRL+C CTRL+V two of the files into the third?
Does the program not compile anymore? What error do you get?
lukeer 9-Dec-16 2:01am View
   
That was a rhethorical question.
NotPolitcallyCorrect actually wanted to tell you that pictureBox1.Image is assigned an empty MemoryStream. That is defined and instantiated just before that. But it's still empty.
You have to fill it with bytes before you can create an image from it.
lukeer 8-Dec-16 2:32am View
   
The second example would be plain wrong. Don't you mean
70.05 -> 70.1 or
70.5 -> 71 instead?
lukeer 28-Nov-16 6:55am View
   
What environment are you in?
WinForms? XAML? A database? Which one?
What is an xlWorkSheet? Is that Excel?
lukeer 23-Nov-16 4:41am View
   
The text of your link is what you wanted to post. But the actual link points to here.
lukeer 5-Oct-16 4:38am View
   
So you integrated a patch even though your code worked properly.
Why did you patch your code? (New feature, fix a bug, ...)
What changes did the patch introduce? (Show code before and after)

Your code parses TextBoxLmp.Text twice. First into lmpdate, then again within the calculation for edd. Don't do that. Parse once and re-use the DateTime instead. That way you avoid the possibility of getting one DateTime and then working with another. Not just references, but values can differ.
lukeer 4-Oct-16 10:08am View
   
Full Ack. And thanks.
lukeer 9-Aug-16 2:56am View
   
I didn't know the comma syntax worked and never tried.
Thank you.
lukeer 2-Aug-16 7:06am View
   
Where's the chart from? Do you have access to the data that fills it? Or is it just a jpg?
lukeer 2-Aug-16 6:55am View
   
Ok, wrong word. Maybe accessibility?
You cannot access instance variables from within a static method (unless creating an instance and using that, but you get what I mean, right?) but you can access static variables from within instance methods.
lukeer 1-Aug-16 7:01am View
   
I don't see any risk of a memory leak in this code.
But the fact that you're asking makes me believe that you think of static to mean something that it actually doesn't.

The static keyword is not about memory management but about visibility (like private, public, etc).
lukeer 26-Jul-16 2:45am View
   
Sorry to say, but I'm out of ideas right now.
lukeer 25-Jul-16 3:17am View
   
Looks like the internal cam has a native resolution of 640x480 and therefore cannot provide a larger image.
The external one resolves 800x600 and can deliver a smaller image, maybe a detail (centered or upper-left-aligned) of the native image.

Tried to get an image with an insanely high resolution from the external camera? If that works, it would defy my theory.
If not, does the external camera image show the same image content or are things left out when getting the lower-resolution image?
lukeer 20-Jul-16 11:29am View
   
I don't quite get your question. Do you want to print text to a user-defined location?
Do you want to draw something in 3-d space?
lukeer 20-Jul-16 9:40am View
   
[quote]I use enter key but when comes to last column[/quote]
That sounds like you had a working piece of code that changes cell selection on "Enter" input.
If so, what prevents you from selecting next row instead of next column?
If not, how do you get to the last column?
lukeer 12-Jul-16 8:57am View
   
I'd like to upvote (Because that's what I would have advised, too). But for that, you would need to post this as an answer.
lukeer 17-Jun-16 9:17am View
   
5 again, because I remember what it felt like to not even knowing what question to ask.
lukeer 22-Apr-16 3:18am View
   
You speak of "downloading" a pdf document. But your code seems to create one. Or do you try to combine downloading a pdf and then altering it?

I tried to understand what the code does. It seems there are at least two parts put together that are separated by at least a few lines in the original code. The opening and closing curly braces don't match.
What is Response? How does it relate to everything before?

Please Improve your question to clear things up.
lukeer 21-Apr-16 8:55am View
   
Are you the author of one or both of these applications?
Or do you have to deal with existing software and just make them communicate?
lukeer 21-Apr-16 7:27am View
   
You have to copy the nodes in ordert to have something to select.
lukeer 21-Apr-16 6:38am View
   
I take that as a "Yes".
So where is the problem in copying the TreeNodes of one TreeView to the other?
lukeer 20-Apr-16 6:01am View
   
So is there a second TreeView control embedded within the DataGridView control or not?
lukeer 20-Apr-16 6:01am View
   
Sorry, I don't know.
lukeer 19-Apr-16 4:03am View
   
I don't yet get what you mean by "TreeView form in a DataGridView". Do you want
(1) a TreeView control within a DataGridView Control?
Or do you want to use several DataGridView cells to act as if they would display a tree?
lukeer 19-Apr-16 3:13am View
   
When posting code, wrap it in tags (already done this time) like these:
<pre lang="c#">YourCodeHere();</pre>
It makes code much more readable and therefore improves your chances to get an answer.
However, your code snippet is very long. I doubt anyone will read it all. Folks around here like to focus on something specific that doesn't work the way it should instead of telling you how to correctly re-organize your code base.
lukeer 18-Apr-16 8:44am View
   
This time, I think it's different. The forum is not asked to do the coding but to point OP at mistakes he makes.
lukeer 18-Apr-16 5:18am View
   
If I understand you correctly, you need some regex to replace <p>.
Try ^\d. That's a number at the start of a line. If that's not what you need, you'll have to describe your requirements in more detail.
lukeer 1-Apr-16 3:39am View
   
Now I got it. That's a very early April Fool's Joke.
lukeer 14-Mar-16 10:37am View
   
Don't repost. If you have additional information, Improve the original question.
lukeer 14-Mar-16 6:58am View
   
Don't repost.
lukeer 14-Mar-16 6:58am View
   
Don't repost.
lukeer 14-Mar-16 4:29am View
   
Don't repost. Improve your original Question instead.
lukeer 11-Mar-16 3:10am View
   
Please, when posting code, wrap it in tags:
<pre lang="c#">YourCodeHere();</pre>
That's a lot more readable.
lukeer 10-Mar-16 8:27am View
   
Multiplication will still result in Dec 2013 being greater than Jan 2014.
lukeer 29-Feb-16 3:17am View
   
You can start an application from a windows share. Maybe you're asked for an administrator's password. That depends on your .NET environment's security settings.

But that means that you have several instances running. Just as first copying the application and running it from your machine. Therefore, the "transaction with database" part may or may not work the way you're expecting it to.

Please improve your question explaining in more detail what you want to be transacted.
lukeer 9-Feb-16 2:46am View
   
There are buttons created on form load (a) and buttons created on button click (b).
1) (a) and (b) have the same locations. Change one of the identical (4 + i * 100,... appearances.
2) All (a) share a Click event handler. They will do the exact same thing. Either throw them out in favor of just one button or have them do individual things.
3) (b) have no Click event handler attached at all. They won't do anything. What are they there for?
lukeer 8-Feb-16 4:55am View
   
It hides the button that user has been clicking on. If that's not what you wanted please Improve your question so it describes clearly what buttons are there, what is the "main button", which button shall be hidden.
lukeer 8-Feb-16 3:59am View
   
There is no newPanelcategory in newPanelCategory_Click.
lukeer 2-Feb-16 7:04am View
   
Please enclose your code with tags like these:
<pre lang="C#">YourCodeHere();</pre>
It makes code a lot more readable.
lukeer 27-Jan-16 5:28am View
   
Odd's counterpart is even, not Evan. That would be Jim Carrey's rival for the anchorman job.

But I'm 99% sure that spelling has nothing to do with your exception.
lukeer 30-Nov-15 3:24am View
   
Thank you, that's exactly the type of stuff I was looking for.
lukeer 30-Nov-15 3:20am View
   
The requirement has gone academic during wednesday afternoon (and, in fact, evening) due to some changes to pre- and post-scaler settings. With this new setup, 24 bits are indeed enough and the compiler takes care of all the fiddling with 8 bit registers.

But who knows? Some time an 8-bit device will have to calculate on something larger than 32 bits. So I'm still interrested in algorithms adding and multiplying arbitrary amounts of chars to one another.
lukeer 27-Nov-15 2:43am View
   
Yes, of course. Thanks for pointing that out and have a 5.
Any hint on the actual question?
lukeer 27-Nov-15 2:42am View
   
Corrected that. I forgot to mention that this is not for .NET or even PC but an embedded device. I changed the data type within the struct to clearly state what size it is.
lukeer 24-Nov-15 2:39am View
   
As he wrote. When user sets the password, "encrypt" it in the input form. Then leave it encrypted forever.
At the time user needs to authenticate, "encrypt" whatever user typed and compare to the stored encrypted password.

You never decrypt the password.

You have an encryption key and a decryption key there. They're identical. That's called symmetric encryption. You don't use it in this case because anyone that gets to see your code knows the key and can decrypt all the passwords even if you didn't provide a decryption method.

Instead you use a "cryptographic hash method". Those methods are irreversible. No matter who gets your code, it won't help reconstructing the passwords from their hashes.
lukeer 23-Nov-15 8:45am View
   
Maybe that's a native dll, not a .NET assembly like your software?
lukeer 28-Oct-15 4:23am View
   
Please add this code to your question within tags:
<pre lang=C#>YourCodeHere();</pre>
That way it gets a lot more readable.
lukeer 28-Oct-15 4:18am View
   
Ha ha!
I find it funny because it didn't happen to me.
This time.
lukeer 28-Oct-15 4:17am View
   
Deleted
Ha ha!
I find it funny because it didn't happen to me.
This time.
lukeer 28-Oct-15 4:15am View
   
Are you sure that the linq lookup doesn't loop in the background? Does it use some clever hashing wihtout the user preparing it?
lukeer 18-Aug-15 3:13am View
   
Look at my comment here.
lukeer 18-Aug-15 3:11am View
   
Theres a "Dots per inch" setting in your operating system somewhere. Set it to a lower rate to make buttons and stuff spread over more inches. But be prepared that some software will look ugly due to its developers not thinking of other-than-standard dpi settings.
lukeer 29-Jul-15 8:43am View
   
I updated my answer. What do you mean by "move but not with mouse"?
lukeer 29-Jul-15 7:30am View
   
I have no code. It's your project. You have the code.
See my answer.
lukeer 29-Jul-15 5:48am View
   
label13_MouseDown() doesn't subscribe to the MouseDown event. Therefore, it won't get called.
lukeer 29-Jul-15 5:43am View
   
You should leave your question int the Article's comment area. The author will be notified of your comment. That way, you're more likely to get an answer than by hoping that someone with expertise drops by here.
lukeer 29-Jul-15 5:35am View
   
Which part does not work?
Have you checked What data type is dr["UFName"]? If it's an empty string, it may get displayed but looks as if nothing has happened.
I'd start by setting a breakpoint on ExecuteReader() to see what's being fetched from the db.
lukeer 27-Jul-15 9:24am View
   
You could store the color alongside its text in a custom class.
lukeer 22-Jul-15 8:58am View
   
Do you want to zoom in Google Maps? Or do you want to zoom in some image in the same way it works in Google Maps?
lukeer 22-Jul-15 3:33am View
   
That's what OG meant after "AH!" (I think). Thanks for explicating.
lukeer 9-Jul-15 7:35am View
   
I don't know "TTS wave", but did you already have a look a its preferences? Maybe there is a sample rate setting for import and/or export? Maybe you have to set the sample size, too.
lukeer 7-Jul-15 4:20am View
   
It works the other way round.

What you're trying is to send data to the parent form. I suggested to let the parent form catch data from its child.

There's an error in your implementation, though: Your code creates a whole new Form1(); whereas it should use the existing form. But better to drop that approach altogether. Too much for a comment. Look at my answer.
lukeer 6-Jul-15 3:07am View
   
Thank you for your clear solution. Looks like accepting the need for LanguageId_Invalid is perferrable to the workarounds I thought of.

As for your comment on<pre lang="c#">return( *(oneLine.Heap + _currentLanguageId));</pre>Yes, something is wrong with this statement. My hope was that someone would come up with the correct syntax for that. Because<pre lang="c#">const char* Heap[]; is impossible without specifying Heaps size as well, which in turn calls for LanguageId_Invalid.
So, thanks again.
lukeer 6-Jul-15 2:34am View
   
That's precisely what I'm trying not to do. const char** Heap is designed not to need any setup. That's why it is in a union with the struct (Structured). Along with defining the latter, I want to be able to use the former.
lukeer 3-Jul-15 9:02am View
   
Does the childform close when user selects a row? If so, you can simply store a value within the childform, give it a public read-only property and read that from parent after closing and before disposing child.
lukeer 3-Jul-15 8:43am View
   
I think I get your point: All the NodeIds mentioned here are from the NodeIds enumeration. Therefore they start at zero increment by one up to the last (NodeId_EN). That way, yes, I could use the NodeId as index for the Translations[] array.

But that won't hold true for the entire program.
There will be ids in the sense of const char* GetTranslation( int id ) that don't originate from the enumeration mentioned here. These stem from a code generation tool and maybe there will be more entries at a later time. There will for sure be strings to translate that this tool isn't aware of. Those ids, I will have to start with a number greater than the largest tool-generated id. I will keep a thousand or so numbers unused in between the two id blocks. That makes them unfit to be used as array index.

Hence the loop.

How can I dereference const char** Heap; so the result is a const char* that a string output function will consume?
lukeer 3-Jul-15 6:14am View
   
Thanks for pointing me there. Some code seems to have vanished from that function. Maybe due to < and >. Or not.

The loop searches the Translations[] array for the entry with the correct NodeId. That entry contains the desired text in all the provided languages.
lukeer 3-Jul-15 5:35am View
   
I updated my question. Feel free to point me at missing information.
lukeer 3-Jul-15 5:35am View
   
I updated my question. Feel free to point me at missing information.
lukeer 5-Jun-15 3:35am View
   
Caught you in a bad mood today, huh? Sorry for that.

But for a more interesting question: How do you hide your name behind "(no name)" when editing someone's question?
lukeer 7-May-15 2:06am View
   
Ok, so let's for now forget the static data part.
A pointer to an array of child nodes should be possible. How to initialize that?

And then back to the reason for the static part. How to keep the completely initialized data off RAM and store it in flash? Is it even possible to store pointer stuff in flash?
lukeer 5-May-15 2:37am View
   
Breakpoints slow things down. I guess that is giving your processes time to sort themselves out. Without the breakpoint, they're running at machine speed and "historian service" kicks in at a time when "ftp service" has not yet finished using a file.

Show where exactly the error happens.
lukeer 4-May-15 7:50am View
   
I guess that's why you have exactly a thousand times the rep points as OP.
lukeer 13-Apr-15 9:07am View
   
Is this Windows Forms, WPF, ASP.NET, ...? Please tag your question accordingly. Use the Improve Question link for that.
lukeer 25-Feb-15 2:42am View
   
Although I appreciate this completely different approach, it doesn't work in this case because the .inf file doesn't contain a [DefaultInstall] section.
Thank you anyway.
lukeer 21-Jan-15 7:31am View
   
But there's no need for 3.5 in my code. Nor in any of the project's libraries that I know about.
How can I find out what part needs 3.5?
lukeer 9-Jan-15 6:21am View
   
What have you tried?
What doesn't work as expected?
Please improve your question.
lukeer 8-Jan-15 7:30am View
   
See? That doesn't work.

What are the original files? Is there a chance to get them smaller before your compression? That means: are you in control of the files, or does the user select anything he wants?
lukeer 7-Jan-15 5:31am View
   
I updated my solution.
lukeer 15-Dec-14 6:19am View
   
Use DateTime.TryParseExact()[^] instead of a simple DateTime.Parse()[^]. That way, you can specify the exact (hence the method name) structure of the date that gets entered. That helps to handle cultural differences in writing a date.
lukeer 15-Dec-14 6:15am View
   
What language extension of C#3.5 is this?
lukeer 15-Dec-14 6:14am View
   
Nothing needs to be wrong in a solution for it to get downvoted. That just happens.
lukeer 15-Dec-14 2:03am View
   
While this solution surely would work for displaying items, editing and adding them in the DataGridView, it completely ignores the blessings of databinding and therefore leaves me with the burden of synchronizing the data and its view. In both directions.
Thank you for your effort, but I tend to use my own solution (see #2).
lukeer 26-Nov-14 1:47am View
   
No, it doesn't. Whether you use Math.Round(double)[^] or Math.Round(decimal)[^], they return a double, or decimal respectively.
It is up to a string formatting method to determine how many trailing zeroes an application shows.
lukeer 28-Jul-14 7:58am View
   
You need to define what UI to use for rendering the string.
Forms? Asp.NET? WPF? What? Tag that, then reply.
lukeer 25-Jul-14 8:01am View
   
The link to MSDN on SerialPort provides an example of how to send and receive data.
The "send something and get response" part requires the device connected to the port to do so. Let's assume you have a thermometer with RS232 connected to Com12 and you know its API.
Let's furthermore assume that you send GETTEMP\r\n and expect to receive TEMP=NNN°C\r\n, where NNN is a number of up to 3 digits in length.
Then you could loop through all your ports, send each one the GETTEMP message and test for reception of a matching response within a bearable time interval.
Upon successful reception of a response that matches your expectation, you would know that a thermometer with the API you know is connected to the port you just tried.
After iterating over all ports and still not having received a "good" answer, you know that something isn't how you would like it to be and present user an error message.
lukeer 25-Jul-14 6:13am View
   
I've updated my solution.
lukeer 25-Jul-14 4:43am View
   
For some characters, like 'é', there are two possibilities. The single character you mention _and_ a composition of 'e' and '´'.
If I want a somewhat more exotic combination, I'm left with _only_ the second possibility.
lukeer 25-Jul-14 4:08am View
   
In light of recent research, I have to disagree.
[impose=you-know-who] Please see my answer [/impose]
lukeer 24-Jul-14 9:14am View
   
Now that you mention it, yes, I've seen it. But it addresses the input of single characters. I need to combine macron and 'v'.
Any idea for that?
lukeer 23-Jul-14 1:51am View
   
I don't have it. I just described what needs to be done.
If you have a specific problem in your code not behaving as expected, tell us what exactly doesn't work.
A new question could help with that. It' a great way to show what part of your code needs to be tuned.
And drop me a note here so I get informed when you're done postin your question.
lukeer 22-Jul-14 4:58am View
   
First, you need to separate the main sections from one another, then you can compute their slopes.
Are those sections at the same position on the x-axis all the time?
Is there always the same count of sections?

Please update your question accordingly.
lukeer 21-Jul-14 8:56am View
   
You have a DateTime and suggest to format it to a string and parse that right away back to DateTime? Really?
lukeer 14-Jul-14 5:56am View
   
[quote]have to access both methods on button_Click event.[/quote]
That info would belong in the solution, then.
lukeer 14-Jul-14 3:06am View
   
And block the whole UI for 10 seconds? Are you sure that this is such a good idea?
lukeer 16-Jun-14 4:35am View
   
1) Check what colours are used in the picture.
2) Create a new colour index with only the used colours.
3) Save image with new colour index.
What have you tried? Where are you stuck?
lukeer 16-Jun-14 4:34am View
   
Forget Design Time. Put the grid there, handle exact positions in code. That way, you can do it exactly to the pixel.
lukeer 11-Jun-14 3:54am View
   
Or start with digits 1-z right away. However, given enough iterations, one time someone will complain about the barcode containing nasty words.
lukeer 23-May-14 5:29am View
   
In this case, it's a simple matter of setting
btAdd.Enabled = true;
or false, depending on what button has been pressed.
lukeer 23-May-14 2:35am View
   
Where are those buttons?
Are they within your program? Then you don't want your program to run and stop, but just a method within it. And the most important question of all: What exactly is the problem with this?
Show us the part of your code that does not behave as expected, tell us what you expect and what happens instead.
lukeer 21-May-14 5:53am View
   
Improve your question to show the relevant code part (remember to enclose it it such tags:
<pre lang="c#">YourCodeHere();</pre>
With Form2's code, I expect us to find why the public string (better use a property) didn't work.
lukeer 20-May-14 4:13am View
   
A screen capturing application can have focus even though op's form is still maximized, or not maximized, it doesn't matter. It's focus that counts.
The screen capturer then gets input, takes a screenshot, saves it. There's nothing op's form can do about it.
lukeer 16-May-14 3:19am View
   
Improve your question. Tell us what your source code does and what you expect instead.
And show the relevant portion of said source code so we have a chance to find what's going wrong.
lukeer 15-May-14 4:33am View
   
I agree with the "test before parse" part. But why should OP use Convert.ToString() instead of .ToString()?
lukeer 14-May-14 8:03am View
   
Obviously, drTExp is nothing that can be interpreted as decimal. What exactly is its value?
lukeer 14-May-14 7:56am View
   
I suppose what you wanted to do is reply to amir tarek instead of commenting on my solution.
But then, this is nearly a year old.
lukeer 13-May-14 7:18am View
   
I'm afraid not. I have no idea how printing that way actually works.
My experiences with .NET printing are based on the PrintDocument class (there's an example on the linked site). This way, you can use a PrintDialog to ask user for printing properties and use them for as many documents as you wish. But I don't know how to get a .pdf into that.
lukeer 8-May-14 3:53am View
   
Nice.
lukeer 6-May-14 7:40am View
   
You have two tasks here:
1) get the information
2) display the information
Where are you stuck?
lukeer 6-May-14 7:32am View
   
But the DataGridView is data-bound. IIRC, you can't fill individual cells in that case. Instead you have to provide all data via the given data source.

However, before we get to that point, sort out the problem at hand:
break up the calculation so you get integer values for Cost, InsuranceCost and Total, calculate, assign to the correct cell. Then you should see what step throws the exception (that's just another way to do what Tadit Dash suggested).
lukeer 6-May-14 4:04am View
   
Enclose code in tags like these:<pre lang="vb">YourCodeHere</pre>
(FTFY)
lukeer 6-May-14 3:59am View
   
Title too long. Question too vague.

Event if I read the long title as question, I just don't get your problem. You'll have to describe it better. Use the Improve question link.
lukeer 30-Apr-14 5:51am View
   
1) "There" means some location. Your title means possession, in plural form, which would be expressed by "their".
2) The title is far too long.
3) Use proper capitalization. All lowercase is considered childish, all uppercase is considered shouting (and therefore rude).
lukeer 30-Apr-14 1:11am View
   
When posting code, please include it in tags like these:
<pre lang="c#">YourCodeHere();</pre>
This time, I did it for you. As you can see, it makes the code a lot easier to read.
lukeer 29-Apr-14 9:30am View
   
I updated my solution.
lukeer 29-Apr-14 7:38am View
   
The Subjectseup() method is executed once for each row in the DataGridView?
lukeer 25-Apr-14 8:16am View
   
That will be -100 to -1.
nud1.Minimum = -100;
nud1.Maximum = -1;
lukeer 24-Apr-14 6:02am View
   
As others have mentioned, do it. To validate text input, use the method I suggested. It will tell you whether or not the input is a correct date.
But better would be to use a DateTimePicker[^] control instead of a TextBox. It's there for just that reason.
lukeer 22-Apr-14 3:07am View
   
You know the file path, use it to get a FileInfo object. It has a Length property.

Or, without disk interaction, save to a MemoryStream instead. It offers a Length property as well.
lukeer 17-Apr-14 7:47am View
   
PNG is a format with lossless compression. You can't exactly tell in advance how large a file it will produce.

Your only chance for an exact value is to save to a file and display the size after that.
Or you settle for a coarse estimate and scale the original file size by pixel count_ratio = newPixelCount/oldPixelCount.
lukeer 17-Apr-14 2:53am View
   
Have you checked the SerialPort.BaudRate value to be the same as the one used by the external device?
lukeer 16-Apr-14 4:16am View
   
What exactly do you want to be in the resulting text file?

Is it the song/speech text?
A description of how the file sounds?
Artist/Title and so on?
lukeer 11-Apr-14 1:36am View
   
What's that "call constructor with braced expression" thing called? I'd like to be able to look that up eventually.
I mean Form dialog = new Form { StartPosition = FormStartPosition.Manual };
lukeer 11-Apr-14 1:34am View
   
How do you know I am tired? And since when is that smoke detector equipped with a zoom lens? ;-)

Congratulations on a working solution. Keep on coding.
lukeer 11-Apr-14 1:26am View
   
Sounds like you have Form2's StartPosition still at its default. Set it to Manual (like mentioned in the [Edit] part of my solution).
lukeer 10-Apr-14 8:07am View
   
Is it the same exact place or does the form wander down and to the right a little bit with every button hit?
lukeer 10-Apr-14 7:25am View
   
Are you sure it's exactly the same, especially the PointToScreen() part?
lukeer 10-Apr-14 0:59am View
   
Then let's start over:
Show your code (Improve question, remember tags). What do you expect? What happens instead? Any error messages (complete text)? In what code line?
lukeer 9-Apr-14 8:52am View
   
Ok, I tried it in a test project and updated my solution. Works on my machine.
lukeer 9-Apr-14 7:20am View
   
The Properties.Settings.Default.Save(); part is important. Back then, trying to get this to work, I managed to ignore it for several hours.
lukeer 9-Apr-14 7:08am View
   
Improve your question by posting your current code. Wrap it in tags: <pre lang="c#">YourCodeHere();</pre>
lukeer 9-Apr-14 6:28am View
   
I suspect that it's slow to read the same file diff.Count times. Try to read it once and use the same instance of XmlTextReader in each iteration of the loop. Maybe that's faster.
lukeer 9-Apr-14 6:22am View
   
PointToScreen[^] needs an argument of type Point[^]. I corrected that in my solution.
BTW: MSDN[^] comes in very handy for every .NET developer. And it has a search function.
lukeer 9-Apr-14 5:33am View
   
0) "did not work" and "got error" are too vague.
1) What did you expect?
2) What happened instead (in case of error: post complete error message)?
lukeer 7-Apr-14 5:52am View
   
DataGridViewCell[^] has not Text property. But Value[^] does exist. Please explain your suggestion.
lukeer 7-Apr-14 5:50am View
   
Deleted
It's called Value[^], not Text
lukeer 7-Apr-14 3:51am View
   
Ok. Go ahead.
lukeer 4-Apr-14 2:27am View
   
You got it to work. That's great!
Let me add a few hints:
Depending on the number of detected circles, this approach might degrade performance more than necessary because it's creating new graphics and pen objects for each circle.
If drawing seems too slow, create the graphics object outside the loop (as suggested in my solution). Same for the pen.
lukeer 3-Apr-14 8:02am View
   
Come on, I've never touched the AForge library and still came to find the HoughCircle documentation within minutes. The class has members named "X", "Y", and "Radius". That's very close to what you need.

[Edit]Where is that comment I replied to?[/Edit]
lukeer 3-Apr-14 7:27am View
   
Puzzling.
The MSDN says about the WebClient.DownloadStringCompleted event that it can be subscribed using methods matching the DownloadStringCompletedEventHandler delegate, which is defined to return void. Your code seems to match that requirement exactly.

Sorry, I'm of no help here.
lukeer 3-Apr-14 3:22am View
   
I don't quite get your problem.
Searching for an element in a list, you can iterate over all elements in the list and compare those properties that you're interested in.
Where are you stuck?
(Improve your question[^] accordingly)
lukeer 3-Apr-14 2:21am View
   
Just in case this is still relevant to you:
Mark the exact line of code where this error appears. Preferably do that by Improving you question, including <pre> tags around code, and then leave a reply on this comment so I get a notification.
lukeer 2-Apr-14 5:10am View
   
Then, you need to somehow get that "stuffitblue" to tell you "2A68A2". I updated my solution accordingly.
But how exactly you would get the number from the style, I have no clue.
lukeer 2-Apr-14 5:10am View
   
That's because calling Color.FromName()[^] with an unknown colour name like "stuffitblue", causes it to return fully transparent black (#00000000).
lukeer 2-Apr-14 5:06am View
   
Deleted
Then, you need to somehow get that "stuffitblue" to tell you "2A68A2". I updated my solution accordingly.
But how exactly you would get the number from the style, I have no clue.
lukeer 1-Apr-14 4:48am View
   
Thanks for informing us.
Now do it.
lukeer 31-Mar-14 3:56am View
   
Please edit your question[^] to provide more insight into
- what values you want to calculate
- what you expect to happen
- what happens instead
lukeer 28-Mar-14 3:31am View
   
Repost[^] & [^] & [^] & [^].
Dont't do that. Improve your original question by putting the information in it that you already gave later. And why the solutions presented to you don't work for you. That will automatically float your original question up in the forum. So no need to post the same question over and over again.
And still you keep spamming this forum with all the same question without (as it seems) even thinking about the tipps you got [^] & [^]
lukeer 27-Mar-14 8:16am View
   
And this information is one of those that would need to be incorporated into the original question instead of asking the question anew without that bit of info.

You need one place to gather what's going on, not disperse bits of knowledge over several threads. Because potential helpers can help much better seeing all this in one thread.
lukeer 27-Mar-14 8:08am View
   
That's far to vague a question to answer. Please Improve your question[^] and tell us
- what plotter you have
- what API it uses
- does the .NET printing framework[^] fit
- what you want to randomize (one out of a collection of images?)
lukeer 27-Mar-14 7:25am View
   
Repost[^] & [^] & [^] & [^].
Dont't do that. Improve your original question by putting the information in it that you already gave later. And why the solutions presented to you don't work for you. That will automatically float your original question up in the forum. So no need to post the same question over and over again.
lukeer 27-Mar-14 5:08am View
   
No, it's not called automatically. You have to either call Refresh()[^] or Invalidate()[^] on the DataGridView[^]. The latter should be preferred because it doesn't interfere with the normal repainting schedule. It just tells the OS that the DataGridView needs to be repainted and OS decides when there's time to do that. Usually that's soon enough plus the advantage of causing one repaint for multiple calls to Invalidate() whereas Refresh() is executed every time.
lukeer 26-Mar-14 8:59am View
   
You don't.
The event gets called when the DataGridView is painted to the screen. Whatever information is necessary for it to succeed, you have to have it alrady stored somewhere in advance.
So during database operation, you collect and store data. On painting, the CellPainting event handler uses the stored data to decide if and what to draw.
lukeer 26-Mar-14 8:55am View
   
Me neither. Just trying to help you getting used to the local habits (which, I hope, will increase your chance of getting a usable answer from someone).

For your question: Have you tried drawing everything just as you would on screen, and letting the printer driver do the rotation?
lukeer 26-Mar-14 8:22am View
   
Please, don't repost[^]. Improve your question[^] instead. (This one would be preferrable to the original since it already has answers.)
lukeer 26-Mar-14 8:18am View
   
Or a List<string> instead of array.
lukeer 26-Mar-14 5:10am View
   
I doubt that the polygon consists of 3 axes x, y and z.

1) It may exist in a Euclidean space defined by the axes x, y and z. But given that, we don't know anything, because it's the standard definition.

2) Or you have a polygon consisting of 3 sides which are named x, y and z. That's a very unusual naming given (1).

3) So presumably you have a polygon in 3D space consisting of 3D points. Do you know if these points are all in one plane? If so, transform all points to be in x-y plane and process area.
If not, things are getting vague. You could split the polygon into distinct triangles whose planes are known, calculate their areas as mentioned above and sum over them.
Or you construct a Minimal Surface[^] over the given points, in which case I'm not able to help.
lukeer 25-Mar-14 9:59am View
   
Not that I understand it, numbers are entered in English everywhere in the code. But yes, it works. Thank you very much.
lukeer 25-Mar-14 9:39am View
   
I'm of no help when it comes to databases. Do as syed shanu told you: Use your debugger. That way you can check what PreValue is initialized to and, if you have access to the source, how it is obtained.
lukeer 25-Mar-14 8:50am View
   
Are you in WinForms, Asp.NET, WPF? Please re-tag.
lukeer 25-Mar-14 8:46am View
   
I updated my solution.
lukeer 24-Mar-14 8:35am View
   
Not the whole software, just the UI.
lukeer 21-Mar-14 2:35am View
   
Just a shot in the dark: Can you alter the z-order of objects in GraphObjList? Then move the line further up.
lukeer 21-Mar-14 2:32am View
   
The console part is just for showing the result to the user. You have to adapt this to your situation. It's the parsing that should be shown here.
lukeer 21-Mar-14 2:26am View
   
Not regarding the exception, but TextBox1.Text is already a string. No need here to convert anything.
lukeer 20-Mar-14 6:10am View
   
What data type is there originally in e.Row.DataItem?

Your'e converting it to decimal, convert the result, which is a decimal to decimal again, and then to string for displaying it. Maybe there is a shorter, less error prone conversion path?
lukeer 20-Mar-14 6:03am View
   
What information is in that TreeNode that you want to display?
lukeer 19-Mar-14 4:08am View
   
Do I get you right that you want to draw little dashes with numbers attached to them?
Do you want them along the semi-circle or on the axis?
lukeer 6-Mar-14 3:13am View
   
Please improve your question to clarify what you need help with:
You need to create an icon?
You need to place an icon in system tray?
lukeer 5-Mar-14 5:09am View
   
What exactly do you mean by "projection"?
You have 3 points. Do you need to transfer them to another coordinate system (that one of the observer, camera, screen, whatever you want to call it)?
Do you need to process the actual pixels that make the arc up?

Please Improve your question[^].
lukeer 5-Mar-14 5:03am View
   
Erm, ..., OP already knows 2) and 3). Question sounds like it's all about how to do 4).
lukeer 5-Mar-14 4:56am View
   
How is that formatted?
Is it the number of seconds since arbitrary date X?
Is it YYYYMMDDHH?
lukeer 28-Feb-14 7:04am View
   
The linked code helps you to calculate the intersection point of two lines. You then no longer draw from your first point to the second, but from the previous intersection to the next.
lukeer 28-Feb-14 6:56am View
   
Rant: What else, you ask? Since I'm not overly fond of every single design decision I, or the hardware development guys, had to implement, I'm risking to resort to language I could regret having used, later. So no rant here, actually.

But 32 vs 64 bit seem to work well, although I have to ease the nervousness by treating possible issues as potential (paid, of course) follow-up work.
lukeer 28-Feb-14 6:26am View
   
Thank you. I appreciate your appreciation.
lukeer 28-Feb-14 5:13am View
   
We checked out DPInst some time ago and decided not to use it. IIRC, it wasn't capable of installing the drivers silently. And customer didn't want its customers to look at two more windows during installation.
lukeer 28-Feb-14 5:11am View
   
Our research resulted in this approach.
What would be the correct approach from your point of view?
lukeer 28-Feb-14 5:06am View
   
In this case, "we" as "the company I work for" are the original vendor. Except you meant the vendor of just the USB IC. Then, yes we asked them. And we were given a range of eight PIDs to use for our products so they won't be confused with other hardware using the same ICs.
Changing the inf file and therefore losing certification is part of that process and to this date no one knows who is going to pay for re-certification, if it ever happens (it's a development for a customer. He says we have to pay, we say it's him).
lukeer 28-Feb-14 5:01am View
   
Yes, it was a variable type error. My solution has the details.

Thank you very much.
lukeer 7-Feb-14 5:14am View
   
So you have an example here as if user had entered "10".
You know how to convert a user input into an integer.
Now it's all about calculations of the "Q" points. Replace hard-coded literals by calculations (its just + and -) with the integer you got from user's input.
lukeer 7-Feb-14 4:27am View
   
What a pity. I'm one of the few (as seems to me) devs who don't have anything to do with databases when at work.
I can only tell you to get the data "somehow" and then use a loop to do
myDataGridView.Rows[rowIndex].Cells["ColumnName"].Value = whatYouGotFromDB;
lukeer 7-Feb-14 3:58am View
   
Would it be acceptable not to use a dedicated method, but instead define the table as the grid's DataSource[^]?
lukeer 6-Feb-14 2:19am View
   
D'oh.
I've corrected that. Thank you for the tip.
lukeer 5-Feb-14 7:24am View
   
Have you read the 2nd link[^]? Listing A there is quite straightforward.
lukeer 5-Feb-14 2:42am View
   
And how is that supposed to impose leading zeroes anywhere?
lukeer 3-Feb-14 8:45am View
   
IIRC, it depends on who is running the service. If it's your user, then it cannot run without him being logged in.
Try setting the service to be executed by System.