|
Why would you want such a thing? That's going to confuse the hell out of your users.
// Steve McLenithan
Cluelessnes: There are no stupid questions, but there are a lot of inquisitive idiots.
|
|
|
|
|
This over-used application UI went out of style last century (really). There are much better ways to organize your program. The Start menu should not be triffled with and not duplicated, as it might confuse many of your users. It's purpose is to allow quick access to programs and settings, just like Mac's Apple menu, and KDE and GNOME's similar menus. Applications have menus for this purpose, like File, Edit, View, Windows, Help, etc. You should stick with these and read the Official Guidelines for User Interface Developers and Designers[^] for Microsoft Windows. Designing a consistent UI is important for users.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hello,
Is it at all possible to add additional buttons next to the ControlBox on a windows form (kind of like what's in WindowsBlinds)?? Also, I'm trying to completely skin an app, so was wondering if anyone knows of any other ways I can "tweak" a form's border. Also, does anyone know of any prewritten skinning components for windows apps that have been created? Thank you so much.
Agent 86
|
|
|
|
|
With the .NET BCL, no. But there are article detailing this process by P/Invoking code (or that are written in C/C++ and you can P/Invoke and declare everything you need yourself).
For a skinned UI toolkit, check out http://www.fluiduitoolkit.com/[^], which is pretty much run by a group of CodeProject members. For others, just google.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks, I'll check into it!
Agent 86
|
|
|
|
|
Heath Stewart wrote:
For a skinned UI toolkit, check out http://www.fluiduitoolkit.com/[^],
Thanks Heath! It's comin' along, but not done yet.
|
|
|
|
|
Is there a projected release date for the Fluid UI??
Agent 86
|
|
|
|
|
For the first controls, they should be done in the next few months. More advanced controls will take a little while after that - mid-summer or beyond. (Just as I figured, the holidays offset the release date.)
|
|
|
|
|
Hi,
OK, I'm trying to create a background image on an MDI parent form. Here are my problems:
1) If I use a PictureBox, whenever I open a child form, the PictureBox stays in front of the child instead of behind it.
2) I have tried using the Graphics.DrawImage with no avail (e.g. the image doesn't appear).
I would like to have an image that appears on an MDI parent form and stays behind any children forms that are opened. What am I doing wrong?? Thanks in advance.
Agent 86
|
|
|
|
|
Agent 86 wrote:
2) I have tried using the Graphics.DrawImage with no avail (e.g. the image doesn't appear).
Where and how do you do it? You must do it in paint event of parent form in a way like this:
e.Graphics.DrawImage(...);
Mazy
No sig. available now.
|
|
|
|
|
Yes, I've tried it in the paint event like so:
e.Graphics.DrawImage(Image.FromFile(Application.StartupPath + "\\Img.bmp"));
You would think that it wouldn't be so hard to add an image to an MDI container.
Agent 86
|
|
|
|
|
I tried to override OnPaintBackground() but had no luck with that either.
There is a BackgroundImage property that you can set at design time or runtime. This works but tiles the image. I have not yet found a way to place the image, and tiling it is not what I wanted. But maybe it is some use to you?
The image is drawn quite slowly on my 550MHz machine with 400 MB RAM. On my 2GHz machine it's quite good, but uses 100% processor time. I assume that this is because of JIT and all that stuff, and it really annoys me. I wonder whether I should switch back to C++/MFC.
Please let me know if you ever find out how to place the image and prevent it from tiling.
--
Robert
|
|
|
|
|
I think this may be what you want:
http://vbaccelerator.com/home/NET/Code/Libraries/Windows/MDI_Client_Area_Painting/article.asp
I bet you never guessed it was going to be this hard. I sure didn't.
|
|
|
|
|
Holy cow!
What a lot of code! No, I certainly didn't expect it to be that hard. Thanks for the answer, though. Now I need to write some letters to MS to figure out why you need to go to such trouble to add an image to an MDI client
Agent 86
|
|
|
|
|
using System;
namespace afs
{
class Class1
{
string asdf;
[STAThread]
static void Main(string[] args)
{
asdf="USER ";
}
}
}
OH MY GOD. Have I gone nuts or something??? WHat that hell! Why won't this compile?
/\ |_ E X E GG
|
|
|
|
|
You can not access a instance field
from a static function. You will need
a object referance just like the compiler
tells you when you try to compile it.
Thank You
Bo Hunter
|
|
|
|
|
Complier didn't say anything... I now realize what I did though.
/\ |_ E X E GG
|
|
|
|
|
Because you declared asdf as an instance field and are trying to assign it from a static method without even instantiating Class1 yet. Try adding static before string asdf; .
The compiler error actually should've made this clear.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Complier didn't say anything... I now realize what I did though.
/\ |_ E X E GG
|
|
|
|
|
Mine said, "An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.asdf'", both in VS.NET 2002, 2003, and the command-line compiler csc.exe (which VS.NET uses).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I swear, it wasn't saying anything... I tried VS and the csc.exe also... However, it seems after I restared... everything is back to normal and the complier is giving me
"An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.asdf'"
So, I guess that's good. Oh well, whatever.
/\ |_ E X E GG
|
|
|
|
|
I need same help if you could help me!I have to windows aplications one is the Client and the other is the server but i can't change information between them, now i'm using sockets, if sameone could help-me!:].
i don't know if is possibel this way, right now i don't know the right direction for my application, what i want is:
One server that receives a msg from a client application testBox into a label that is in the server
Mario Santos
|
|
|
|
|
|
Object-based collections may be fine for reference types, but I'm looking for a high-performance collection to store only value types without the boxing/unboxing overhead. Is there anything available to me in the .Net BCL? Or anything on this site that might help me? (already did a search, but might've missed something)
The graveyards are filled with indispensible men.
|
|
|
|
|
Not in the BCL, not until .NET 2.0 when they will be introducing generics in .NET.
For now, you can implement something yourself. Almost all collection-like classes in .NET use an ArrayList because it can grow but it does take an Object which requires boxing value types. ArrayList uses arrays internally, and creates new arrays when necessary and copies elements to the new array. Do the same yourself, but using the value types that you need to collect. Methods like Array.CopyTo make copying elements to the new array easy, and of course creating a new array that's large enough isn't hard. For example, ArrayList.Capacity is the initial capacity (size of the array). When more elements need to be stored, Capacity is doubled and a new array of that size is created. Elements are copied and the old array is disposed (if necessary). You wouldn't have to double, though, it just what the BCL does. You could implement more predictive algorithms if you need to.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|