R Hill's Q&A profile
Visual C# sentence case string
How to convert uppercase string to sentence case string in C# e.g. input: HI ALL! I'M A NEWBIE. PLZ HELP! output: Hi all! I'm a newbie. Plz help! Here, I just wrote this as this made me curious. I know this could probably be done a lot better by iterating over a chararray and changing the case depending on flipping a bit to indicate it was necessary but I was lazy and used strings: /// <summary> /// Represents a paragraph in English /// </summary> public abstract class Paragraph { /// <summary> /// Convert a string in arbitrary case to English sentence capitalis ...Show All
Windows Forms scrolling picture box
Does anyone know how to create a picture box with scroll bars Like if I want to display only a portion of an image in the picture box, but I want the user to be able to scroll around to other areas of the image. Does anyone have any ideas, or know of any good articles that address this topic smtraber http://www.codeproject.com/cs/miscctrl/PictureBox.asp ...Show All
Windows Forms How can I alter the property of the main form control from a secondary form?
Hello, I want to change the BackColor property, for instance, of a control belonging to the main form from a seconday form. How can I do that Please help. Thanks. I'm not an experienced C#'er, but I would try this. If the secondary form was created by the main form, saying secondform.Parent should get you the main form (Possibly you'll need more .Parent, but keep working your way up). Then TypeCast to the main form's type. Then put a period, the controls name, and the property (in your case BackColor); EX: MainForm amf; SecondForm asf; Do ((MainForm)asf.Parent).controlname.Backcolor ...Show All
Windows Forms Docking Problems
I have a form with a menu and a toolbar, a splitter panel and other controls in the splitter. If I dock the splitter, it slides up under the toolbar and the menu bar. I put the menu and toolbar into a panel and docked that panel to the top. then dock the splitter to fill or to the left. Fill puts the splitter under the top panel and left moves the top panel to the side. Is there an attribute I am missing to prevent this Suggestions Thanks Glen I know I'm late on this post (new to this section of the forum), but even another way is to open the "document outline" (found under the view menu in "other ...Show All
Windows Forms comparing control types
i need to interate through all the controls on a form and perform specific funtions to a specific control type like a TextBox. i know how ot iterate the controls on a form, but how do i do the actual comparison thanks! I do this thus: foreach (Control ctrl in Controls) if (ctrl.GetType() == typeof(TextBox)) ((Text ...Show All
Visual Basic Audio Spectrum
Hi, i'm writing an app, and i would like it to have support for the windows media player activeX control, but i would like it to be hidden, and my application will show all the information, and custom buttons. Now i have all that done, but i would really like to get an audio analyzer put in my app, that is to say a graphical representation of the frequency of the sound on each channel. I am no audio guru, so i'm not entirely sure, what i'm really on about, but i would really, like to be able to obtain this information, in the sdk, under the skins section, you can add support for this to your skins, but i want to know if there is a clas ...Show All
.NET Development Setpixel and Getpixel method on bitmap class is very slow
Hello, Right now I am working on graphics assigment in which I am using bitmap class and bitmap members setpixel and getpixel but these two methods are very slow due to which the performance of my application is degrading. Does anybody know the substitute for these two methods and which is fast. Thank you for your patiance. Double post Jerald Check my answer over at this post: http://forums.microsoft.com/msdn/ShowPost.aspx PostID=18107 ...Show All
Visual Studio Express Editions can't create windows application
hi! i have recently installed vc++ express edition, and i have one big problem : i can't create 'windows application' (MFC is also unavilable). Here is a link, what i can see and do (when i choose win32 in new project): http://img210.imageshack.us/img210/7048/bl8ge.jpg could you tell me how to solve this problem... thx in advance! Hi, who wanted that the platform sdk is not included in the full install of the express editions Windows is their primary platform!!! My Question: Does anybody know the link to a prior PSDK which can be used to imlement W32 applications which c ...Show All
Visual C# Newbie to C# - documented differences between ansi C and using C#
I'm used to programming with versions of Ansi C and now I've been given C#. Without going out and buying a C# book, is there a net site that covers the diffrences in producing code for the visual c~ environment. Worked examples would be an added benefit! If not, what books are worth considering Thanks Get Jesse Liberty's Programming C# (Oreilly) ...Show All
Visual Studio 2008 (Pre-release) ToQueryable() - Does it cause a query execution?
From what I've been able to tell, calling ToQueryable() on the results of a "var x = (query)" operation doesn't actually invoke the execution, it simply wraps the contents of the expression tree generated for (x) inside an IQueryable<T> type. I just wanted to confirm here that calling ToQueryable() isn't going to give my query a case of the dreaded "premature query syndrome" , and that its just wrapping the deferred query in some more layers, and not going out and making the database call. Correct - ToQueryable() does not invoke x.GetEnumerator(): If x is IQueryable, then ToQueryable() returns x. If x is no ...Show All
SQL Server How can I find out whether SSIS is installed in the server?
Thanks a lot. Have a look at the service SQL Server Integration Services, if it is present you have SSIS installed. YOu can check that by open the SCM or type in the "net start" on the commandline on the server. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
.NET Development Syntax error in UPDATE statement. at
Error Message System.Data.OleDb.OleDbException: Syntax error in UPDATE statement. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at My Code don't know what is wrong. Its just killing me strSQL = "Update tblCustomerDetail sett [strFullName]=@strFullName,[strAddress1]=@strAddress1,[strAddress2]=@strAddress2,[strCity]=@strCity,[strState]=@strState,[strZip]=@strZip,[strCountry]=@strCountry,[strPhoneNumber]=@strPhoneNumber WHERE [iCustomer]=@iCustomer and [strAddressType]=@strAddType" Dim parameter_ID As New OleDbParameter("@iCustomer", OleDbType.Numeric, 4)parameter_ID.Value = CType (Se ...Show All
Visual C# Center picturebox in Panel with AutoScroll
Center picturebox in Panel with AutoScroll...at runtime. If the picturebox anchor is not set to top,left AutoScroll won't appear. Any cure for this I have different size images. Most are larger than the control space...so AutoScroll comes in handy. When an image will fit, or is much smaller I want to center it in the panel that is set to fill. (rather than have the smaller images in the top left position of the panel). (This actually should be posted in Windows Forms general forum!) I wrote a piece of sample code that does exactly what you want, but I took a slightly different approach: I create a sub panel dynamically and s ...Show All
Visual Basic How can i that one of function's parameters will be null/defult?
How can i that one of function's parameters will be null/defult like: public function Hello( ByVal the_name as string , ByVal nice_level as integer ) Hello("joy",10) Hello("joy") I want to do a defult of nice_level will be 0. VB also supports marking arguments with the Optional keyword and providing a default value, but C# and other languages don't support this and have a hard time calling such methods. Public Function Hello(name As String , Optional niceLevel As Integer = 0) ...Show All
Visual Studio Team System Why doesn't Team Explorer "Reports (working...)" ever complete
I've had VS running for almost all day and in the Team Explorer the Reports node still says "(working...)". Permission problems That's a known problem. If you close and reopen Visual Studio a few times, it eventually connects (it does for me, anyway). ...Show All
