15,886,724 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 Python 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 Adam Zgagacz (Top 66 by date)
Adam Zgagacz
27-Mar-15 13:48pm
View
I was wrong. This solution should work in Windows 7/8
Adam Zgagacz
25-Mar-15 9:21am
View
Set the breakpoint in fist line of OnPaint. You should see how often it is called.
Adam Zgagacz
25-Mar-15 9:19am
View
Hmm... I dont see any OnPaint override in code in your comment. Are you sure you added it?
protected override void OnPaint(PaintEventArgs e)
{
//Add your painting code here
paint(this, e);
base.OnPaint(e);
}
Adam Zgagacz
24-Mar-15 12:30pm
View
Can you elaborate more what is not working? Code you provided looks OK.
Adam Zgagacz
15-Dec-14 9:16am
View
You have to show us how do you convert resume to binary format before saving.
Adam Zgagacz
17-Sep-14 11:50am
View
Additionally, if computer is sleeping, there is not much to write abut into log. Your service is sleeping as well and nothing is really happening.
Adam Zgagacz
11-Aug-14 16:58pm
View
looks like error is coming from:
new FileSecurity(path, System.Security.AccessControl.AccessControlSections.All);
when you are executing it file does not exist yet.
Adam Zgagacz
3-Jun-14 12:30pm
View
What is location of the files on the hard drive? Perhaps if you publish piece of code it would help? Waht method gives access denied?
Adam Zgagacz
14-May-14 14:08pm
View
If this is the case you have to convert Emgu.CV.Image to the System.Drawing.Image and then assign is to the Picture box.
See this:
http://stackoverflow.com/questions/16633134/how-to-convert-emgu-cv-imagegray-byte-to-system-image
Adam Zgagacz
14-May-14 11:36am
View
I'm not sure if I understand what do you mean by "imageBox". Can you explain?
Adam Zgagacz
29-Jan-14 11:31am
View
Can you be more specific? Pixel as most people understand it is a dot/point. I dont see what could be an angle in this case. How do you define an angel beteen two pixels?
Adam Zgagacz
6-Jan-14 15:30pm
View
Perhaps you shous post the new question with most current code and sample of the file you are attempting to read.
Adam Zgagacz
6-Jan-14 15:02pm
View
Btw, you should take your post out of unanswered questions. Othwerwise peple will be hitting your post while you already know the answer.
Adam Zgagacz
6-Jan-14 14:33pm
View
1) Before doing conversion you should check if line is at least 13 characters long.
2) Instead of ConvertToInt64 I would rather recommend to use long.TryParse(). With it you can handle cases when substring contains invalid characters.
Adam Zgagacz
6-Jan-14 14:18pm
View
Nice solution. Congratulations!
Adam Zgagacz
6-Jan-14 14:10pm
View
Now I understand. This is tough with .NET build-in tab control. However there are several tab controls you can find in CP. Below are just two examles (there are more). You can download one of them you like most and extend functionality to support your need.
http://www.codeproject.com/Articles/12538/Y-et-A-nother-TabControl-A-Custom-Tab-Control-With
http://www.codeproject.com/Articles/12185/A-NET-Flat-TabControl-CustomDraw
Adam Zgagacz
1-Jan-14 15:03pm
View
It should work without a problem. Please show us the code. Perhaps problem is somewhere else.
Adam Zgagacz
31-Dec-13 20:10pm
View
Are arrays, strict requirement? Problem is that when reading from file you will not know size of arrays at the start of reading, and arrays are not meant to be re-sized.
If you switch to lists instead of arrays it would be much easier.
Adam Zgagacz
31-Dec-13 18:21pm
View
Do you have any code to share with us? What did you do so far? Where are you stuck?
Adam Zgagacz
30-Dec-13 9:12am
View
Well, if you really need to store binary data in Excel (it's a little bit abusing of Excel. Excel wasn't created for binary data storage) you need to:
1. Convert binary data to text (you are already doing it by base-64 encoding)
2. Split text into smaller chunks and store each piece in separate cell. This way one image would be stored in several cells.
Adam Zgagacz
29-Dec-13 20:25pm
View
There are several CP articles about the subject. Perhaps you can start from there:
http://www.codeproject.com/Articles/187171/C-WinForms-Application-Full-Integration-with-HTMLH
http://www.codeproject.com/Articles/6765/HtmlHelp-library-and-example-viewer
http://www.codeproject.com/Questions/280791/how-to-create-chm-help-file-in-csharp-windows-appl
Adam Zgagacz
25-Dec-13 19:01pm
View
SA comment/solution is valid. It doesn't really matter if it is float, double or decimal. All have limited number of significant digits. You cannot achieve very big precision with them.
Adam Zgagacz
22-Dec-13 7:18am
View
I'm glad I could help.
Adam Zgagacz
20-Dec-13 9:41am
View
Are sure you want to do it? It is not good design practice for GUI (at least for 99.99% of cases).
Adam Zgagacz
20-Dec-13 7:11am
View
Can you please explain a little bit more what you want to achieve. I have problem to understand what your question is about. Do you have any code to show us?
Adam Zgagacz
19-Dec-13 15:23pm
View
You can treat Excel as database and access data via Microsoft.Jet.OLEDB
Using SQL as suggested by bowlturner might improve performance.
Adam Zgagacz
19-Dec-13 14:49pm
View
It must be a better way. How your lists are populated first place?
Adam Zgagacz
19-Dec-13 14:23pm
View
Your book probably came with CD and/or perhaps it has reference to the web site where should install examples from. If you have CD you should install whatever it contains, I'm sure it will install samples to the proper folder.
Adam Zgagacz
19-Dec-13 14:10pm
View
This might be good idea.
gettgotcha, you really should re-think your solution from scratch. It must be better way than comparing huge number of list elements.
Adam Zgagacz
19-Dec-13 13:44pm
View
Wouldn't
Textvalue.Replace(",", " ") be sufficient?
Adam Zgagacz
19-Dec-13 13:31pm
View
Maybe you should rethink your solution. If both list you are comparing would contain same object instances for identical values, you would need to compare only objects, not every member in each object. It would be much faster.
Perhaps you should look at how your lists are created and populated.
Adam Zgagacz
19-Dec-13 13:20pm
View
Understood. BTW, comparing 200 list elemente will not take any significant amout of time.
Adam Zgagacz
19-Dec-13 13:03pm
View
Post your code, please
Adam Zgagacz
19-Dec-13 11:21am
View
One more thougt:
In case you didnt see it, check it out:
http://ss64.com/nt/psexec.html
Adam Zgagacz
19-Dec-13 11:16am
View
I was advising to run /K option from Windows Start/Run (just as a part of testing):
cmd /K "\\10.190.167.200\r10\SilentInstall\Tools\PsExec.exe netstat"
When run programatically will stuck becuase CMD window will not close. But when you run it manually maybe you can figure it out what's happening.
Adam Zgagacz
19-Dec-13 9:36am
View
This is strange. I've tested your code with "dir" command not with "PsExec.exe" so it's not the same.
Did you try to run from command line:
\\10.190.167.200\r10\SilentInstall\Tools\PsExec.exe netstat
did it produce any output?
Also you can try from Windows start/run:
cmd /K "\\10.190.167.200\r10\SilentInstall\Tools\PsExec.exe netstat"
/K option will keep command line window open. Do you see any result when running this way?
Adam Zgagacz
16-Dec-13 16:08pm
View
So first split using ','. You will have 2 elements one 'firstName lastName' and another one "(position)". Then split fist element using ' ' (space) so you get firstName and lastName separated.
Finally, strip "(position)" from paranthesis and convert it to integer.
Adam Zgagacz
16-Dec-13 15:01pm
View
If what you are showing is 100% of your code, errors are valid. I don't see any declaration and instantiation of object listed as not existing.
But there is even more wrong with your code. It is console application and you are trying to use WinForms objects. If it is console app you don't have windows forms, labels, dialogs etc.. If you want to use them you should start from scratch and select Windows Form application when creating new project.
Adam Zgagacz
16-Dec-13 12:27pm
View
Can you post some code of what are you trying to do? I see you modified your question but I still can't understand what you are up to.
Use more sentences to describe things you want to achieve.
Adam Zgagacz
16-Dec-13 11:54am
View
Can you please rephrase your question? Add some more details if possible. It is difficult to understand what your objective is.
Adam Zgagacz
9-Dec-13 11:48am
View
Regardless if this is console or Windows form it should behave same way. But since it doesn’t, here is suggestion for further debugging:
Instead of hardcoding path, have openFileDialog in your program to pick the file and from dialog navigate to location you want to pick it. Does it give you same error?
Adam Zgagacz
7-Dec-13 15:11pm
View
I didn't mean to offend you. Sorry. But seriously, if you want different answer, you need to show the code. Otherwise nobody can guess.
Adam Zgagacz
6-Dec-13 9:17am
View
Deleted
They did compile, I've got it. You fooled the compliler :). But I'm sure you wee not able to place call to it without compiler error.
Did you try to call the method?
Adam Zgagacz
5-Dec-13 9:33am
View
Please give as some code. BTW if this is C# and WinForms Focus() should work.
Adam Zgagacz
4-Dec-13 16:55pm
View
See solution #3 by SA. There is no point to talk more about SetPixel GetPixel.
Adam Zgagacz
4-Dec-13 16:24pm
View
I'm not sure I understand your problem. In the piece of code you posted you assign value to the single pixel, then you are checking different pixel and wondering why you don't see value you put somewhere else.
if you do:
bmp.SetPixel(0, 0, Color.Blue);
int c = bmp.GetPixel(0, 0).ToArgb();
you will se value.
Adam Zgagacz
4-Dec-13 14:59pm
View
There is nothing wrong with while loop in C# language. Problems are cause by the code you are not showing us (whatever you are doing in the loop is wrong).
Adam Zgagacz
4-Dec-13 12:12pm
View
See my prevoius reply: assign selected date from the first control to the minDate property of the second one (do it in ValueChanged event handler). It cannot be simpler than that.
Adam Zgagacz
4-Dec-13 10:00am
View
So when you select value in first DateTimePicker set MidDate in second DateTimePicker to value you just selected.
Adam Zgagacz
3-Dec-13 15:58pm
View
Looks roughly Ok. it should execute as long as content of txtLength.Tex, txtX.Text and txtY.Text contain numnerics only (no decimal points on letters).
and of couse you need to remove lines:
txtX.Clear();
txtY.Clear();
because in the second iteration it will fail becuase content onf txtY and txtY will be "" and int.Parse will throw an exception.
Adam Zgagacz
3-Dec-13 15:22pm
View
This question is not specific enough. You don't expect us to write entire checker game for you, do you?
Adam Zgagacz
3-Dec-13 11:25am
View
Waht kind of application it is? WinForms, WPF, Web ...
Adam Zgagacz
2-Dec-13 14:10pm
View
Well, I'm not so sure about speed. If Excel is not already running, your method will need to launch it in the background what might add significant delay. Reason your GUI is not responding to your interactions is due to the time button2_Click_1 takes to complete. You can try to time how long it take to perform button2_Click_1 (you can use Stopwatch for this).
Adam Zgagacz
2-Dec-13 10:07am
View
1 minute is long. If I remeber correctly, default SQLTimeout is 30s.
Improve your query (preferred) or increase timeout.
Adam Zgagacz
2-Dec-13 10:02am
View
It is really not enough information to work with. If you are getting timeout it must be coming from the reader (database). 5000 rows and 100 properties should be not a problem for handling by your program unless your database query is not performing well. Concentrate on the query you are using to retrieve data, see (outside of the program) how long it takes to return data, optimize it.
You can also try to increase query timeout while debugging.
Adam Zgagacz
2-Dec-13 9:21am
View
Can you provide more info? What do you mean by "button box"? Perhaps if you post some code it will help.
Adam Zgagacz
29-Nov-13 13:47pm
View
if you declare with 'void', you need to remove "return 0;" line.
Adam Zgagacz
29-Nov-13 11:17am
View
I'm not sure if I fully understand your question. Do you mean column name or caption?
You can access column object and properties within your loop with code like:
row.Table.Columns[2].ColumnName;
row.Table.Columns[2].Caption;
Adam Zgagacz
28-Nov-13 17:15pm
View
Do you have source code of your RoundUp method? By analyzing it we can tell why it is behaving this way.
Adam Zgagacz
27-Nov-13 9:15am
View
This is all correct.
You entered "FOC9" and you got 201 what in hex is C9. So method first converted "FOC9" to numerical form (you saw 61641 when displayed as decimal). Then removed "F0" part so now value was 00C9 (or 201 as decimal). And such value was returned.
What you see dispalyed as character is not Unicode character itself but it's graphical representation that depends on Font you are using. Character value returned is correct. It's up to you (your program/your font) how you want to show it to the user.
Adam Zgagacz
26-Nov-13 14:02pm
View
I belve that's all you can get from fragmet info you provided. This is binary file with some text element. Download binary viewer program and try to see content in different format (as binary (hex), ascii, unicode etc).
Adam Zgagacz
26-Nov-13 9:44am
View
It depends what you define as "disbaled". If "disabled" means you cannot select it. My code does the job.
Adam Zgagacz
26-Nov-13 9:40am
View
Most likely query to the database is producing more than memory can handle. Can you investigate first what your query produces?
Adam Zgagacz
25-Nov-13 22:21pm
View
What is your question?
Adam Zgagacz
25-Nov-13 12:42pm
View
I see. good luck with the rest of your code.
Adam Zgagacz
23-Nov-13 22:05pm
View
Hmm.. I tried code you posted and it works on my PC. Is there anything specific about you PC settings (language, date format etc.)?
Show More