Community developer blogs
VB & .NET Blogs @ vbCity
- Last updated
- 05 Jul 2009 at 19:29
- Url
- http://blogs.vbcity.com/
- Feed
- http://blogs.vbcity.com/MainFeed.aspx
Recent Posts
-
How To Animate a Gradient Brush
Posted: 05 Jul 2009 at 19:29 by Ged Mead
In the previous blog item in this series, I created a simple Animation in Visual Basic Code. This used a DoubleAnimation to animate the thickness of the gradient border. That example doesn't even begin to scratch the surface of what you can achieve with WPF Animation and - as you have seen demonstrated in the previous items - how you can include these animations in Windows Forms. In this part, we will look at a slightly more complex animation.
-
How To Animate a TextBox in Windows Forms
Posted: 03 Jul 2009 at 14:34 by Ged Mead
Starting PointIn my earlier post, the HiliteTextBox, I created a simple WPF UserControl which is hosted in an ElementHost in a Windows Form. If the user tries to continue without entering text in the TextBox, a bright colored Border would appear around it and stay there until the user does enter something. If we are going to go to the trouble of harnessing WPF's graphics power, we may as well go a step further and add some animation to the control.
-
WPF-WinForms Interop: A Highlighted TextBox
Posted: 01 Jul 2009 at 15:49 by Ged Mead
Introduction A recent forum post on VBCity asked for a way to highlight an important TextBox in a Windows Form. Assuming that the plan is to highlight the TextBox if the user is about to leave the Form without entering any text into it, there are of course several ways this can be done using Windows Forms techniques.
-
How To Change WPF ListBox SelectedItem Color
Posted: 29 Jun 2009 at 14:43 by Ged Mead
In this article, we will look at how to alter the background color that appears when a user selects an item in a WPF ListBox I've been using DataTemplates to organize the layout of WPF ListBoxes for quite a while now. Not only in my WPF Applications, but also by using WPF/WinForms Interop (See my article on devcity for info on how to do this).
-
Comparing Differences Between WPF in Visual Studio and Silverlight 2
Posted: 17 Jun 2009 at 21:24 by Ged Mead
This will be something of a 'Work in Progress' blog item, as I plan to jot down differences between WPF and Silverlight as I find them, either in my own work or from other sources. It can be difficult to keep up to speed on what the precise differences are at any given time. The SDKs, Toolkits, roll out of new editions of both platforms, etc all cause the sands to keep on shifting.
-
First Steps in Silverlight 2 and Expression Blend 2
Posted: 14 Jun 2009 at 08:50 by Ged Mead
As a Developer, Visual Studio is my comfort zone but I thought the time had come to see what the experience of creating a Silverlight 2 project in Expression Blend would be like. Having spent the past six months working almost exclusively on Windows Presentation Foundation, I was particularly interested to find out how different the WPF and Silverlight experience would be. The first thing I had to do was update my copy of Expression Blend 2.
-
Copying An Item Between ListViews
Posted: 09 Jun 2009 at 08:44 by Ged Mead
I've always found ListViews quite fascinating. Slightly confusing sometimes, but fascinating nevertheless. As I have often been heard to say, it's the little Gotchas that'll get ya. Take, for instance, the subject of this blog - copying an item between ListViews. The scenario is that you let the user click on an item in ListView1 and if they want this item copied to ListView2, they hit a button.
-
Removing Double Quotes from a Text File
Posted: 09 Jun 2009 at 08:35 by Ged Mead
Sometimes you don't have control over how the data is saved to a text file. For instance, some items might be saved with quotation marks around words or phrases. If you want to read the file but not show these marks then you'll need a way to remove them. Like a lot of things, it's actually very easy when you know how. You can use the built-in Replace function of the String class, replacing the marks as you find them.
-
Colors and Brushes in WPF
Posted: 09 Jun 2009 at 08:33 by Ged Mead
One of the things that first caught me out in WPF was the simple topic of colors. For example, let's say you want to reset the BackColor of a Form in Windows Forms. Easy enough. This will do the job: Code Copy Me.BackColor = Color.CadetBlue When it comes to WPF, you'll know that we are dealing with a Window, instead of a Form and have probably already picked up that BackColor is now Background. You can however, still use "Me" to reference the Window.
-
Restricting TextBox Input
Posted: 09 Jun 2009 at 08:28 by Ged Mead
This is a question that seems to come up a lot in the forums:- How can I restrict the TextBox input to numerals, or only a single occurrence of a decimal point, or some other restriction? As ever, there are several approaches. If the restriction is something basic, such as numerals only then the easy approach is to use the KeyPress event. What you can do is stop the character from appearing in the TextBox, test to see if it is allowable and, if it is, then allow it to continue.
-
Blog moved
Posted: 11 Apr 2009 at 09:01 by V. Neil Knobbe
My blog has moved to it's new address. You can find my new blog here.
-
AutoDragger: automatically enable start dragging for your controls
Posted: 11 Feb 2009 at 06:12 by Robert Verpalen
Another 'old' bit of code that I'm still using a lot none the less. Whenever I needed drag and drop, it annoyed me that I had to use repetitive code to start it manually by tracing the mousedown etc. So what better place for repetitive code than in a reusable component. It isn't any highly fancy or complicated code, but a raincoat doesn't have to be pretty to keep you dry ;) Anyway, when I was thinking when extending the AutoDragger today to alter the behaviour when dragging from a datagridview,
-
Blog moved
Posted: 28 Jan 2009 at 18:09 by Serge Baranovsky
We moved vbCity Blogs site to new platform and new location is http://cs.vbcity.com/blogs My new blog URL is http://cs.vbcity.com/blogs/sergeb New feed is http://cs.vbcity.com/blogs/sergeb/rss.aspx
-
How To Resolve the 'Untimed' ProgressBar Problem
Posted: 23 Jan 2009 at 09:47 by Ged Mead
I've seen this kind of question lots of times in the forums: "Help! I want to show a ProgressBar while I'm [doing something], but I don't know how long the process will take." The 'doing something' varies, but is often to do with downloading uploading, accessing files, reading from databases, etc. Although there are some - sometimes quite convoluted - ways of solving the calculation problem, in most cases all that is really needed is a ProgressBar that tells the user "Don't worry, som
-
Creating Video Demos With Camtasia Studio
Posted: 23 Jan 2009 at 09:28 by Ged Mead
I've been meaning to blog about the tools I use regularly and find useful and I've managed to get a couple written this month. I'm always a bit concerned that blogs like this might end up looking like some kind of infomercial. But I eventually came to the conclusion that I've always thought that personal recommendation was the best kind of recommendation, so if I like a tool I should tell the world. Whether the world sets any store by my opinion is a matter for the world to decid
-
The Best WPF Developer Books (One man's opinion)
Posted: 18 Jan 2009 at 12:10 by Ged Mead
I now have several WPF books. I've written reviews on some of them and often mentioned them in answers to Forum questions from members who want to start out in WPF. When I wrote those articles and answers, my opinion was mostly based on my experience as a general reader who was interested in seeing what WPF had to offer and dabbling with it at a fairly elementary level. For the past three months though, I've been involved with WPF on a daily basis in a training capacity. During this ti
-
WPF Commands and PerformClick
Posted: 18 Jan 2009 at 10:04 by Ged Mead
Some weeks ago I wrote a blog item about how to get the functionality of PerformClick in WPF. I remember thinking at the time that it was a fairly clunky workaround and wondered why PerformClick hadn't been included in WPF. Of course there may be lots of reasons, beginning with 'No-one thought of it' and ending with 'It was just too difficult'. But while looking at an apparently unrelated problem this week, it occurred to me that maybe there is a more elegant solution s
-
Generic comparer: for comparing/sorting sources of unknown types
Posted: 29 Dec 2008 at 11:56 by Robert Verpalen
It's been a long time since making this class and don't believe I posted it yet, but since I'm going to use it in the DataGridViewGrouper (see previous post), thought I'd post it now.Since it's “older” code, it's fully .net 2.0 compatible. It can be uses where ever an IComparer interface is used. (or the Compare function of the GenericComparer<> class for a Comparison<> call) Usage example: Code Copy Array.Sort(YourArray, new GenericComparer()); There is a gene
-
Grouping a datagridview: the DataGridViewGrouper component
Posted: 19 Dec 2008 at 14:56 by Robert Verpalen
Complete Source Code: http://blogs.vbcity.com/hotdog/archive/2008/12/19/9225.aspx Note: the code is written using 3.5 features such as linq and vars, so it will only work out the box in .net 3.0 and higher solutions. The technique in itself could be ported to 2.0. If there is much demand to do so, I'll try to include a 2.0 version as well. Example:Assuming you have a form with a datagridview called dataGridView1, add this code (after setting its datasource): Code CopyHideScrollFull va
-
DataGridViewGrouper SourceCode
Posted: 19 Dec 2008 at 14:12 by Robert Verpalen
Related blogs
-
Visual Basic Development Issues
This blog helps and discusses issues regarding Development in Visual Basic 2005 Programming Language. Whether you are a novice or an expert developer you may find a new idea with each post.
-
Aflava weblog
Blog about .Net technologies and Windows Forms in general. It will also discuss about my products and company.
-
Better .NET
Blog dedicated to musing upon ways to write .NET code, better. Focus on LINQ, VB.NET, ASP.NET, and design patterns.
Related discussion
-
How to write a query set to excel using vb.net
by BarbaMariolino (1 replies)
-
Very Urgent regarding deleting the images from a folder
by rameshbandi (2 replies)
-
Block Accessing MSSQL 2000
by militia (0 replies)
-
.NET Developer in Ghana Required....
by sysview (0 replies)
-
Sending SMS to mobile using secure gateway from VB.net 2008 c#
by pratikasthana17 (0 replies)
Related podcasts
-
xpert to Expert: Inside Concurrent Basic (CB)
"Concurrent Basic extends Visual Basic with stylish asynchronous concurrency constructs derived from the join calculus. Our design advances earlier MSRC work on Polyphonic C#, Comega and the Joins Library. Unlike its C# based predecessors, CB adopts a simple event-like syntax familiar to VB progr...