473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Interface rendering issues

hi all,
i am working on a project, the details of the projects are not relevant so I am omitting that, the interface and the code behind are working smoothly, the real problem that i am facing is that, when i try to run the exe file on different computers (e.g on vista using different resolution than mine, or XP) the interface would not render properly, for example if i left align a label and a textbox on my .net IDE, and run it successfully, any different computer would not render it as it does on my pc..also the right, and lower part of my application would go beyond the screen limits so that anything on those parts can not be used. I would be very very greatful if someone could tell me the specific cause of that and how to solve it efficiently.

thanks

its the first time i am using this forum, so my aplogies if i am writing the question at the wrong place, any guidence for the correct forum would be highly appreciated and wellcome.

I feel that i have to work out with my code to arrange the components according to the client's screen resolution. Problem is that how to do it efficiently. if any one wants the code i will make it available. thanks
May 12 '09 #1
9 1613
cloud255
427 Expert 256MB
Hi

What I normally do to overcome this problem is to create a panel on the form. I then set this panel's dock property equal to 'Fill', this causes the panel to resize as the form changes size.

I then add all my controls to the panel and set each controls Anchor property. Eg Control in bottom right -> anchor = Bottom, Right.

Its pretty easy to learn how anchors work, just try different settings and play with the form by resizing.
May 12 '09 #2
thanks buddy, I will try that as soon as possible.. it seems like quite workable.. the only thing i am worried about is that this perhaps will cause the text in my labels to to give an awkward look..that is resizing the label size might cause the text to be disappeared..anyways.. i will give it a try and will get back to you..

the rapid reply was quite amazing..thanks a lot for considering..
May 12 '09 #3
cloud255
427 Expert 256MB
Hi,

Remember that you can have panels inside panels, groupboxes etc. (check the containers tab in the toolbox) docking and anchoring is always relative to the control's parent i.e. one label can be anchored to a specific spot within a groupbox which is in turn docked within a panel for example.

The form itself also has maximum and minimum size properties that can be used to control re-sizing.

If you want further control over the resizing of a form you can put code to alter the layout of your controls within the form's resize event handler.

Happy to help.
May 12 '09 #4
hi mate
i think there is a little confusion in understanding the problem.. i tried what u suggested me to..but it does not seem to be working.. perhaps i could not get what you were trying to explain..look..here is the executable of my application..try to run it on your pc..i am sure the interface would not render sensibly..perhaps that would make sense.. run the attached file without fear..i suggest you can trust me that this is no virus:)..

i have disable most of the functionalities except for a few.. you can click on a label to increment the quantity of a product while right click to decrement..any suggestions for improvement of the design is welcome

take care
Attached Files
File Type: zip Favourite Fried Chicken.zip (159.2 KB, 71 views)
May 12 '09 #5
cloud255
427 Expert 256MB
Hi,

I ran your exe on a Windows XP machine 1280x800 resolution (i really need a bigger monitor...) with the default win XP theme.

I attached a screen shot of the app. Everything looked fine to me, I ran in maximized and windowed mode, the controls adjusted in the expected manner.

I also noticed that you disabled re-sizing of the form, that might be problematic for clients using really low or high resolutions...

I don't know if i'm just lucky that the layout is fine on my machine. Maybe someone else has experienced the problems described by the OP.

Sorry for not being more helpful, but everything looks ok to me. Only that the form might be a bit full, have you considered possibly separating the the customer section from the rest of the form and maybe having one form for the meals/side orders and another for the other options?
Attached Images
File Type: jpg Rendering.jpg (25.3 KB, 250 views)
May 13 '09 #6
hi mate...
I laughed really after reading your response that everything render properly on your machine..cuz on every other machine it would not render as i wanted it to be..:D but on your machine as i've seen the attached jpg..it seems alright..well its not you to be blamed i have not actually been able to explain it properly..thanks a lot for your help..just one more question..suppose on other machines also it renders ok..but when i go to actually install it on my client's machine and there problems are cause..what would you suggest me to take care of before hand to tackle such situations..?? for example should i get the screen resolution on their machines and then set resolution on my machine the same and try fixing that..in your reckoning would that be of any use??

cheers mate
May 13 '09 #7
cloud255
427 Expert 256MB
Hi,

Well i suppose you could get the form to render in the way you want on your screen. Then work out the ratio of width and height of the form compared to your resolution.

You can then use the below code to get the width and height of the client's machine:

Expand|Select|Wrap|Line Numbers
  1. Dim myScreen as Screen
  2. myScreen = Screen.PrimaryScreen
  3. Dim width as int = myScreen .Bounds.Width;
  4. Dim height as int = screen.Bounds.Height
  5.  
  6. //I did this in C# and translated into VB, i think the VB code will work, but //below is the C# code that I tested.
  7. //Screen myScreen = Screen.PrimaryScreen;
  8. //int width = myScreen .Bounds.Width;
  9. //int height = screen.Bounds.Height
You can then set the width and height of the form using the resolution of the client machine to match the ratio which worked on your machine.

Another option is to start the form maximized and not allow the client to resize the form.

A more aggressive approach will be to launch the application in full screen mode with the desired resolution.

Just for interests sake, do you experience the rendering issues on both Vista and XP?
May 14 '09 #8
hi
yes vista and xp both are giving me troubles but on xp machines its even worst..anyways..i try this and i will get beck to you in at least in 2-3 days..got some important college stuff to do..

thanks a lot for the instructions..
May 14 '09 #9
cloud255
427 Expert 256MB
You're welcome.

Good luck with the studies.
May 14 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
3
by: Sai Kit Tong | last post by:
I posted for help on legacy code interface 2 days ago. Probably I didn't make it clear in my original mail. I got a couple of answers but none of them address my issues directly (See attached...
1
by: Jon Rea | last post by:
I have an MDI application that has multiple different "modular documents". Each document can own multiple MDI windows that are managaed by a manager class that uses the singleton pattern and holds...
5
by: ujjc001 | last post by:
Hello all. I am working with .net on various boxes from 2000 pro to XP and 2003 server. On all the computers we get page rendering issues where sections of the page don't show right or txtxboxes...
1
by: JackBlack | last post by:
Hi, all! Using Win2k3 Server & IE 6 (all patches) on one box (web server), and XP/Pro & IE7 on another (workstation)... Project is a basic on-screen calendar with dynamically created table rows...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
1
by: Christian Lund | last post by:
Hi, I am struggling to implement the following shell interface in C# : ==================================================== (extract from ShObjIdl.idl in Windows SDK)...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
1
by: =?Utf-8?B?TUNN?= | last post by:
Is it possible to have .NET controls render as HTML 4.01 Strict compliant? In web.config, there is xhtml conformance, but that does not provide an option for HTML 4.01.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.