473,804 Members | 3,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

crazy UserControl

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
Mar 4 '06 #1
5 1463
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

Mar 4 '06 #2
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***@communit y.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP11.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

Mar 4 '06 #3
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.BackCo lor = 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

"Radhakrish na Banavalikar"
<Ra************ *********@discu ssions.microsof t.com> wrote in message
news:1E******** *************** ***********@mic rosoft.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

Mar 4 '06 #4
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.mic rosoft.com> wrote in message
news:F9******** ******@TK2MSFTN GXA03.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.
=============== =============== =============== =========

Mar 10 '06 #5
Hi Galen,

Thanks for your reply!

My alias is v-****@online.mic rosoft.com (remove .online).

Thanks,

Yuan Ren [MSFT]
Microsoft Online Support

Mar 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7126
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 be able to drag-and-drop to the treeview from outside the UserControl. Now, when I drag over the treeview in the UserControl, the UserControl gets the drag-and-drop events, but the treeview doesn't. Is there a simple way to pass drag-and-drop...
8
1961
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 that category, the results are paged 10 to a page and the user can page them. As this "Category" usercontrol hardly ever changes I wanted to setup up caching for it. However I realised that when the user clicks a ctageory it is selected and...
2
2248
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 SessionUserControl.ascx - select or enter a course session CourseDetails.aspx - a form which contains just CourseUserControl CourseSessionDetails.aspx - a form which contains just SessionUserControl TrainingRequestDetails.aspx - a form which includes...
2
4635
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 for me! I apologize for the length of this posting, but I wanted to make sure that I get an answer other than "Hey man, just use LoadControl!", because this is not what I want. The Task: Isolate a collection of web forms which are created as
41
4335
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 on some initialization information obtained elsewhere. Basically, I'm going to create my own dynamic toolbar where the toolbarbuttons can change. I'm not using the VB toolbar because of limitations in changing things like backcolor (I can't get...
12
2216
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 server. It "serves" back the required control (either WebControl or UserControl) based on the contents of an xml file. The code in the webform places each control in a TableCell. My problem is that the control server works as far as returning the...
9
14469
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 does not. The problem is that the webcontrols get created on the OnLoad event of the usercontrol and the event handlers are assigned at the same time. I have to click twice on the controls for the events to be raised, the first time nothing...
5
19710
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 similar to how it works in a text box. For example, if I put focus on a TextBox and then switch my language on the language bar to Japanese or Chinese, several buttons appear on the language bar including Input Mode, Input Style, Conversion Mode,...
6
12144
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 binding like normal. The problem I am running into is that my UserControl ends up with a different BindingContext then the ParentForm it is contained in and thus all other controls on the parent form. (I want various controls on the form to...
10
2432
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 my question. Once the UserControl is dropped onto the container page, how can I perform some action on the codebehind of the container page from the codebehind of the UserControl? For instance, suppose that the UserControl is dropped inside one...
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.