Hi everybody!
I would like to develope an application, in this a should abel to create user defined controls. i should have some properties. when ever i drag and drop that control it should apper on the form and should work. i can abel to write code behind that(when i clicked that contro, some thing should be done).
for ex: now i am developing a electrical circuit GUI in v.b 6.0.my user defined control is generator( asume it is like a picture in a circuit). i shold abel to drag and drop many generators in my GUI.
How can i do it. what controls are to be used. if u provide sample code, i would be grateful to u.
regards:
raghunadhs
4 6004
There are much better tutorials for this on the web than we could come up with in a short time here.
Hm... we had a reference to one of them here recently. Hold on, I'll have a look...
dear killer,
Thanks for u r reply.... your link has helped me alot.
now i am able to create user controls, set some properties. but still i have a problem.
my user control is an image. now i would like to assign a propery to my control called "mycolor". my objective is when ever user assigns this property with a different color, then my user control's color should be changed. how it is possible? my idea is instead of making color to my control, why don't i replace the image with another image which has the required color. if it is fine how to replace that. kindly help me if u know it.
Thanku
raghunadhs
Here we go... http://pages.cpsc.ucalgary.ca/~saul/...al5/index.html
I've been playing with some usercontrols myself, lately. I wouldn't claim to be expert, but can probably help a little.
The way I understand it, you need to... - Create a private variable to hold the property value. For example...
Private m_MyColor As Long (or possibly As OLE_COLOR) - Optionally, create a constant to hold a default value. For example...
Private Const m_def_MyColor As Long = &H00FF00 ' (Green) - Add routines to retrieve and set the property...
Public Property Get MyColor() As OLE_COLOR
MyColor = m_MyColor
End Property Public Property Let MyColor(ByVal New_Value As OLE_COLOR)
m_MyColor = New_Value
PropertyChanged "MyColor" ' Note that property needs to be saved.
' I guess this might be where you need to do whatever
' it is you do with your color. Perhaps set UserControl.BackColor.
End Property - In the UserControl_ReadProperties routine, add your one...
m_MyColor = PropBag.ReadProperty("MyColor", m_def_MyColor) - In the UserControl_WriteProperties routine, add your one...
Call PropBag.WriteProperty("MyColor", m_MyColor, m_def_MyColor)
Have a play with that, let us know how it goes. It may take some fiddling to get it right (I know it does for me.)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bil Muh |
last post by:
Esteemede Developers,
I would like to Thank All of You in advance for your sincere guidances.
I am developing a software using Visual C++ .NET Standard Edition with
Windows Form (.NET)...
|
by: Kiyomi |
last post by:
Hello,
I create a Table1 dynamically at run time, and at the same time, I would
like to create LinkButton controls, also dynamically, and insert them into
each line in my Table1. I would...
|
by: Patrick |
last post by:
I'm working on a contact management application, and need a hand with one
aspect...
Here's what I want to create:
------------------------------------
A form split into two parts. There is a...
|
by: macca |
last post by:
Hi,
I am writing a GUI application. It will have a number of user defined
controls( I plan to use/create a user defined control that will output alarm
states that the user can also select and...
|
by: Frank Wilson |
last post by:
Tom,
It sounds to me like ASP, not ASP.NET is handling the
request for WebForm1.aspx. This is most likely an IIS
config issue that may have been caused by order of
installation or...
|
by: Crosta |
last post by:
Hi everyone,
As subject suggests I'm wondering how is it possible to do so in ASP.NET.
The fact is that I'd like to "atomize" an entire series of custom user
controls (.ascx and .ascx.vb) to...
|
by: Brian |
last post by:
Hi, All,
I want to create a single user control (component) with
multi-controls. for example, I want to use one button
control and 2 listBox controls to build one single user
control. so, user...
|
by: MaryamSh |
last post by:
Hi,
I am creating a Dynamic Search in my application.
I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove)
By pressing Add button...
|
by: MaryamSh |
last post by:
Create Dynamic Dropdownlist Controls and related event
--------------------------------------------------------------------------------
Hi,
I am creating a Dynamic Search in my application.
I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: 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: 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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |