I have a user control with a Panel and five Labels. The end result is a
circular volume control (no actual circle is shown). The Size is 90,97
I fire up VB2005, Select Windows Application, add a couple of buttons and my
user control. The buttons are just to run the code that sets the volume to a
preset value.
The control displayed is the correct size (90,97). Everything works as
expected. I can even grab the volume pointer and drag to some other setting.
Now I load up my application and go to the proper form. I place the user
control, from the toolbox, onto my form. The size becomes 105, 119 (not the
expected 90,97). I cannot change the size !! Notice that the aspect ratios
are not the same.
I've tried setting it to Autosize=True and GrowandShrink. Nothing helps.
Where oh where did I go wrong?
GalenS 5 1449
Hi Galen,
The default constructor of your control has the clue. Make sure you are
putting in the right values in there.
Hope this helps.
--
Radhakrishna Banavalikar
Vasant-Vihar, Thane, INDIA.
"Galen Somerville" wrote: I have a user control with a Panel and five Labels. The end result is a circular volume control (no actual circle is shown). The Size is 90,97
I fire up VB2005, Select Windows Application, add a couple of buttons and my user control. The buttons are just to run the code that sets the volume to a preset value.
The control displayed is the correct size (90,97). Everything works as expected. I can even grab the volume pointer and drag to some other setting.
Now I load up my application and go to the proper form. I place the user control, from the toolbox, onto my form. The size becomes 105, 119 (not the expected 90,97). I cannot change the size !! Notice that the aspect ratios are not the same.
I've tried setting it to Autosize=True and GrowandShrink. Nothing helps.
Where oh where did I go wrong?
GalenS
As a guess (I can't see any code for your control), try overriding the
DefaultSize property to return a size of (90, 97)
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
"Galen Somerville" <ga***@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... I have a user control with a Panel and five Labels. The end result is a circular volume control (no actual circle is shown). The Size is 90,97
I fire up VB2005, Select Windows Application, add a couple of buttons and my user control. The buttons are just to run the code that sets the volume to a preset value.
The control displayed is the correct size (90,97). Everything works as expected. I can even grab the volume pointer and drag to some other setting.
Now I load up my application and go to the proper form. I place the user control, from the toolbox, onto my form. The size becomes 105, 119 (not the expected 90,97). I cannot change the size !! Notice that the aspect ratios are not the same.
I've tried setting it to Autosize=True and GrowandShrink. Nothing helps.
Where oh where did I go wrong?
GalenS
I set up this Circular Volume control using the procedures in Help. I
believe it was setting up a Clock user control. That Clock control and the
way my control operates is purely coincidental.
I have put the user control on my web site and I would appreciate someone
looking at it to see why it doesn't resize correctly. http://home.surewest.net/galen/index.html under Downloads.
The control would typically be setup using the following:
CircVol1.Name = "A"
CircVol1.BackColor = Me.BackColor
CircVol1.VolVal = 128
Clicking any label sets the volume to that position.
Clicking anywhere in the Panel (Orange color) sets the volume to that
position because of Mouse events.
Dragging anywhere in Panel moves the volume accordingly.
Thanks
GalenS
"Radhakrishna Banavalikar"
<Ra*********************@discussions.microsoft.com > wrote in message
news:1E**********************************@microsof t.com... Hi Galen,
The default constructor of your control has the clue. Make sure you are putting in the right values in there.
Hope this helps. -- Radhakrishna Banavalikar Vasant-Vihar, Thane, INDIA.
"Galen Somerville" wrote:
I have a user control with a Panel and five Labels. The end result is a circular volume control (no actual circle is shown). The Size is 90,97
I fire up VB2005, Select Windows Application, add a couple of buttons and my user control. The buttons are just to run the code that sets the volume to a preset value.
The control displayed is the correct size (90,97). Everything works as expected. I can even grab the volume pointer and drag to some other setting.
Now I load up my application and go to the proper form. I place the user control, from the toolbox, onto my form. The size becomes 105, 119 (not the expected 90,97). I cannot change the size !! Notice that the aspect ratios are not the same.
I've tried setting it to Autosize=True and GrowandShrink. Nothing helps.
Where oh where did I go wrong?
GalenS
Yuan Ren
Did you get my direct Email on this subject?
For some reason I couldn't make a reply via the newsgroup.
GalenS
""Yuan Ren[MSFT]"" <v-****@online.microsoft.com> wrote in message
news:F9**************@TK2MSFTNGXA03.phx.gbl... Hi Galen,
Thanks for posting!
From your description, my understanding is that you drag the current control to a "proper" form, and then the size of the control will be resized. If I have misunderstood anything, please let me know.
I have downloaded your control and performed the test. Unfortunately, I can not repro the current issue. So, I think maybe there is something unclearly for the "proper" form which was mentioned before. In this scenario, I attach my project here. Please indicate whether my project is correct. If not, supplying a demo which can repro the current issue is appreciated.
The attachment which is zipped format is my project for the issue.
Thanks for your understanding!
Regards,
Yuan Ren [MSFT] Microsoft Online Support ================================================== ==== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were updated on February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ================================================== ==== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ====
Hi Galen,
Thanks for your reply!
My alias is v-****@online.microsoft.com (remove .online).
Thanks,
Yuan Ren [MSFT]
Microsoft Online Support This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Veeneman |
last post by:
Is there a simple way to pass drag-and-drop events to a child control in a
UserControl?
Here's an example: I have created a UserControl which contains a treeview
and some text boxes. I want to...
|
by: Raed Sawalha |
last post by:
Hi,
I have a strange problem with a usercontrol on a page. The usercontrol
dispalyes three categories (From a database) when the user clicks a category
they see all the products in a shop for...
|
by: Eric Maia |
last post by:
I have two UserControls I am using in a form. These are each also used
separately in two other forms. The structure is essentially this:
CourseUserControl.ascx - select or enter a course...
|
by: Sascha |
last post by:
Hi there,
I searched carefully through the web before finally deciding to post
this message, because I could not find a solution for my problem.
Hopefully someone will have a hint or explanation...
|
by: JohnR |
last post by:
In it's simplest form, assume that I have created a usercontrol,
WSToolBarButton that contains a button. I would like to eventually create
copies of WSToolBarButton dynamically at run time based...
|
by: Joe |
last post by:
Hello All:
Do I have to use the LoadControl method of the Page to load a UserControl?
I have a class which contains three methods (one public and two private).
The class acts as a control...
|
by: Marcelo Cabrera |
last post by:
Hi,
I have a user control that in turn creates a bunch of webcontrols
dynamically and handles the events these webcontrols raise. It used to work
fine on ASP .Net 1.1 but when compiled on 2.0 it...
|
by: Blue |
last post by:
We have a custom word processing type editor built with C# and .NET 2.0 and
we need to support typing in languages other than English. I want to be
able to use the Windows IME to enter in text...
|
by: MeowCow |
last post by:
I have created a UserControl that encapsulates a third party data grid.
My goal was to create my own DataSource and DataMember properties that
forward the binding to the third party grid, then use...
|
by: Benton |
last post by:
Hi there,
I have a UserControl with a couple of textboxes and a couple of buttons
("Save" and "Cancel"). The Click event for this buttons is in the
UserControl's codebehind of course, so here's...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
| |