15,889,116 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 LLLLGGGG (Top 167 by date)
LLLLGGGG
27-Jun-18 13:39pm
View
Yeah, as soon as I read "it's quite buggy" I realized I wrote an horrible piece of code. Sorry for that.
Would you mind if I update my answer with your code (using the right attribution, of course)? Unfortunately, I cannot see your name on the comment.
LLLLGGGG
19-Jul-17 13:27pm
View
i tried lot but not reduced to exact 2Mb, and also changed the width,height
That is because it's impossible: you cannot reduce the file size and keep the width, height and quality the same! You can:
1. Reduce width/height
2. Change algorithm for lossy compression (does not necessarily imply a loss of quality, but it means that you need to upload the photo even if it's >2MB and save it again in a new image type) or increase the amount of compression that the algorithm uses (decreases quality and you still need to upload the photo even if it's >2MB)
3. Use a lossless compression after the uploading (GZip algorithm for instance).
LLLLGGGG
19-Jul-17 13:20pm
View
please
never
abuse of the exclamation mark '!' and please
try something before you post the question.
To answer you I simply did a quick searching on Google for the
Clipboard.GetImage()
method. This will reduce the number of downvotes.
LLLLGGGG
18-Jul-17 13:22pm
View
It does not update the element of the array or it updates them but the value is not what you want?
LLLLGGGG
18-Jul-17 13:20pm
View
You could write a simple class like
public class MysteriousType{object o;Type t;}
and then cast o to the type t... it works, but it's a horrible solution.The best would be writing classes in hierarchy using inheritance and pass an instance of a base class. Then with the is operator you can handle the rest.
LLLLGGGG
18-Jul-17 9:50am
View
uint, int and float can all be casted implicitly to double... So if you don't need to use large integer values, use double and you'll be fine...
LLLLGGGG
12-Jul-17 8:22am
View
parameter-temp-file-path is the path of your saved temp file.
Suppose you have an image in the DB:
1. Copy it to your hard drive in the temp directory
For instance you can create a new temp file using GetTempFileName (https://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename(v=vs.110).aspx) and then write all the data to that file (we call this file "asd6as7asd")
2. Use Process.Start("viewer.exe", "asd6as7asd"); to start the viewer
NB: never use again answers to ask for clarifications... those answers can get easily downvoted/reported. Use comments instead
LLLLGGGG
16-Apr-17 15:45pm
View
You need to handle textboxes name property (or the order of insertion in the flowLayoutPanel) and then refer to my improved answer. If you want to manage the properties of the newly added controls you may eitehr set your preferred properties in code
before
adding them to the flowlayoutpanel (see my first example where I set the name property: you can set whatever property you need there) or get the reference to that control in the FlowLayoutPanel.Controls collection with the methods previously described.
Note: for the next times,
do NOT
use answers to ask some more clarifications. Instead, use comments! ;-)
LLLLGGGG
15-Apr-17 3:25am
View
http://regexlib.com/REDetails.aspx?regexp_id=1111
LLLLGGGG
19-Jun-16 11:34am
View
Have you tried debugging your code?
LLLLGGGG
7-Jun-16 11:36am
View
What do you mean by "hard coded"? That you've redefined cin? That the sum is a function?
LLLLGGGG
7-Jun-16 11:35am
View
This won't work!
Indeed, the output is Error in both cases. isdigit is just a "shortcut function" for 48<=a<=57. In both cases neither num1 nor num2 are between 48 and 57. isdigit works with STRINGS, which are arrays of characters and returns true if the current character is a digit (ex. '3', '6' and so forth).
LLLLGGGG
20-Mar-16 7:41am
View
If you have a method that searches a word in a single PDF file, you can just loop through all the PDFs you have and if at least one does not contain the entry you're looking for, simply return false, otherwise true.
LG
LLLLGGGG
16-Mar-16 14:14pm
View
I'm not sure I have understood the question: would you like to add every possible combination of characters into that list?
LLLLGGGG
16-Mar-16 14:03pm
View
Haven't you got some other information about the error? For example the line it happened at? Otherwise nobody will be able to understand it!
LG
LLLLGGGG
31-Jan-16 6:32am
View
Do you mean you want to pass a parameter with POST method?
You might want to test it with https://en.wikipedia.org/wiki/Metasploit_Project which is included in the Linux distribution Kali Linux (https://www.google.it/search?q=Kali+Linux&ie=utf-8&oe=utf-8&gws_rd=cr&ei=CPGtVsqvIIOzswHqqbLYAw) designed for PenetrationTesting.
LLLLGGGG
31-Jan-16 6:27am
View
The error you get is due to the fact that the prototype of the function is (int, int, int), whereas it should be (int[][], int, int). you can either correct the prototype or write your function above main: this way the prototype is not compulsory and your code will run just fine.
LLLLGGGG
30-Jan-16 13:23pm
View
The code is attached in the answer. I cannot figure out, though, why it didn't show up... But now everything's corrected.
LLLLGGGG
21-Jan-16 16:04pm
View
TimeSpan is the solution...
LLLLGGGG
13-Jan-16 12:56pm
View
That is a warning: it tells you that the hash it has stored for the old version of Robocopy (8954d36828149d2f75ffd8c98df9929a537de158) does not match the hash of the new one (f348e8833ed497d3f1482e3d2d20d7f601d15958). In other words, the two files are different.
LLLLGGGG
13-Jan-16 12:55pm
View
Actually, I put the link in the commment in an a tag, so it should be readable just by clicking on the word this... I'd better edit the comment.
LLLLGGGG
13-Jan-16 12:49pm
View
I am not an expert of SQL, but I found
this
(http://www.codeproject.com/Articles/157977/Remove-Duplicate-Rows-from-a-Table-in-SQL-Server) on Codeproject.
LLLLGGGG
13-Jan-16 11:44am
View
Thanks! :)
LLLLGGGG
9-Dec-15 10:32am
View
Put the function MyFunction in another thread (or use the async/await) pattern) and you're done! (If you put it in another thread, make sure to set the bool variable to volatile by prepending to bool the keyword "volatile".
LLLLGGGG
7-Dec-15 13:51pm
View
Thanks for your help.
The project I'm working on is about cryptography, but before starting developing it I tried with a simple GTK# application that simply reads a text file and displays it in a textview.
I'm going to post the code soon.
LLLLGGGG
27-Oct-15 16:00pm
View
Find this tag and look for what you have to delete: pi-navigation
LLLLGGGG
22-Oct-15 16:58pm
View
I think I'll go with this solution and unify the two changes in a single method.
Thanks a lot for your help. :)
LLLLGGGG
22-Oct-15 16:11pm
View
Try to look for Digital Signal Processing https://en.wikipedia.org/wiki/Digital_signal_processing#Techniques
LLLLGGGG
22-Oct-15 16:08pm
View
Because if I want to change the shelf the book is in I'd just want to change the collection it's stored in and not both... just in order to be more error-safe.
LLLLGGGG
22-Oct-15 15:18pm
View
You're welcome anytime!
LLLLGGGG
20-Oct-15 16:16pm
View
You may try to use a class that contains your object (the one you bind the list from) and a boolean value which is checked/unchecked. Then you can iterate through that collection and find the checked entries. Oh, remember to bind the IsChecked property of the CheckBox to your value.
Hope this helps.
PS: you may try this: http://merill.net/2009/10/wpf-checked-listbox/
LLLLGGGG
8-Sep-15 17:50pm
View
Deleted
I find "somewhat" annoying the way some people downvote questions without
explicitely
giving a reason for that. I might be stupid, but I simply cannot understand it!! It is enough to add a comment to the question pointing out the reason for the downvoting so that, the next time, the question will be more precise and accurate or whatever the comments ask! Thanks...
LLLLGGGG
8-Sep-15 13:24pm
View
I've written <a href="http://www.codeproject.com">For those who code</a>
LLLLGGGG
8-Sep-15 13:23pm
View
Maybe like that:
For those who code
LLLLGGGG
29-Jun-15 15:07pm
View
To be sure: If you are using VS, put your mouse cursor on the line of code underlined: you should see a small, red rectangle. Click on it and choose the best workaround for the error.
LG
LLLLGGGG
18-Jun-15 12:04pm
View
Try to add these properties to the ContentPresenter in the iconButton template:
HorizontalAlignment="center" VerticalAlignment="center" and try doing the same with stretch. And try to remove that MaxHeight and just set the Height property.
LLLLGGGG
18-Jun-15 3:07am
View
Look at this link: https://www.exchangecore.com/blog/convert-number-words-c-sharp-console-application/
LLLLGGGG
18-Jun-15 2:44am
View
What is the question? This seems a tutorial... If you want to post it you have to write an article or a tip, in this case, I would say a tip.
LLLLGGGG
17-Jun-15 17:46pm
View
He can use an int variable and count the occurrencies of '(' then each time he encounters a ')' he subtracts one from that variable and once he reaches 0, he colours the range...
LLLLGGGG
17-Jun-15 17:40pm
View
Look at APIs for each different service.
LLLLGGGG
17-Jun-15 11:14am
View
If you have to display some HTML on a Webbrowser, try saving the HTML file in your TEMP folder and then set the webbrowser source to that file.
LLLLGGGG
17-Jun-15 4:19am
View
You are welcome.
LLLLGGGG
17-Jun-15 3:19am
View
That is because it is a vector. Access to an item of tne vector to see a phone number. Do Item.Phones[0].Number. It should work... You can also use a foreach loop and access all the phone numbers in the collection.
LLLLGGGG
16-Jun-15 15:04pm
View
Mmhh... I do not know then... but I will try to think about the solution of the problem...
LG
LLLLGGGG
16-Jun-15 9:22am
View
I'm saying that for you. It speeds up your development and avoids you to get your questions downvoted. If you're stuck, say it explicitly, otherwise I can understand that you have not even searched for it.
LLLLGGGG
16-Jun-15 9:20am
View
You have to use GDI+ and make an image with all your information on it, but, in my opinion, it's annoying from both developer and final user points of view
LLLLGGGG
16-Jun-15 9:18am
View
Yeah. I personally don't like Windows 8 applications, so I've never started to learn how to build them: they run too strict rules (such as forced suspension, no background execution UNLESS "asked" and so forth) and I do not like the way they work in general as a final user. For istance: I really like drag & drop between applications and I like to work with a lot of applications on my desktop. I cannot imagine applications such as a text editor, an image/photo editor or an IDE to be developed as a Windows 8 application.
LLLLGGGG
15-Jun-15 9:39am
View
www.google.com
Please, use it before asking here. It's for you! Everybody is more willing to help somebody which tried to do something. Then, if they have not succeeded in doing what they want we are happy to help even if the question is simple :). And, of course, your question won't be downvoted! There is an Italian proverb which says: "Help yourself and then God will help you" ("Aiutati che Dio ti aiuta"), of course nobody's God, but it can be interpreted like "If you do not succeed, try, try, try again and then ask for help".
LLLLGGGG
15-Jun-15 9:35am
View
Cannot you make that webcall async and then await for the result? This way ProcessMeggase should wait for an answer and the code should then wait for ProcessMessage to be completed. You have to make also ProcessMessage async and then use var item = await ProcessMessage(dueMessage);
Give it a try and tell me...
LLLLGGGG
15-Jun-15 9:02am
View
Sorry, I have misunderstood. You can try to replace the ForEach loop with a Parallel.ForEach. Things should become faster. But you cannot use a yield statement inside a Parallel.ForEach loop, so have a look at this maybe: http://stackoverflow.com/questions/8412879/parallel-foreach-yield-return
Try it and tell me how it goes...
EDIT: you may try to use an external list and fire an event (inside the parallel loop) whenever an item is added to that list (by the Parallel loop) and then in that event you can do whatever you are doing with this method, but instead of having an iterator, you have a simple list or a Queue is better in this case. So you fill a queue inside the Parallel loop and every time an element is added, you can fire an event and the handler "handles" the results and Dequeues them... Can this work for you?
LLLLGGGG
15-Jun-15 8:58am
View
PS: always look up things on MSDN when you're stuck: it's a very handy site and it solved whatever error/doubt you can face about a class/property/methoda and so forth.
LLLLGGGG
15-Jun-15 8:45am
View
mhh. If it is a list and you have not the access to its source code, I do not know how to help you because the method first fetch results from the DB and then returns them to you in form of a List. It means that yo have to wait until the method finishes to fetch information and then you can iterate through the list it returns you. An idea might be to start fetching the list before starting the method, maybe in another thread and then, when it's needed, I.E. when you start the method, you have already the list stored... I'm sorry if I'm not so helpful :(
LLLLGGGG
15-Jun-15 8:40am
View
What does GetDueMessages() returns? An iterator or a list? And do you have access to the source code of GetDueMessages()?
LLLLGGGG
15-Jun-15 3:43am
View
Mmhh. I think that it is not necessary to compare the richtextbox data with the content of the file. In that case, I'd use a boolean flag: when you load the content of the textbox, set it to true because no changes have been made. When richtextbox.TextChanged is fired, set it to false and start the timer. When the timer elapses, save the content of richtextbox and set the boolean to true and stop the timer. I have just updated the answer with the code. You can notice that the filepath variable is still inside a method. Declare it as a global variable. I'm sorry I cannot do more now but I am writing with a tablet and codeproject does not seem to be mobile friend.
LLLLGGGG
14-Jun-15 12:18pm
View
If it works add it as a solution in order to make other developers understand that the question is closed.
LLLLGGGG
14-Jun-15 9:16am
View
There are a lot of solution on the intermet. Have you checked them? What have you tried so far?
LLLLGGGG
13-Jun-15 18:19pm
View
Interfaces are basically abstract classes: they contain only the "structure" of a specific kind of classes. For example: if you use wpf, you will surely have encountered IValueConverter. This is an interface you MUST implement in your class in order to make wpf use that class to convert values because it needs specific methods. Think an interface as a base class, but you cannot access the base code (because it actually does not exist) and you MUST write your own version of each method.
The advantages of the interfaces come in when you are instantiating a class of a generic type, but with a specific use. For example let's suppose you have the interface IShape. Classes Hexagon, Square and circle implement it. Now you need to write a method which outputs the area of a shape. The IShape interface contains the method GetArea and, as the above cited classes implement IShape, the developer has written a GetArea method for each one. Now what you have to do is simply write a method and ask a reference to an IShape in its parameters and then call IShape.GetArea and, based on what you pass inside that method (which could be either an Hexagon, Square or Circle instance, but not any other object which does not implement IShape) the program will call the corresponding GetArea method.
I hope this helped even if it is not so clear: interfaces are not so easy to learn (well, as far as I am concerned, I took some time to understand inheritance and I have got to understand interfaces later because I was not able to tell them apart from abstract classes. I realised later that they were almost exactly the same thing).
Edit: there actually is a difference between an abstract class and an interface. Look this: http://stackoverflow.com/questions/1913098/what-is-the-difference-between-an-interface-and-abstract-class
LG
LLLLGGGG
9-Jun-15 16:59pm
View
Have you tried to execute your application as an administrator? If you want to set it by default, edit appmanifest.manifest. You'll find here the way to do it commented!
LLLLGGGG
7-Jun-15 16:02pm
View
Could you accept the solution with the button in order to tell others that the problem has been solved?
Thanks a lot. I'm happy to help.
LG
LLLLGGGG
7-Jun-15 14:46pm
View
It has also been reposted again... Please, if you have to edit your question, use the button "Improve question" instead of reposting. That is because you do not need to copy your question, the forum does not get "overcharged" and some people get annoyed if you repost and they are less likely to answer you.
LLLLGGGG
7-Jun-15 14:42pm
View
If it works put it as a solution and mark the thread as solved in order to make everybody understand that you do not need help anymore. :-)
LLLLGGGG
7-Jun-15 3:20am
View
Have you tried to download the page and use Regex to find it?
LLLLGGGG
7-Jun-15 3:13am
View
This should not be a problem: the methods obviously tell you how to call the function and what the parameters do. Then it's up to you to change them accordingly to what you need. You should really rely on MSDN because it gives you not only examples but also documentation about something. Examples are useful if you have already read the documentation, unless they are really difficult to understand, so you cannot rely on only examples.
LLLLGGGG
7-Jun-15 3:09am
View
As I have written in my answer, according to MSDN Directory.Move moves a folder and the files inside it. If you want to move the subfolders too, the easiest way is to use Microsoft.VisualBasic namespace which provides you a lot of simple methods to deal with IO.
LLLLGGGG
7-Jun-15 3:05am
View
According to MSDN, Directory.Move moves a folder and all its files. As I've written in my answer, if you have to move also subfolders, you have to either iterate the folders and move them, use a recursive function or use the namespace Microsoft.VisualBasic, which is the easiest solution.
LLLLGGGG
6-Jun-15 9:20am
View
Ok... It's 0.1$ per line. Ok? There will be 30 lines, more or less of C# code and 100 lines of PHP code (I take 1$ per line in PHP because it is more difficult and I do not know how to program in ASP, I'm sorry) so it's 103$ ok?
Ok, I was joking, but you cannot ask here for that. This forum is not a place where you ask for code and you obtain it. TRY something, other developers see WHAT.HAVE.YOU.TRIED (whathaveyoutried.com) and work on that code. We are not here to provide you free code: we are here to provide you help with your code. If you have not got a clue about the way you can start, tell us and we'll give you some tips.
I would start by studying both C# and ASP. Then I would write a program in C# and upload the file via POST and get it by using ASP and memorize it wherever you want on your server.
LLLLGGGG
6-Jun-15 8:36am
View
Please format and indent your code correctly in order to make everybody understand what you are trying to ask. It is impossible to clearly understand a question formatted like this.
LG
LLLLGGGG
22-Mar-15 13:11pm
View
Thanks for the reply, but I'm looking for a method to use my converter in the setter.value property inside triggers.
LLLLGGGG
3-Feb-15 14:56pm
View
Hi,
Please describe better what you are trying to do: you want to edit roles of users in a DB? Maybe this can help: https://msdn.microsoft.com/en-us/library/aa337552.aspx
And also do not put the tag ASP.NET in your question if you are not intereted in ASP.NET and put the comment "plz...with SQLserver DB ?" inside your question. So people can find your question better. Keep in mind that Codeproject has a feature to ignore some types of tags and favor some other, so if somebody is not interested in ASP questions, they can remove it, but it's not an ASP question... Have you taken the point of this?
Hope this helps :).
LG
LLLLGGGG
1-Feb-15 13:52pm
View
Try to repair VS install.
LLLLGGGG
1-Feb-15 13:00pm
View
You can try to ask the forum on CodePlex... they may be more expert on the package they have built.
LLLLGGGG
1-Feb-15 4:36am
View
Reason for my vote of 5 \n Thanks. You saved me a lot of time... 5
LLLLGGGG
1-Feb-15 4:27am
View
Please, use the button 'Improve Solution' amd write the code inside your solution instead of inside s comment. Nobody can see it at the first sight and comments are not built for this purpose, therefore your code is not formatted nor indented. Anyway, you forgot to mention what kind of error it is throwing... A logical one, a syntax one? What is its description?
LLLLGGGG
29-Jan-15 9:06am
View
Try to wrap Stackpanel inside canvas... i do not know if there are any other solutions
LLLLGGGG
29-Jan-15 9:02am
View
I have not understood WHY you should corrupt a jpg, so I figured out 3 possible ways to do it:
1. If you want to make the jpeg unreadable by any image editor/viewer, you can open the stream and replace the content with random bits
2. If you want to crypt and decrypt the jpg, you have to use the crypt/decrypt functions of .Net framework. You can use aes for example.
3. If you want to replace the colour of the pixels, look at the Graphics GDI+ included in the .net framework if you are working with Windows Forms or Console, if you are working with wpf, use Writeablebitmapex.
LG
LLLLGGGG
24-Jan-15 8:15am
View
Try these books
http://www.wrox.com/WileyCDA/WroxTitle/Professional-C-4-0-and-NET-4.productCd-0470502258.html
http://www.wrox.com/WileyCDA/WroxTitle/Professional-C-2012-and-NET-4-5.productCd-1118314425.html
LLLLGGGG
23-Jan-15 14:49pm
View
If you are doing it in a WPF application, you are using the Webbrowser control, aren't you? If you use that you are instantiating it in a IE window... try to update IE in your PC...
LG
LLLLGGGG
23-Jan-15 7:38am
View
I think it meant to refer to ArraySection, at least I suppose... There are some lacks in his/her code for example declaration of arrayS...
LLLLGGGG
22-Jan-15 17:37pm
View
If you do not know WHERE to begin studying for this, try to google the web... Anyway you may try to start studying C#. If you are in a hrry with your project, try to have a look at WebClient class
LLLLGGGG
21-Jan-15 16:23pm
View
I'm totally guessing as I have not the code under my eyes, but it can be an issue related to Garbage Collector. When my applications have some performance issues, I use GC.Collect(). It rarely works, but you can try to do it and see what happens. Actually I have not got a clue about the problem... you may try to call the method AFTER you have loaded a video, but there are really few probabilities for it to work. You may try to avoid using so many mediaelements or so many videos... I really hope this helps and is not useless... Unfortunately , performance issue s related to someone else's code are not so easy to solve... you may also try to use DirectX to play your videos. They might be more controllable.
LLLLGGGG
21-Jan-15 11:47am
View
Why do you use the webbrowser? If with winform it works and you have no other solutions, use the interoperability with winforms in wpf.
LG
LLLLGGGG
19-Jan-15 14:49pm
View
Please, update your question with the code written in the comments in order to get other users not to skip your question because it is firstly incomplete.
LG
LLLLGGGG
19-Jan-15 13:22pm
View
Use TabIndex property to set the tabIndex if something goes wrong with the default one
LLLLGGGG
19-Jan-15 7:42am
View
I looked at one of my old projects and... it seems you're right: I've used a Panel to display the image.
I'm sorry for my mistake, anyway, my aim was not to confuse the beginners.
LG
LLLLGGGG
18-Jan-15 10:01am
View
If you have made images of those, you theoretically can, but I do not think it is a good idea as there are a lot of other cheaper methods to do that... VS is not like older versions of Game Engine Unity which has not got the support for procedural GUI and needed a lot of images.
Use Blend (As Kornfeld Eliyahu Peter says) and create Styles in WPF (if you are using WPF). I do not know any solution in Windows Forms (as I haven't worked with WIndows Forms deeply).
LG
LLLLGGGG
18-Jan-15 9:58am
View
I do not think that an application can save its own temporary file if you don't tell it to do so.
I think the problem is in your application or in the web service... Can you post your code?
LG
LLLLGGGG
18-Jan-15 9:35am
View
He might not know how to go further with his project because he does not have the required knowledge...
Anyway he hasn't said which technology he's using... If he's using Windows Forms, I think PictureBox is the only way to display the image. If he's using WPF then Image is the control to be chosen.
LG
LLLLGGGG
17-Jan-15 13:14pm
View
Use dotPeek to decompile to C#...
;)
LG
LLLLGGGG
17-Jan-15 13:13pm
View
What error message do you get?
LG
LLLLGGGG
14-Jan-15 15:59pm
View
First of all, you should post the exact text of the exception and the extract of code which generates it because it is really difficult to imagine which problem there is without know anything about your code...
LG
LLLLGGGG
14-Jan-15 15:48pm
View
Even if it's not a solution, my piece of advice is to use itextsharp library. It's free!
Otherwise, you'll have to follow what OriginalGriff says in his solution: Unfortunately, when working with something which is not a default library, but written by third parts...
LG
LLLLGGGG
13-Jan-15 14:06pm
View
Ok... Actually I said KeyDown, but I meant Key events in general...
Anyway, thanks! I didn't know the existance of this method.... does this work in WPF too?
LLLLGGGG
13-Jan-15 12:02pm
View
It can be REALLY useful to have a piece of your code... the one with the problem obiviously. ☆
LG
LLLLGGGG
13-Jan-15 12:00pm
View
He can also handle the KeyDown event and see which key has been pressed.
LLLLGGGG
12-Jan-15 14:37pm
View
Hi,
Try
Frame.GoBack();
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.frame.goback
Hope this helps...
LG
LLLLGGGG
12-Jan-15 14:30pm
View
It can even be useful to know what it does before looking at it. :)
LG
LLLLGGGG
12-Jan-15 11:10am
View
Thankx for your comment, I have thought about the same solution this morning at school while I was talking with a friend of mine...
LLLLGGGG
12-Jan-15 11:09am
View
Thanks a lot for your solution. I will dig through the topic, I didn't know the push technology...
LG
LLLLGGGG
12-Jan-15 10:53am
View
I have not actually understood what you mean: do you want to create a context menu on a control whenever a button is pressed (other than the right mouse button)? If you explain a little bit more what you want to do and not what is your problem, we can help you find another solution...
LLLLGGGG
11-Jan-15 15:57pm
View
Thanks, but I think it's the wrong place to submit this kind of code if you have not any questions about it...
You, instead, should post it under articles or tips and explain it just a little bit more :), because this section is only for questions and not for posting code which has no problems.
The fact is that anyone would look for this type of helps in the Q&A section, but in the articles/tips one.
Hope this helped.
LG
LLLLGGGG
3-Jan-15 14:46pm
View
I actually have solved my problem: the real regex is ^\[.*\].
LG
LLLLGGGG
18-Dec-14 11:39am
View
Actually there's no inner exception. i tried to debug the ctor line by line, but the exception remains the same.
LLLLGGGG
18-Dec-14 11:39am
View
Thanks.
I have already tried to put the lines to create the directory without success... Now I have not got the possibility to test your solutions. As soon as I can I'll try to solve the problem.
Ps. I'm going to remove the static ctor :-)
LLLLGGGG
10-Oct-14 16:54pm
View
If you use CSS there is also
text-decoration: blink
However I completely agree with Sergey saying that blinking text is really annoying on a webpage as the eye is disturbed by this blinking text. I personally ignore completely blinking texts because they are mainly used in fraudulent advertisements which main aim is only to steal you money...
LG
LLLLGGGG
9-Oct-14 16:29pm
View
Decide a startpoint, and endpoint and a step... Draw points and then connect points with lines. A small step will make the lines look like a curve... Use System.Drawing in Windows Forms or WriteableBitmapEx in WPF to accomplish the work.
LG
LLLLGGGG
6-Oct-14 6:57am
View
Thanks! :-)
LLLLGGGG
29-Sep-14 5:30am
View
Actually the File static class is more handy to do this type of work with light files.
:)
LLLLGGGG
29-Sep-14 5:05am
View
Actually, there are two overloads of that method... I do not understand why the compiler asks for an integer array.
void setWidths(float[] relativeWidths)
Sets the relative widths of the table.
void setWidths(int[] relativeWidths)
Sets the relative widths of the table.
Source: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfPTable.html#setWidths(float[])
And in the code I would have added the cells inside the for loop and, since you need to set the widths once, I would have put the array declaration and the table.setwidths outside the loop...
LLLLGGGG
28-Sep-14 17:09pm
View
I am actually a bit confused about this line (found in the link you have provided)
table.setWidths(new float[]{2, 1, 1});
The method actually needs a float array, but the compiler asks for an integer one... How is it possible?
LLLLGGGG
28-Sep-14 16:45pm
View
If you mean that with int you get some other error, try to convert values.
But as I could see, int is the only type accepted by the method. You have now two choices: either find another method in the same library which does the same thing with floats or write your personalized version of it...
Unfortunately, the method you have posted here does not work with floats value. It is a limitation of the method and you can do nothing with it...
LLLLGGGG
28-Sep-14 16:31pm
View
Please, post whatever you hqve tried. Even if it is incorrect or wrong because we can help you specifically with your problem...
LG
LLLLGGGG
25-Sep-14 15:56pm
View
You may use a loop to compare Keys before, then check if the records are the same, fianlly, copy the ones who aren't...
LG
LLLLGGGG
25-Sep-14 14:12pm
View
In which line is the problem? I.E. Which line does your C# compiler throw the exception?
LG
LLLLGGGG
25-Sep-14 14:09pm
View
Post your code and some screenshots... here no-one can help you without this information :).
LG
LLLLGGGG
24-Sep-14 14:17pm
View
A piece of advice: to do this hard work, use REGEX! Find a C++ implementation for them and use it! They might seem hard (and they actually is for the first times) but they are relly handy and useful! do not use those switches, they make your code Tricky and difficult to edit and understand.
LG
LLLLGGGG
22-Sep-14 16:30pm
View
Try even to search for async/await pattern. This is a new feature included in .NET 4.5. Some people find themselves more comfortable with this kind of pattern. Personally, I don't, but it is something you have to use if you will pass from WPF to WinRT application development.
LG
LLLLGGGG
21-Sep-14 16:20pm
View
Quick, simple answer! Thanks a lot! It works for me! So I have to use multiple conditions unless it won't work... Another codesnippet to put in my Favourites.cs file...
Thanks for your help!
LG
LLLLGGGG
21-Sep-14 14:55pm
View
I do not want to get properties from the class GUIButton, but from antoher one... and as if I have to write a lot of different classes (such as GUISlider, which does not have the text property), I would like to have just one method to get properties of the class as I will use polymorphism to assign a GUI*** (where *** stands for some element) to a CloneableGUIElement and as the original type is not modified by this assignment, I will use the getType method to get the properties. I need it to make a properties window such as the one included in Visual Studio.
LLLLGGGG
21-Sep-14 14:55pm
View
Deleted
I do not want to get properties from the class GUIButton, but from antoher one... and as if I have to write a lot of different classes (such as GUISlider, which does not have the text property), I would like to have just one method to get properties of the class as I will use polymorphism to assign a GUI*** (where *** stands for some element) to a CloneableGUIElement and as the original type is not modified by this assignment, I will use the getType method to get the properties. I need it to make a properties window such as the one included in Visual Studio.
LLLLGGGG
9-Sep-14 12:54pm
View
I've solved the problem, but thanks to your comment...
If you want to put the answer here, I'll mark it as a solution
LLLLGGGG
2-Aug-14 6:30am
View
Hi, thanks, but I'm looking for a free alternative.
LG
LLLLGGGG
19-Jun-14 3:44am
View
Thanks, but I cannot use dynamicresource in a based on statement according to the vs compiler..
LLLLGGGG
17-Jun-14 11:15am
View
<script type="text/VB" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> are you sure that it is type="text/VB" and not "text/javascript"?
I suppose the error is thrown in the first line of Initialize Function, isn't it?
LLLLGGGG
17-Jun-14 8:27am
View
Reason for my vote of 4 \n Nice article!!
LLLLGGGG
17-Jun-14 5:36am
View
Deleted
Does not TextBoxes in Winform has the support with RightToLeft languages?
http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.aspx. RightToLeft property.
LLLLGGGG
17-Jun-14 5:32am
View
Hi thanks for your reply, but I succeded in solving the problem. Unfortunately, (don't ask me why, because I don't know) DataFormats class has many different formats, including Html, but richtextbox cam use only rtf, text, xaml and xamlpackage. I tried with rtf, but rtf formatting was prior over my richtextbox formatting, xaml had problems with closed tags... The only format which worked perfectly, according to my needs, is XamlPackage, so I have chosen it.
LLLLGGGG
16-Jun-14 13:46pm
View
I am really sorry, but I haven't understood this code... Can you explain it better because br mode does not exists (or at least vs intellisense does not find it... Thanks!
LLLLGGGG
16-Jun-14 7:32am
View
Simply put it in a lamdba expression and use Thread.Start to start a new thread. If you're using wpf, use dispatcher.invoke to make changes to the ui...
LLLLGGGG
15-Jun-14 10:05am
View
You should give more details about your problem... But you can pass a reference of your form to the second one and then edit it from the second one... But, I repeat, we need a more detailed question in order to solve your issue.
LLLLGGGG
14-Jun-14 7:18am
View
Go to your application manifest page and set the permissions for your applicatio to requireadministrator. You'll find the complete syntax commented in the app manifest.
this might help http://msdn.microsoft.com/en-us/library/bb756929.aspx
LLLLGGGG
13-Jun-14 15:21pm
View
It would be useful to define a bool global variable (such as "message-shown"), set it to true when the modal dialog is shown and reset it to false after the dialog has closed (if you put the first instruction just before the msgbox call and the second after, the execution of the main thread will stop at the msgbox line until it'll be closed). Then, wrap this lines into an if block which controls if the variable is false, and, if it is, execute the code, unless do not execute anything! I'm about to update my codesnippet above...
LLLLGGGG
13-Jun-14 15:14pm
View
I would suggest to do that:
protected override void OnStart(string[] args)
{
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
//This statement is used to set interval to 1 minute (= 60,000 milliseconds)
timer.Interval = 60000*2;
//enabling the timer
timer.Enabled = true;
}
protected override void OnStop()
{
timer.Enabled = false;
}
private void OnElapsedTime(object source, ElapsedEventArgs e)
{
MessageBox.Show("hello there");
}
But without any other information, I cannot say if it will work for sure...
However, I've made something similar some months ago... I've put my application in my automatic execution folder.
LLLLGGGG
13-Jun-14 15:04pm
View
Hi,
The approach with a while(true) is not so good... In any case except for applications which aim is to execute a piece of code as fast as they can (like videogames).
I think you shouldn't use the while true as well as the Thread.Sleep method. What you need is only to make timer (and, if I have not misunderstood, it is a System.Timer) go without making any controls on the event handler.
I have a question about your code: have you created a derived class from System.Timer? However, what are you overriding, which class does it derive from?
Thanks.
LLLLGGGG
10-Jun-14 14:23pm
View
Just a little piece of code would be appreciated in order to understand the problem... just the code you used. If you used winform, maybe, even the designer.cs file.
LLLLGGGG
10-Jun-14 14:21pm
View
I think that you cannot convert a database field into a byte array using an explicit cast.
This byte[] data = System.Text.Encoding.Unicode.GetBytes(sdr["SaleFileName"].ToString()); should work fine.. but I'm not so sure of that.. try and see what happens..
LLLLGGGG
3-Jun-14 12:56pm
View
This is because with the static class file, for example, if you have to read a part of a file, you have to cache the entire file in memory. With streams, this is not required as with streams you don't have to cache the entire file into memory.
LLLLGGGG
3-Jun-14 12:40pm
View
Microsoft advices to use the static class File only with small files. With larger ones, Microsoft advices to use Streams
LLLLGGGG
1-Jun-14 13:44pm
View
Try to replace
Progressbar.maximum=listbox1.items.count
With
Progressbar.maximum=listbox1.items.count+1
LLLLGGGG
13-May-14 12:51pm
View
What kind of programs can I use? I remember I once used Database.Net 4, but I've tried it and it's not compatible with Windows 8.1.1. What kind of products do you use?
Thanks!
LLLLGGGG
9-May-14 16:49pm
View
Ok, thanks a lot!! Sorry for the stupid question, but It's only some day since I've started to learn Sql and Connections.
LLLLGGGG
9-May-14 16:14pm
View
I know that's a bad habit, but I don't want to close the connection and reopen it.are there performance issues opening and closing a connection? Because I fear there are... That's why I didn't want to close it.
Is it a good argument as I'm a newbie in this field?
LLLLGGGG
17-Mar-14 12:26pm
View
Anyone?
LLLLGGGG
15-Mar-14 13:33pm
View
Thanks a lot!!
LLLLGGGG
14-Mar-14 8:58am
View
Thanks!
I've solved in this way:
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
this.SelColor = new SolidColorBrush(Color.FromArgb(255, (byte)this.SRed.Value, (byte)this.SGreen.Value, (byte)this.SBlue.Value));
}
Aren't there any better solutions?
Thanks!
-Jymmy097
LLLLGGGG
8-Mar-14 7:32am
View
I don't think you can access the chronology of a user from a website... but I can be wrong....
LLLLGGGG
3-Mar-14 10:51am
View
Use atoi function
LLLLGGGG
2-Mar-14 15:56pm
View
Have you tried to handle the MouseWheel event and, whenever it's fired, move down/up of ItemsHeight?
Becuase I don't think that there are any equivalent of LargeChange and so on like in WinForm
LLLLGGGG
2-Mar-14 15:53pm
View
I Actually haven't understood your issue, but if you need a data type which stores your information in a segment of memory which is hard to find for an hacker, check out the SecureString class.
LLLLGGGG
28-Feb-14 11:44am
View
Any ideas?
LLLLGGGG
23-Feb-14 14:53pm
View
I think VS12 installed it for me... There isn't any ssms file in my pc... I might miss something, but if you look at the last image, you'll find out that I have SQL Server Express installed on my PC, so why haven't I got ssms and I can create new mdf files??
I haven't got a clue...
Thanks!
LLLLGGGG
23-Feb-14 14:50pm
View
No. LINQ (Language Integrated Query) is a Language you can use to search something into a collection. It is like SQL, but you can use it for Lists, Dictionaries and so on... I think watever inherit from IEnumerable... If your tree inherit from it, you've done!
http://msdn.microsoft.com/it-it/library/bb546142.aspx
You can also make a recursive function, but it impacts more negatively than a loop on performance
LLLLGGGG
23-Feb-14 9:30am
View
I tried to create a new one for an hour and I got it: I've chosen MS SQL Server Database file and I got my connection string: (LocalDb)\v11.0. I inserted it in the combobox and it worked nicely. I haven't got the SSMS... where can I find it?
LLLLGGGG
23-Feb-14 9:05am
View
Deleted
Sorry for the late reply:
I tried to do this:
public class Favorite : INotifyPropertyChanged
{
private Uri _source;
public Uri Source
{
get { return _source; }
set
{
_source = value;
PropertyChanged(this, new PropertyChangedEventArgs("Source"));
}
}
private string _title;
public string Title
{
get
{
return _title;
}
set
{
_title = value;
PropertyChanged(this, new PropertyChangedEventArgs("Title"));
}
}
public Favorite(Uri source, string text)
{
Title = text;
Source = source;
}
public event PropertyChangedEventHandler PropertyChanged;
}
But when I execute
IReadOnlyList<storagefile> c = await KnownFolders.PicturesLibrary.GetFilesAsync();
List<storagefile> images = new List<storagefile>();
foreach (StorageFile s in c)
{
if (s.FileType == ".png")
images.Add(s);
}
foreach (StorageFile s in images)
{
FavoritesColl.Add(new Favorite(new Uri(s.Path, UriKind.Absolute), s.DisplayName));
}
It tells me: Object reference not set to an instance of an object. on line PropertyChanged(this, new PropertyChangedEventArgs("Title"));
How can I solve the problem?
Thanks!
LLLLGGGG
23-Feb-14 8:23am
View
LINQ is something like SQL, but you can use it within C# collections... http://msdn.microsoft.com/en-us/library/bb397926.aspx
LLLLGGGG
21-Feb-14 15:16pm
View
I'd like to do this in one of my app... I don't think that I can use the IE browser in a Windows 8 app.
LLLLGGGG
21-Feb-14 15:08pm
View
I'm trying to save a webpage offline complete of images, css files (in order to display it better), and so on... If the user switches from my app to another one, will the process be suspended too?
LLLLGGGG
21-Feb-14 14:59pm
View
And if the user suspends the application while I'm downloading the page?
LLLLGGGG
21-Feb-14 14:56pm
View
I mean the HTML code the webpage generates... the one whoever can retrieve with its browser.
LLLLGGGG
21-Feb-14 14:24pm
View
What about using LINQ? It might be useful, but I haven't got a clue how to use it in a tree... https://www.google.it/?gfe_rd=ctrl&ei=rqcHU5yQCOjW8geFoIG4BQ&gws_rd=cr#q=tree+and+LINQ
LLLLGGGG
19-Feb-14 14:30pm
View
This is a screenshot after an edit to the xaml file
http://i62.tinypic.com/28hipw9.png
This is after I have saved all
http://i58.tinypic.com/5ulf1s.png
The empty mainpage (by default) contains the ctor for mainpage with initializecomponents inside it.
EDIT: I noticed that if I make some minor edits to my xaml file (such as adding a control), there isn't any problem; but if I create an event handler, the problem exists. (Sorry but I'm tired now and I can write only with a bad Englis!!).
LLLLGGGG
19-Feb-14 11:31am
View
Because it is integrated in the template of a basic window... I'll post here the xaml and the cs file of a new window as soon as I'll have access to my terminal: now I'm writing with a tablet.
LLLLGGGG
19-Feb-14 7:41am
View
Thanks. What I mean is that when I switch from my xaml file to my cs file and I have modified the xaml one, the InitializeComponent isn't recognized (in sense that it seems like doesn't exists and the controls too) until I save all. But if I compile, no error is thrown... Is it a normal behaviour or I have to repair my vs installation? It might be a conflict with VS 2012? Thanks a lot!
LLLLGGGG
11-Feb-14 3:05am
View
What about using XML serialization and save results into the PDF file?
You can write an overload of ToString() with the fields you're interested in, then, in your main method, split it into an array (use \n character for example) and foreach element in the array, add a new paragraph.
LLLLGGGG
28-Jan-14 13:21pm
View
I have solved my problem, but I haven't solved it yet. I have done a workaround: instead of doing n operations per second, I told me that the user doesn't know the exact number of ops/s, so I can emulate whatever I want without make the user know exaclty what I'm doing, and I'm satisfied even if that wasn't what I wanted. I wanted to emulate a CPU... I thought about multi-core cpu and I've added the property and a for loop.
Thanks for the help!!
Jymmy097
LLLLGGGG
4-Jan-14 10:23am
View
It tells me that the class it's using is outdated (not for frameworks higher than 3.5) I think I will install the fonts in my Windows/Fonts, but if anyone has other ideas, they'll be well accepted!! :)
LLLLGGGG
8-Nov-13 15:07pm
View
Can uou upload an example of tab file? Searching on the net I found that theycan be read using notepad, so you can use regex to do it...
LLLLGGGG
16-Jan-12 13:16pm
View
I'd like to add a small tip: the video object works on all controls.
If you set the property Owner (video.owner) as a button, or a picturebox you will have a video in a button or in a picturebox.
I forgot that yesterday, but you can also use the picturebox to see video files.
Show More