Click here to Skip to main content
Page 1 of 245
Page Size: 10 · 25 · 50


Author filtered by: Sergey Alexandrovich Kryukov [x]
Answer 14 May 2013   license: CPOL
Please see my comment to the question and start here: http://www.asp.net/web-forms/tutorials/security/roles/role-based-authorization-cs[^].—SA
How to rotate button in vb.net by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
The best idea so far is the Solution 4.The right solution for System.Windows.Forms is: create a custom control which behaves like a button and implement rotation property. If you want to rotate to an arbitrary angle, you should also set the property...
retrieving multiple sockets from one TcpClient by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
You would need to make two connections (or any other number of connections you may need) using two separate instances of TcpClient, which is, basically, a wrapper around an instance of a Socket. Besides, you can do development either on the level of Socket objects, or TcpListener/TcpClient...
Answer 14 May 2013   license: CPOL
Please see: http://msdn.microsoft.com/en-us/library/tey4z3ca%28v=vs.110%29.aspx[^].—SA
Delegate or delegate by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
No, the keyword delegate and System.Delegate are not the same, not at all.You could be confused with the C# alias keywords. For example "int" is an alias for System.Int32. For delegates, this is not the case.Read the documentation on these type and look through all the cases of using the...
Overloaded variable type? by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
Makes no sense at all.There is no such thing as "overloading", except ugly and very confusing terminology and some myths. (So many beginner have been confused! It's can be observed on CodeProject.) Methods are "overloaded" because nothing is overloaded. They are just different methods with...
How to print div in asp web page in windows xp? by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
This article explains how to print using ASP.NET:http://www.c-sharpcorner.com/uploadfile/rahul4_saxena/printing-in-Asp-Net/[^].Note that the server side only provides printable content, and all the detail of printing selection, printing quality and other options totally happens on the...
Answer 14 May 2013   license: CPOL
You cannot get a "simple code" in response to such a vague request. It really depends on the detail of what you want to achieve and your service.However, one thing is obvious: your Web Service application provides some interface to the client application. Your console application is no...
Intercepting messages to a window by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
You can intercept messages by installing a Windows Hook. If you need to intercept some messages outside your application, the hook should be global. According to Microsoft documentation, to make it global, you can only install the hook in a native Windows DLL. Please start here:...
Word file creation error for using COM component by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
For the server-side programming such as ASP.NET, prefer using Open XML SDK instead of Office Interop. Look at this Microsoft article:http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^].Use Open XML SDK:...
Answer 14 May 2013   license: CPOL
I never tried AForge.NET DesiredFrameSize, but I don't think it can possibly set any size you may wish. The cameras usually have some set of predefined modes, and some modes have different frame size. If your requested size is supported by one of the available modes, it will work, if not — it...
How to prevent hacking from file upload control? by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
There is nothing to prevent. Anyone can upload anything, including some code which would try to hack your site. So what? You should never execute any code, even anything which is harmless. I can imagine that you should show some uploaded content, including, for example, HTML, and HTML would mean...
how to extract string between two symbols by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
The problems is solved using grouping. It could look like this: "start_pattern(.)end_pattern" ("end_pattern" is "TTL" in your case). The brackets denote a group. Now, in code, you find the Regex group corresponding the dot in the middle.Please see:...
Answer 14 May 2013   license: CPOL
In most cases, you don't need such case. I can explain: on the user size, there is no arithmetic operations with HWND; they are some abstract pointers; you only get HWND values from Windows API and pass HWND as parameters of other API function, never do any calculations with then on the user...
Conversion HWND to LPARAM by Sergey Alexandrovich Kryukov
Answer 14 May 2013   license: CPOL
Now it really explains where you may really need such a cast. (I refer to your previous question.) Please see: http://www.cplusplus.com/doc/tutorial/typecasting/[^].—SA
Error While Uploading the image. by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
Don't write the type Image. Write the full name; either System.Web.UI.WebControls.Image or System.Drawing.Image, depending on which one you really...
how to view all directories of drive ina listview by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
You should rather use System.IO.Directory.GetDirectories:http://msdn.microsoft.com/en-us/library/c1sez4sc.aspx[^],http://msdn.microsoft.com/en-us/library/6ff71z1w.aspx[^],http://msdn.microsoft.com/en-us/library/ms143314.aspx[^].Also, you should better be aware of one unpleasant...
Answer 13 May 2013   license: CPOL
You could not answer my simple question so far, even after I asked you 3 times. OK, the site URI was enough for me. Here is the API you tried to keep silence about for such a long time: http://developer.worldweatheronline.com/[^].Sign up, obtain the documentation, and read on what it can do...
how to get label value using jquery by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
You don't need to use sibling if you already have the id value. Your selector will be just $("#lblSrNo"). You messed up all together.—SA
how to call vb methods from c# by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
The question makes no sense. You probably don't clearly see the difference between an application and a library.However, quite formally, any assembly can be used as a library: you can reference any valid assembly by another assembly, no matter if it compiled as application or a class...
C#
How can I display color values by each pixel? by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
This is the rare case when you can really use System.Drawing.Bitmap.GetPixel:http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx[^].Note that for any more or less massive read or write pixel operations GetPixel/SetPixel cannot be used, as they are prohibitively...
Answer 13 May 2013   license: CPOL
It your XML file contains some Unicode characters beyond ASCII, the console won't show then, replacing them by '?', as usually. You need to make console showing Unicode:Do this:System.Console.OutputEncoding = System.Text.Encoding.Unicode;This is confusing. System.Text.Encoding.Unicode...
C#
Learn c # how can slowly learn the API by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
Nobody can put one's own brain in your head. If you don't understand something in the API, which is quite well documented and simple enough, it means you need to take a step back and learn the basics: working mechanisms of variables, fields, methods, properties, method parameters and so on, how...
How To Create PrintEventArgs? by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
Wrong question. If you print, you never create this object; the library System.Drawing.Printing always does that when invoking the event. You cannot invoke it in principle. Every event can only be invoked in its declaring type. You cannot even write a derived class and invoke the event declared...
Change Busy Button Colour by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
Instead of changing color, you should disable the button. Use the property IsEnabled or Enabled — it depends on the exact button type you did not bother to specify. Different UI libraries have different classes under the simple name "Button". When UI is involved, you always need to tag UI...
C#
Answer 13 May 2013   license: CPOL
Normally, all 2010 projects will be converted automatically to the later version; the user will be requested for a permission to do so. If some projects depend on some compiled assemblies, the result depends on their compatibility. Usually, backward compatibility is preserved. You need to try it...
C#
Using Phantomjs on web application by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
The question makes no sense at all. PhantomJS is not a JavaScript library like jQuery. It is compiled into binary code (http://phantomjs.org/build.html[^]), so, naturally, it cannot be used on the client side at all.The purposes of this product are completely...
Answer 13 May 2013   license: CPOL
Use, say, Visual Studio refactorization engine.—SA
How can I control the order of Dll were loaded ? by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
Right approach is just the opposite: any technique based on any assumptions on the order of loading of DLLs should be considered as incorrect and never be used. It would abuse and sabotage the process of software development, as well as the quality and reliability of final results.Chances...
Answer 13 May 2013   license: CPOL
I would add to the correct Solution 1: "skipping" a line means reading it. In this case, this is related to the simple fact that the lines have different length. Before you can access some line, you have to read all the previous lines; before you do it, you cannot really know the position of the...
C#
Answer 13 May 2013   license: CPOL
Please see my recent answer on how to handle the event: ASP.NET MVC4 Application[^].For changing color and other aspects of the presentation from an event handler, prefer using CSS group of methods: http://api.jquery.com/category/css/[^].—SA
Answer 13 May 2013   license: CPOL
This article is only for XP, but it is still partially applicable: http://support.microsoft.com/kb/310424[^].For more modern documentation please start from: http://technet.microsoft.com/en-us/library/cc766266.aspx[^].—SA
ASP.NET MVC4 Application by Sergey Alexandrovich Kryukov
Answer 13 May 2013   license: CPOL
MVC and even ASP.NET are pretty much irrelevant here. The event is always handled on the client side (however, you can register script in ASP.NET).You can use jQuery and its .change() method: http://api.jquery.com/change/[^].The example shown in this documentation article demonstrates...
MVC
How to transliterate on c# .net 4.0 ? by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
Please consider the alternative I suggested in my past answer: Problem in typing in Hindi and english[^].What do you think? The problem is: Tamil has over 60 characters. I explained how it could be worked around.—SA
Answer 12 May 2013   license: CPOL
I think that using threads with blocking sockets instead of asynchronous API is much better. In most cases, communication is sequential in its nature and the flow of operations is logically independent from other threads. Therefore, using a separate thread for each communication channel (in case...
What is this ASCII character code ? by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
There is no such thing in ASCII. What you see is a special font for obsolete Microsoft platform, the symbol replacing "normal" ASCII character. You should not use it.Instead, you should use Unicode Ⓐ: U+24B6.For other "problems" like this one use Unicode reference:...
C#
Answer 12 May 2013   license: CPOL
I would suggest you use System.DateTime.TryParse or System.DateTime.TryParseExact with appropriate time format string or culture:http://msdn.microsoft.com/en-us/library/az4se3k1.aspx[^],http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx[^]. However, making a user to input date or time...
how to display marathi messagebox by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
You can create your own version MessageBox using either modal System.Windows.Forms.Form or System.Windows.Window."Modals" means… well you should understand it. In a word, this is like using ShowDialog. Please...
Answer 12 May 2013   license: CPOL
I'm not sure you can make a page a child of Canvas, but it surely could be another Canvas instance. You can read a Canvas object from the XAML file and insert the result of it.For a sample of appropriate XAML, you can use use open-source Inkscape (wonderful application, a must to have,...
Answer 12 May 2013   license: CPOL
This is not only a good practice, it's a must. I would rather like to have "Remove unused references", too. You should always rigorously remove everything unused and take it as one of the most important engineering principles, in all branches of engineering, not only software.—SA
search query in xml vb.net by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
Omkaara wrote:I'am using VS 2005, 2.0. Framework Linq is not available in VS 2005.If you cannot use .NET Framework of the versions above v.2.0, you will have to use other means of working with XML and develop the search by yourself. Please see my short overview:XML Read/Write:Use...
search query in xml vb.net by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
Please see:http://msdn.microsoft.com/en-us/library/bb387065.aspx[^],http://msdn.microsoft.com/en-us/library/bb387063.aspx[^],http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx[^].—SA
Answer 12 May 2013   license: CPOL
This is not related to MCV, Razor or anything like that. Most likely, you are working with System.Drawing.Image; its instance can be saved in any stream, including memory...
How to ping IP Address in asp.net Using vb.net ? by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
You cannot improve the ping timing as you merely act as a client. You cannot do much about it.—SA
C# only enable button X in form by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
Here is how:http://msdn.microsoft.com/en-us/library/system.windows.forms.form.minimizebox.aspx[^],http://msdn.microsoft.com/en-us/library/system.windows.forms.form.minimizebox.aspx[^].But much better way it this: Microsoft Q209354.—SA
C# Screen Recording program, by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
But idea, to save anything on timer click, but please see:http://msdn.microsoft.com/en-us/library/ms142147.aspx[^],http://msdn.microsoft.com/en-us/library/ms142148.aspx[^].That's all you need.—SA
ASP.NET MVC4 Application by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
This code is "not working" because it… does nothing. You just try to create a function object without assigning it to anything any any use of it. Probably you meant to call this method in response to $(document).ready? then it should be:$( document ).ready(function() { /* ... */ });...
MVC
nullreferenceexception was unhandled vb.net by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
You did not show where the exception with the message "Object reference not set to an instance of an object" is thrown. Not to worry. This is one of the very easiest cases to detect and fix. It simply means that some member/variable of some reference type is dereferenced by using and of its...
To Download logic in asp.net by Sergey Alexandrovich Kryukov
Answer 12 May 2013   license: CPOL
Makes no sense. This is download, not upload. The file is on the server part. So, its size known in advance. And what is "for example"? Makes no sense. The general "download code" is like this:Download the source code"—SA
Answer 12 May 2013   license: CPOL
As '$' is actually defined in jQuery, it's likely that you did not include jQuery at all. This is of course my guesswork, as you did not show your HTML . Please see: http://jquery.com/download/[^].—SA

Page 1 of 245
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web03 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid