Read what is said earlier about the VisualStyleProvider Control From skybound.
Check it out at www.skybound.ca
Printable View
Read what is said earlier about the VisualStyleProvider Control From skybound.
Check it out at www.skybound.ca
Quote:
Originally Posted by NicoNel2000
Yup, thanks..
What about the toolbars? I feel like such a newbie asking these questions but quite frankly I am when it comes to .NET. Seems like a whole new world to me :(
no probs
if you stumple upon any articles, reading, whatever re creating your own user control pass it on will you?
If you happen to have the vb.net resource kit on your machine, there's some nice articles and sample apps on that.
cheers
Sure thing. It would have been nice is m$ just included this functionality in the first place... I guess they just didn't want people making applications which looked as good if not better than theirs ;)
Well, not sure why, but you can say (in your sub main)
Application.EnableVisualStyles (but for some reason this only work if you add a doevents straight after this)
someone advised me (here, where else) to use skybound's control as there's bugs in ms's VisualStyle thing.....what's news?
Anyhow, Skybound is the bomb. I don't have a single app without it.
Too bad is when you create a dll for another application, you cannot use it, cuz the exe must use it, and if it's out of your hands, well, you can blame MS for that.
I used the NETXP controls from Dacris Software for my app....Quote:
I was very dissapointed seeing that the controls were not Xp/Office style. How does one go about achieving this?
Bloody hell. That is the most brilliant listing thingy i have ever seen...
http://www.v12digital.com/screenshots/jtaskbeta2.jpg
Very sexy indeed.
Did you inherit from any particular windows control or did you write this from scratch (new usercontrol)? Is it fast to draw that, what's the overhead like?
I must reiterate praise from earlier posts: bloody nice work mate.
OMG!!! Just read that now. Don't suppose you want someone to port your fancy list control to .Net do you? (I mean the one on the link in my last post)Quote:
Originally Posted by PaulB
Ok, ok enough head massaging! :)Quote:
Originally Posted by wossname
If anybody else is interested in improving their GUI designs, then I heartily recommend this book and this one is also supposed to be good, I have it ordered and should arrive today.
The first book, teaches you about the principals of good UI design in a light-hearted, easy-to-read way. It has no code in it whatsoever, but has a series of chapters focused on how to design from a users perspective. Definately worth a look.....an easy to read book.
I only write code to impress other coders, who cares about the user hehehe
:D
Not really.
LOL!Quote:
Originally Posted by wossname
Quote:
Originally Posted by wossname
All written from scratch. The lowest end computer the software has to run on is a 700MHz Duron with 256MB RAM... so I know my bottom margin. I test on an old Sony Vaio laptop: 650MHz P3, 256MB RAM, Neomagic graphics.
The main overhead is on accellerated graphics, so a reasonable graphics card makes it silky smooth... and by reasonable I mean something as basic as ATI Rage 128, or nVidia TNT etc.
This is what I'm working on at the moment:
Example 1
Example 1
Example 1
Hello Paul,
You're a complete git and I hate you! :D
Quote:
Originally Posted by LeeSalter
lol thanks. :)
Although I still need to make a replacement scrollbar control.
Damn fine stuff mate...once more.
Where do you begin to design controls like these??
I start a new job on Monday as a fully-fledged Developer (sideways move from Support to Dev)...my company would *** in their pants if I started producing stuff like that.
My User Admin app looks Ok to me, but nothing compared to your work (seeing as I just downloaded some NETXP controls for it).
Having said that, some of the UI's our current Dev team churn out are a bit pants to say the least, so anything will be an improvement.
DirectX?Quote:
Originally Posted by PaulB
I like the smooth fonts particularly, did you use an API for that?
The smooth fonts are rendered by Windows XP sub-pixel rendering.
I don't use DirectX for these GUI components. I use teh API blitter functions.
I have my own unique method for making it faster than double buffering, but still keeping the redraw solid. Scrolling is silky smooth, even on low-end computers. It redraws in realtime as the user scrolls through it.
As I stated eariler in the thread, I use my own methodologies to design the GUI from the user's point of view, taking into account navigation, work flow and information flow... and then I work to make it as intuitive as possible (but can't spend too long on it).Quote:
Originally Posted by LeeSalter
As for the technical side... I create all my individual sprites, load them into memory. I then write some functions to build up an array that contains all data to do with the display, in the same order it is to be displayed.
For drawing, basicly loop through the array and blit the spites to the correct positions. I've got my method down to a fine workflow where I can bolt on smooth scrolling code after I've sorted the visual layout.
Yep, thought so! :confused: :p :DQuote:
Originally Posted by PaulB
Where does one go to BEGIN to learn these techniques Paul? Granted you developed them yourself but you must have learned somewhere the basics??
That's just the point. I didn't learn it from anywhere.. It's been trial and error all along.Quote:
Originally Posted by HatredFueled
The only basics I had to learn as such was how to use the API functions... from there on I wrote a lot of test applications over the years, trying out new ideas etc.
Agreed Paul,
my User Admin app is now on version 4! As I learned new stuff, through trial and error, I've added new functions to it.
I just need to get my hands dirty with creating custom controls.
However, to create controls that look as good as yours, I do think you need a certain NATURAL flair for design and I don't think that sort of thing can be either taught or learnt!
I think you're right. It probably helps a lot of you have a natural flair for design and graphics to make things look nice... but that should prevent someone from creating custom controls that can work in which ever way is best suited to the task... and that's probably still better than trying to get a generic control to do the same thing.
The best control I have ever built is here www.roboplot.8k.com (ignore the adverts :rolleyes: ) Check out the gallery :D
Its on the shelf at the moment because I can't be bothered writing the documentation at the moment.
That's 100% .net code.
I'm looking for new ideas for controls all the time, stuck for inspiration at the moment.
That does look great, but the finalize button is mis-spelled. Finalize not Finalise. ;)Quote:
Originally Posted by wossname
Who's prog is it? (Didnt want to read all the posts, not enough time :D)
Quote:
Originally Posted by RobDog888
Actually it appears as though Paul is from the UK like me so it's spelt with an s..
My Bad. I didnt even think of that. Is that correct spelling over there?
How did he draw the GUI? Graphics class or images?
Done with blitting sprites apparently. Very clever stuff...Quote:
Originally Posted by RobDog888
What are Blitting sprites?
Absolutley no idea!Quote:
Originally Posted by HatredFueled
Quote:
Originally Posted by LeeSalter
LOL!
Oh dear... I find it hard to believe that the learning curve is THAT steep.. it's VB after all.. I'm pretty good at design I do motion graphics work etc so I'm creative I just need direction as to how one would go about coding something like that :(
Probably not too steep...I have no design flair whatsoever, so I'll just have to keep plugging for functional, if not pretty, interfaces!! :bigyello:
This has been discussed earlier in the thread. Use your initiative.Quote:
Originally Posted by RobDog888
In .Net drawing gradients is a piece of cake and you would probably use small repeated bitmaps for the shadows. Otherwise its just a matter of selecting attractive colour schemes and knowing how users think. This and the maths to get the graphics positioned right, are the tough parts.Quote:
Originally Posted by HatredFueled
Expanding list items are tricky to draw at the best of times, let alone with graphics and gradients.
To do all of that in VB6 is a real accomplishment. Respect.
Quote:
Originally Posted by RobDog888
That would be my GUI. The only part of it which is MS are some of the little icons... but they will be replaced with much better looking icons when I get the time to draw them.
A post of mine from another thread:
Quote:
The GUI is made by looping through an array and blitting sprites based on what is in the array into a picture box. It redraws in real-time as you scroll and collapse/expand sections. I worked out an algorithm so that it scrolls smoothly and it only draws the area which is being displayed to further increase its efficiency. I've also made grid controls using similar methods. My first grid control had many more features than the MSFlexGrid, and it was much faster to add items to it. I've also produced a progress bar which is over five times faster at redrawing than the standard bar included with VB, yet my progress bar draws with a 24bit colour gradient and a translucent inner shadow. See here, here and here.
Here is my latest project... please be aware that it is still in development... so it will look better by the time its done.
This is an appointment screen. Again its just a picture box with blitted sprites. Using MouseMove event I can see which array element the use is dragging, update the array and redraw the display. This means that the user can drag these appointments around the screen as if they are objects. They can also resize then my dragging either the top or bottom of an appointment. It runs silky smooth on a low spec. PC. (600MHz P3, NeoMagic :sick: graphics chip).
Click here to see it
and this is another screen from the same program.
Quote:
Originally Posted by wossname
That looks awsome. So are you doing pixel plotting in a byte array and then blitting it to a drawing surface, or does VB.net have functions for these types of graphics built in?
It's nothing to do with the language, it's more to do with the algorithms and techniques. The same techniques would apply in any laguage if you're using the same API functions. Although, in a faster language such as C, you wouldn't have to spend as much time optimising the code.Quote:
Originally Posted by HatredFueled
What you guys can do with the GDI is awesome. I really mean that.
For the rest of us, this suite of components may be of use, if you've some spare cash.
Well worth the outlay. I'm going to download the trial version and will report my findings on this thread.
Happy designing.
Thanks. No, the plot data is kept as <single> data and passed to the GraphicsPath class, it is then transformed using matrices. Then it is drawn (using the Graphics class) with specified Pen and Brush objects (Pen defines width, brush defines colour and maybe gradients).Quote:
Originally Posted by PaulB
Paul, in VB6 do you always turn of Autoredraw or do you leave it on?
A quick example in VB.Net... (not intended to be tidy code, just a demo of what can be done with a small amount of code :D)
VB Code:
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint 'heading gradient '1. Dim bb As Brush = New LinearGradientBrush(New Rectangle(0, 0, PictureBox1.Width, PictureBox1.Height), Color.CornflowerBlue, Color.White, Drawing2D.LinearGradientMode.Horizontal) e.Graphics.DrawLine(New Pen(bb, 20), 0, 10, PictureBox1.Width, 10) '2. thin underline e.Graphics.DrawLine(New Pen(Color.Blue, 2), 0, 21, PictureBox1.Width, 21) 'make it look nice e.Graphics.SmoothingMode = SmoothingMode.AntiAlias 'heading text bb = New LinearGradientBrush(New Rectangle(0, 0, PictureBox1.Width, 20), Color.Black, Color.Red, Drawing2D.LinearGradientMode.Vertical) e.Graphics.DrawString("My Graphics Demo - VB.Net!", New Font("Arial", 10, FontStyle.Bold Or FontStyle.Italic), bb, 0, 1) Dim path As GraphicsPath = New GraphicsPath Dim r As Rectangle = New Rectangle(10, 30, PictureBox1.Width - 20, PictureBox1.Height - 40) bb = New LinearGradientBrush(r, Color.FromArgb(64, 210, 64), Color.FromArgb(128, 255, 128), Drawing2D.LinearGradientMode.Horizontal) path.AddArc(r.Left, r.Top, 16, 16, 180, 90) 'top left path.AddArc(r.Right - 16, r.Top, 16, 16, 270, 90) 'top right path.AddArc(r.Right - 60, r.Bottom - 60, 60, 60, 0, 90) 'bottom right path.AddArc(r.Left, r.Bottom - 16, 16, 16, 90, 90) 'bottom left path.CloseFigure() Dim rt As RectangleF = RectangleF.FromLTRB(r.Left, r.Top, r.Right, r.Bottom) rt.Inflate(-5, -5) e.Graphics.FillPath(bb, path) e.Graphics.DrawPath(New Pen(Color.DarkGreen), path) e.Graphics.DrawString("The quick brown fox jumps over the lazy dog. More text, just to fill up a bit of space and not really saying anything important at all.", New Font("MS Sans Serif", 10), Brushes.Black, rt) End Sub
By the way, check out the screenshots attached to my last post. There are 3 gradients there, a vertical black to red on the title text, green to pale green on the curvy region and the blue to white swipe at the top.
The whole thing resizes with the form :D
If you want to play with it.....
You see, in VB6, on my Progress Bar control for example, I work out each colour of each pixel to be plotted using a small algorithm I wrote. I suppose that since VB.net has a function for such things... programmers can be more productive.... but what if you wanted to also draw a smooth translucent shadow like on my Progress Bar. I can imagine that these conveniences, although really great for quickness, will become limitations when you try to push beyond the norm.
Screen1
Screen2
Screen3
Piece of cake. No custom alg required.
VB Code:
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint e.Graphics.SmoothingMode = SmoothingMode.AntiAlias e.Graphics.DrawString("ALPHA BLENDING :)", New Font("Courier New", 50, FontStyle.Bold), Brushes.Red, 0, 20) Dim r As Rectangle = New Rectangle(0, 30, PictureBox1.Width, 40) Dim bb As Brush = New LinearGradientBrush(r, Color.FromArgb(255, 0, 0, 0), Color.FromArgb(0, 255, 255, 255), Drawing2D.LinearGradientMode.Vertical) e.Graphics.FillRectangle(bb, r) End Sub
With this stuff, in 10 years, all programmers will be script kiddies. lol
Time to compare :D
My version (although not EXACTLY the same could be made pixel perfect by changing a couple of constants). This took 11 lines of VB.Net code. Could be squeezed down to maybe 7.
We won't be script kiddies. Not wasting weeks writing the GUI frees us up to make the back-end stronger. OOP is the future.
Very good. Your shadow doesn't appear fade out though. :p
I find coding algorithms the most interesting part... and I do code in OO as much as VB allows anyway.
What about though when you want to do a GUI like the one on my JTask program?
I dynamically draw each comment box. I created my own word wrapping algorithm so the GUI is fully resizable.
I know it's great for speeding up development, but if all this is eventually done for us, surely future programmers will be less skillful than their predessors.
Take a closer look then. :rolleyes: Change a single number in the code and the transparency changes.Quote:
Originally Posted by PaulB
As for programmers becoming more skilled, that's life I guess. Would you rather go back to punched cards and bubbletanks?
It would be madness to keep reinventing a wordwrapping algorithm in every single program you make. Such things should be standard, best way to do that is to stick it in a runtime library.Quote:
Originally Posted by PaulB
of course not.
My word wrapping algorithm is used in a few programs of mine, so I'm not rewriting it everytime. It's fully reusable... but the point is that I created it myself to work the exact way I want it to work.Quote:
Originally Posted by wossname
There are other problems with this kind of bolting ready made components together. What if you write for multiple platorms? The API on the other platform may not have an equivilent function.
Anyway, this is all besides the point. Creating, or rather, designing an effective and intuitive GUI is still the hardest part.
Here's yet another example. lol
This is a reporting program that allows our finance dept. to get reports from our remote locations.
http://www.v12digital.com/screenshots/mvRRS.jpg
By creating a custom GUI, it's extemely intuitive because it's designed from the ground up to do what is required. This doesn't mean that everything is written from scratch. I have various functions which are reused in many of my programs. The user can select the type of report, and then select which locations to run the report, or they can select the location and then see what reports are available, and select them... or they can do both. Once each report is done, a print and view link appear next to each one. The GUI is just one control that I made from scratch. I use my gradient function to work out the gradient based on form width (redunant in .net) and store it as a sprite. Same for the progress bars and check boxes etc. Everything is then blitted to a drawing surface.
I was pretty much being lazy and I didnt have all day to read this entire thread :eek:Quote:
Originally Posted by wossname
;)Quote:
Originally Posted by RobDog888
There are some good graphics in this thread :thumb:
These are the sorts of GUI's you can come up with using Infragistics NetAdvantage Suite.
How long would it take to write a GUI like that (on the right) using those tools?
I would do something like that in less than a day using my methods. Obviously when I started out experimenting it would have take much longer, but nowadays that would be quite a quick job, and I'd be able to customise every little pixel if I wanted to.
Sure, but its more fun to code your own GUI.
Hi again Paul,Quote:
Originally Posted by PaulB
Hope you're doing ok.
The NetAdvantage tools seem to be very, very nice to use and easy to pick-up.
The screenshot that I posted is one of the sample apps that ship with the trial version.
I agree that it is fun to try and code your own custom controls, but (I've said it before in this thread), you absolutely do need to have some natural flair for artistic design to be able to come up with the interfaces and controls that you do.
Unfortunately for me, I have absolutely no natural flair for impressive artistic design and so am forced down the 3rd-party controls route (which I don't mind doing anyway, tbh!).
The Infragistics controls are worth having a look at if anybody else is interested, they are fairly cheap for what they do and how they look and can be distributed in your applications for free (the licence is per-developer).
Happy Interface Building! :D
I'm in the same boat as LeeSalter - I can design nice looking interfaces, but I have absolutely no artistic talent what-so ever. I like Intragistics tools. It's a bit pricey but worth it in the long run. Fortunately there's enough free things out there that I can get my current project done (which is very utilitarian and it's functionality is much more important than look) and use that to bank roll the purchases of tools I need for my next project (which is going to have a much higher priority on the interface.)
Tg