Creating a More Attractive DataGridView - vb.net

My form looks like this with a DataGridView:
I would like to make it look more professional. Can someone recommend a "makeover" for it? Perhaps there is a more attractive way to display this data.

I have been using a free grid control from Component Factory, it has all the same features as the standard DataGridView. The grid allows customization for pretty much all UI elements.

This looks quite nice already. What you might want to do is set the Dock to Fill with the Properties panel to make it fill the whole form.

Personally, I'd recommend softening those colors a bit. Use pastel-versions of the same color perhaps.
Also, like person-b suggests: Dock->Fill.
I'm not a big fan of unnecessary row/record-selector columns. If you don't need it, I'd recommend getting rid of it.
One last thing, Normally I'd recommend not paining your UI with a crayon, instead letting the colors default to whatever the user has specified as their Windows theme. However, I see the point of coloring the columns in your case. I would suggest that you allow the user to modify the colors. I'm not color-blind, but it's possible your colors may be unreadable to someone who is.

My first thoughts are on the column colors, does the color mean something, if you are try to differentiate to columns I would use two subtle colors. Large color shifts should have a meaning (Errors are bold and Red). The Font should use the System font styles and basic colors should also you the system colors. Colors and font styles may work for you but not everyone, some people are color blind, some people need larger fonts.

Related

Colordialog in PowerPoint

I am making some add-in to PowerPoint.
I would like to let user choose color using colordialog (or some other this kind control). But it would be the best if it would look exactly like built-in color dialog/color picker in PowerPoint, and with the same colors in sections Theme Colors, Custom Colors and Standard Colors. Is it achievable? If yes, how can I achieve it?
It really depends on what you need to use the color for. Office has many pre-defined controls that can be easily incorporated into an addin, some of which use the standard Office color picker (which includes the theme colors, custom colors, etc. that you are looking for). You can download a list of all Office controls from the Microsoft website (you will only need to use the PowerPointControls.xlsx file). Any of the controls listed in the file can be added to your addin by specifying the idMso in the ribbon XML (assuming you are creating a ribbon). You will need to look through all of the controls to se if there is one that matches the functionality you are looking for.
Note that most of the controls have some sort of additional functionality attached to them in addition to selecting a color. I have not yet found one that selects and returns a color. Hopefully what ever functionality you are in need of is included in one of the controls. You may be able to get a better answer if you provide more information on your specific application.

Why aren't the initial properties of my forms and controls preserved on another computer?

I've made a little Towers of Hanoi game, but nothing what was set on my PC looks the same on a different computer, not even the fonts. Everything is so messed up, I couldn't do it better even if I wanted this to happen. To say it short the backgrounds used for controls and forms are out of place, the initial values used for size and position of both forms and controls are bloody changed, and my project just looks like a huge mess. It's true I've worked in absolute values, because usually a programming language respects the programmer's point of view, and doesn't scales and moves everything the way it wants. If I wanted my project to rescale according to screen resolution I would had used relative coordinates, and made all my forms and controls dimensions be a certain amount of the screen's width and height.
Is there a way to preserve the project just as it was initially designed, so it would look the same on any computer?
I'm using Visual Studio 2010, and Windows 7 as OS.
You don't tell us specifically which properties you've modified from the defaults, or show us a screenshot of the before and after views from which we might be able to infer which modifications you've made. But you did mention something about changing the font, so we'll go with that.
In fact, it does try to preserve your specified properties to the extent possible. But sometimes it is just not possible. For example, if you specify a font for your controls that isn't available on the other computer, then it has no choice but to fall back to a font that is available. If you have any experience with web page design, it is a very similar problem. You have to use a small subset of web-safe fonts to ensure that they will be available on all of your users' computers. That's also why web designers are so keen now on embedding fonts into pages.
Anyway, it goes without saying that if the font has to change, the layout is going to be messed up. Different fonts are different sizes, so different amounts of text are going to fit, causing some to get cut off. That is why, in general, you should avoid changing properties like Font. If you use the defaults, things are a lot more compatible. But neither web pages nor desktop applications are WYSIWYG. You need images or PDF files for that.
Then there are system settings like DPI that can really mess things up, too. Keeping the default font isn't going to help you there. You have to design your application in a smart way. You mention something about relative layouts—these are the ticket. Unfortunately, WinForms doesn't make it easy to do this. It all but forces you into specifying absolute sizes and positions based on the pixel grid, which is mostly a waste of time, as you've seen. I describe in detail how to accomplish this in WinForms in this answer. The AutoSize property will be very useful to you. Of course, you'll also need the dynamically-growing TableLayoutPanel and/or FlowLayoutPanel controls, otherwise you'll end up with automatically sized controls that overlap one another.
Pre-emptive snarky comment: you should totally drop WinForms and use WPF instead. It is new, and cool, and sexy, and all but forces you the other way into pixel-independent layouts. Of course, it also makes it really easy to create butt-ugly, downright unusable applications that look like some of the stuff Microsoft has been churning out over the past couple of years.
#Cody Gray thanks for your insights.
com/qMBJS.png
The first image is how the main menu looks. It's kinda self-explanatory how it should had looked, without the big white margins while the text should had been inside the labels backgrounds
The second one is some in-game footage. And this is just one of the levels. It's so messed up I'm almost sorry I've lost a night doing some heavy work on the image editing side of the matter. I'm not at my own PC right now, so I've tried to rearrange all the stuff directly in Visual Studio's design window, to show how the level should had closely looked. Just imagine it without the white and black margins surrounding some controls.
Also I've tried to set the controls and forms parameters through code, when the form loads, trying to force it to look as it should but the result wasn't any better.

