Algorithm for centering text based on length and font with vb .net
I'm making a user control, and I manually draw the text string, but I can't seem to keep it centered. I need it to stay centered no matter what the font, or string length. Thanks ...
I'm making a user control, and I manually draw the text string, but I can't seem to keep it centered. I need it to stay centered no matter what the font, or string length. Thanks ...
Hi all; My problem seems to be quite simple, but it's not working the intuitive way. I'm designing a Windows Forms Application, and there is a dialog that should NOT exit when the enter key is pressed, instead it has to validate data first, in case enter was pressed after changing the text of a ComboBox. I've tried by telling it what ...
I have a class which inherits from another and I want to make use of one of the base class functions...but I am running into a problem where calling the base function does not return the member variable from the inherited class as I had hoped. To illustrate my problem, I have created a simplified example. I expected this example to outp...
Everywhere I see tutorials on how to compile assemblies using the System.CodeDom namespace. But how can I access a member object of an assembly from a runtime compiled assembly (I'm not talking about accessing a class, I want to access a specific member variable)? In Microsoft Script Control it can be done with the AddObject method. I ...
Is it practical / possible to use serialization to read data from an RSS feed? I basically want to pull information from my Netflix queue (provided from an RSS feed), and I'm trying to decide if serialization is feasible / possible, or if I should just use something like XMLReader. Also, what would be the best way to download the feed fr...
I am reading Bill Wagner's book Effective C#. In Item 32 he is advocating for developers to create smaller, more cohesive assemblies that can be reused more readily. However, in that same item he says: ... Extra Security checks also are done across assembly boundaries. All code from the same assembly same has the same level ...
How to minimize a Form to System Tray on Closing Event in .NET Please HELP..... ...
Hello. My server creates a RSACryptoServiceProvider and exports its parameters to a variable (RSAKeyInfo). Then, the public key is sent to the client, and the client encrypts something with that public key. Now, I need to be able to decrypt this very data when sent back to the server - hence why RSA is useful in my case. However, I g...
One of my application, which is a service application developed using WCF, is being production released. It uses a SQL Server express internally. Since the service will play an important role and has to be up 24x7, I planned to deploy 2 machines: One machine will be operational and serve the requests. It will also hold the SQL Server ...
when we create an application in VC#, talking about .net 3.5 in particular, the are comipled to CLR, what i want is that they should be compiled to EXE executable code that doesn't require .NET Framework Environment for them to run. Is it possible ...
i want to add a class library to my project in C# 2008 and that class library is a wrapper for a C++ library. i added the reference to the .NET wrapper and it says io.notfind exception. i copied C++ DLLs to my project and again it says file not find exception. what can i do to fix this? the original C++ libraries where 2 DLLS that has li...
what FTP libraries come with .Net C#? ...
Windows Mobile 6.0 devices have a Text Size setting that can be reached by clicking Start -> Settings -> System -> Screen -> Text Size How do I retrieve the value of that setting (Smallest ... Largest) from a program running on the .NET compact framework? ...
Hello everyone, Suppose I have a touch screen which supports single finger touch, is it very hard to use software based solution (e.g. programming to detect multi-finger touch and movement) to make the touch screen support multi-touch? Just like I bought a cheap single finger touch cell phone and through programming I make it work as i...
Hi, I'm developing a Windows Forms Application in Visual Basic .NET with Visual Studio 2008. I'm trying to compose fonts (Family name, font size, and the styles) at runtime, based on user preferences, and apply them to labels. For the sake of both a simplier user interface, and compatibility between more than one machine requiring to u...
I have been all over the 'tubes and I can't figure this one out. Might be simple. The following String.Format call: return dt.ToString("MMM d yy 'at' H:mmm"); Correctly returns this: Sep 23 08 at 12:57 Now let's say I want to add a single quote before the year, to return this: Sep 23 '08 at 12:57 Since the single quote is...
Hi all, Could you please clarify for me the question asked here. Why it is important that originally defined class: public class Metadata<DataType> where DataType : struct { private DataType mDataType; } is replaced with one derived from the same interface or abstract class is it maybe because IList<> members must share some ...
I have a BindingList<> of a class set to the DataSource property of a BindingSource, which is in turn set to the DataSource property of a DataGridView. 1. It is my understanding that any additions to the list will fire a ListChanged event which will propagate through the BindingSource and then onto the DataGridView, which will update it...
Hi, I have TextBox which allows the user to enter a query and a datagrid below with live results. I want to redirect Down/Up/PageDown/PageUp keys from TextBox (which is focused) to the DataGrid with results. I don't have a problem with intercepting KeyDown/KeyUp evens from TextBox but don't know how to "inject" them into DataGrid. Wha...
I'm working on a simple image tagging and searching app. I've got my images uploading to the DB, the tags being applied, but am failing when I pull them back - the images don't render. I found this here on SO, but I'm not able to get it working. I think I am perhaps misunderstanding handlers. In short, in the code behind, I'm creating...