|
Hello!
I´ve got a problem with users losing the ability to view controls when their video resolution settings are set to a low resolution. The program is optimized for 1024*768, and when a user has for an example 800*600, some controls disappear. I´ve tried with making scrollbars appear in a situation like this with the property autoscroll set to true, but it doesn´t help. Anyone got a suggestion what I should do?
/Regards
|
|
|
|
|
let the users change for 1024*768
|
|
|
|
|
your form's height and width should not more than 800x600
|
|
|
|
|
Yes that is one solution, but as I said the application is optimized for 1024*768, which also 99% of users will have. I´d prefer a solution with scrollbars appearing. I´m currently experimenting with autoscrollminsize property.
|
|
|
|
|
u got the answer below, Anchor and docking
|
|
|
|
|
There is a concept of Docking controls in windows applications in C#. Whenever I make an application I never set its width or hard code any of such attributes. All I do is to dock all the controls in such a way that the controls adjust themselves whatever the resolution is. Then you always set their minimum and maximum properties so that the controls dont get too much distorted on different resolutions or on resizing.
Hope it helps.
Regards
Khalid
|
|
|
|
|
Try Anchor and Dock properties... They are your life saver;)
|
|
|
|
|
|
There is an built-in types table for .NET framework type to C# type which are
aliases of predefined types in the System namespace
(http://msdn2.microsoft.com/en-US/library/ya5y69ds.aspx).
How can use access and use this table (by C# code) to convert the alias to
the .NET framework type.
For example: if I have:
string aliasType = "int";
string frameworkType = ???
-------
Thanks
Sharon
|
|
|
|
|
It's a simple, Just create a function, accept c# type, use switch case statements, find and return respective .Net type...
|
|
|
|
|
Yes, I can use the switching for the string alias, and I can also use a hard coded hash table.
But the .NET has this kind of table built-in, and I wish to use it (I don't like inventing the wheel all over, it's there already).
Do you know how can I use this built-in table?
------
Thanks
Sharon
|
|
|
|
|
I think it's easier to make a switch yourself than to try to find that table, which doesn't even have to exist (MSIL optimization and stuff).
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
I would like my program to show jpeg image in a 240 X 144 resolution, the image to be shown is 800 x 600, i would like my program to be able to view tje jpeg by scrolling it vertically and horizontally. thanks in advance.
|
|
|
|
|
ebbed your PictureBox on a Panel.Set AutoScroll Property of Panel to true and and set SizeMode property of your PictureBox to Auto Size.
Now Enjoy
|
|
|
|
|
thanks for the help it works! i have another question, is there a way that when the picture loads the screen loads at a specified part of the picture?
|
|
|
|
|
In some way I want to hide controls in my Windows form or show them depending on which MainMenu button (menuItem) is pressed? Thanks.
|
|
|
|
|
hi
you can get this by using the MainMenu_click event which is fired when any button is clicked. Inside the method of the MainMenu_click you can write a code that get which button is clicked depending on the index of each button. (the buttons in a Main Menu are indexed as an array element is indexed starting from 0)
hope it helps.
If you need any help contact me on MSN: jamilaboukhalil@hotmail.com
Jamil Abou Khalil
|
|
|
|
|
I know that each button is presented by an index but the problem is that I want to place the code in timer1_tick event (sorry I didn't tell you). Jamil, have you got any idea how can I do that, or anyone else? Thanks
|
|
|
|
|
hi
sorry i have no idea about the timer1_click event but if you want tell me what does it do and for what control it is initiated. maybe i will be able to help
best regards
jamil abou khalil
|
|
|
|
|
Well, I don't know about the click event too . Ok, I talk about the only one event of the timer control timer1_tick. Sorry again ). Can you help me?
|
|
|
|
|
hi
i am not understanding what u want. first u said that u want to hide some controls when buttons are clicked or visa versa. That is solved by the click event of the button. and then u want to use the timer1_tick event which is fired as i saw on a given interval of time. i can't see what is the common between these information that you gave.
best regards
jamil abou khalil
|
|
|
|
|
I have a panel that changes it's size gradually by using the timer_tick event of the timer control. I want when I press a menu button this panel to show by encreasing it's size and show some of the controls. After that when I press the second menu button the panel hides (as it gradually decreases it's size to panel1.height = 0 and in the very next moment to increase again by showing the other controls). I thought I could take the text property of the buttons (menuItems) in a switch-case construction placed in the timer_tick event but it didn't work. I don't know if there is a simle way. It's a little complicated. Hope it is clear now what I want to do
|
|
|
|
|
hi
u should go to the first soulution that i gave to u; that is; using the button_click event. double click on the menu item and that event will write a function for you and then write a what u need inside it. i can't see another solution for that.
best regards
jamil abou khalil
|
|
|
|
|
Create a global class level variable. On click of menu set the variable to clicked menu name. In the timer_tick event retrive the current menu from the variable.
|
|
|
|
|
Hi, thanks both of you. Now I tryed to solve the problem with a global class variable and it works. It just needs a little fixing. I'll cope with that. thank u guys for the help.
Best Regards..
|
|
|
|