line spacing in label + vb.net

I have a .NET 2.0 standard Label on my form, well I put some text in it with several lines. But the spacing between the lines are too small. Just want to know if there's a way to fix this.
Thanks...
The only solution I can see would be to make multiple labels and space the labels appropriately.
You may need to create the labels dynamically, one per line.
Of course, you could do a .Split(vbNewLine) on the text you want to display and then for each string in the list, create a new label control, adding it to the form, and spacing it out appropriately from the previous label.
Not ideal, but about the only way to accomplish it.
There is another alternative way to work out that you use the WinformHTMLTextBox then embed the content by using html code which you can employ the advantage of CSS.

What kind of txtfield to use?

I am making an PM system, now I am to where you are going to type the PM.
I dont know really what to use, I don't want to use an normal fugly text field, as theres much nicer stuff out there.
Ive seen those auto expand textfields, that expands more you write? What is this called? Then there's this facebook have, which i also like. And then i have seen this "CKEdtior" stuff, which also seems pretty cool (but i wonder how the output from the CKeditor look like if you use bold, italic, etc..)
Which should I get? What i wish is nice, simple & effective.
maybe this is what you are looking for!
Depends on if you want to allow the user to put in stylized text like bold, italic, links etc. If thats the case there are many editors out there that will turn a stock text area into a full featured editor or even a limited editor. All the below editor return formatted HTML text. What you do with it is up to your app.
Try these if you want a word like editor:
xinha.webfactional.com
tinymce.moxiecode.com
ckeditor.com
www.dhtmlx.com/docs/products/dhtmlxEditor/index.shtml

How to create iText PDF with CMY colors only

I need to create pdfs with iText (for the moment, other lib suggestions are appreciated) in the CMY colorspace. It's not CMYK:
All colors and black should be converted to CMY only so that the black plate is empty when saving my created PDF. I know, black would look some sort of brown, but I have to requirement to not use any black plate for this pdfs.
Do you have any suggestions how to do that?
(PS: this is like need-help-answers-on-pdf-color-seperation, but instead of converting pdfs, I now ask about creation. But if anyone has an answer to the linked question that would also help!)
There are a couple ways to go about this. First, you need to decide how you're going to represent your colors...
CMYK where the 'k' is always zero
Device-N colorspace, with three color channels. "Colorants" is the term I believe.
Then you need to use iText's color objects, and make sure every single color attribute is set to either one of your colors, or to null (which translates to 'not drawn' in iText-ville). There will be a lot of default values you'll need to hunt down and replace.
You might want to hack on iText's source a bit to help you, specifically PdfContentByte. There are a couple different options.
Find all the places where it sets the color, and throw an exception save when its using one of your colors (CMKY-with-no-K or Device-N-where-N-is-3).
Much harder: In all those places you're throwing, TRANSLATE the color into the equivalent in your color space instead. Gray-scale to CMY-No-K shouldn't be all that hard, but good RGB->CMYK translation is at least as much art as science...
And if you including any images that aren't CMY-no-K to begin with, you'd HAVE to translate them. No getting around it. And if you're translating some colors, you might as well go with at least a partial version of #2 above.