|
Thank you so much.
Always Keep Smiling.
Yours Pankaj Nikam
|
|
|
|
|
Put everything into a panel, and set that panel's Anchor property to none.
|
|
|
|
|
Hey all,
I am currently in the middle of writing a custom windows form. (.Net 2.0).
I have removed the default border from the form, changed this to a Sizable Border and also set the text of the form to blank so to remove the window caption box.
I have now added a custom close, minimize, and maximize button to my form. All works well except for the maximize. On clicking this button, i do wish the form to maximize, which it does, however; it also maxmizes over the top of the task bar. How would i go about stopping this, and letting us view the task bar at all times?
I could set the size on the window, however; that would still show the resize borders on the form, which i want to be hidden on maximized state.
Help would be greatly appreciated.
Thanks
TF
|
|
|
|
|
If this.WindowState = System.Windows.Forms.FormWindowState.Maximized doesn't work for you then you're working too hard.
|
|
|
|
|
It works to a certain extent... It maximizes the window, however; it also maximizes over the top of the task bar
|
|
|
|
|
Works fine for me, doesn't cover the task bar.
|
|
|
|
|
Yeah, I have seen some anomalies over the years, and never figured out all the details; some of these are factors in the end result:
- Windows version
- taskbar location (mine is typically at the left)
- taskbar mode (auto-hide, never hide; I prefer never hide assuming monitor sufficiently large)
- the order in which Windows properties get set
And for some applications, one wants to cover the task bar whatever the system settings are (e.g. a slide show)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
with a standard Form, when you look at Form.Bounds in the Resize handler, you will notice maximize typically sets the corners off-screen, e.g. the top left corner to (-4,-4) which is fine when you have a single monitor (the maximized form would protrude on a second monitor if you watch closely).
You could forego the built-in maximizing, and do it yourself in as much as you need it.
Also SystemInformation.PrimaryMonitorMaximizedWindowSize might be of interest.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks
Manage to figure it out using SystemInformation.PrimaryMonitorMaximizedWindowSize and writing the maximze code by hand.
|
|
|
|
|
Set this property in your load event, or make it a user option: this.MaximizedBounds = SystemInformation.WorkingArea;
|
|
|
|
|
hello,
i wrote an application in c# that starts automaticaly when computer starts.
i allready have code that prevents the application from running more than
once as follows:
static void Main()
{
Boolean firstInstance = false;
string safeName = "xxx";
Mutex mutex = new Mutex(true, safeName, out firstInstance);
if (!firstInstance) return;
}
now when i publish a new version (i set the revision to increase
automaticaly) and run the setup file all is fine but the old application
still remains.
i get two copies running , one new and one old.
is there a way to tell the old version to close ? like an external event?
i am using only visual studio tools.
thanks in advance
avi
|
|
|
|
|
Hi!
Do you mean to say that during updated installation you SETUP should remove previous installation.
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
no no navneet hegde,
i ment that a previous program is still running,
now a new program needs to run instead of it so how will it end the
process of the previous program ? i dont want the old program and the new program to run but only the new one.
after the installation of the new program finishes , the old program closes and the new program takes it place..
i seen it done in famous apps , i wanna do it too...
thanks
|
|
|
|
|
Hi!
Your new Application starts.
In Main get the collection of all the running processes.
Iterating it you get your running process object.
Compare it's build with this process build.
If it's greater than kill the previous process and continue with this process.
Else kill this process.
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
ok , thanks i shall try that
|
|
|
|
|
Hello guys.
How much bytes does Color struct get ?
Thank you
|
|
|
|
|
Mohammad Dayyan wrote: How much bytes does Color struct get ?
what for? static data? instance data? IL code? native code?
each Color instance is a struct which only offers four 8-bit components (A, R, G, B), so 32-bit seems the obvious answer. You can measure that yourself.
ADDED: see correction in another message [/ADDED]
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Saturday, March 14, 2009 10:42 AM
|
|
|
|
|
I've got it, thanks
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
The important point here is that it would have taken just one line of code to find that out on his own. I have a winform app standing by specifically to test things and discover stuff just like this.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I've never needed to do this on Color so I gave it a try.
Console.WriteLine(sizeof(Color)); interestingly produces the following error:
'System.Drawing.Color' does not have a predefined size, therefore sizeof can only be used in an unsafe context.
Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(typeof(Color))); returns 24.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Are you running a 64-bit Windows version?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
No, that was Vista 32bit.
[Edit] Same results on Weven 32 bit [/Edit]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
modified on Saturday, March 14, 2009 11:50 AM
|
|
|
|
|
Just seen your clarification below - cool and fived
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
So today we learned one drop of color paint is much bigger than one pixel.
Regards,
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|