473,396 Members | 1,766 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,396 software developers and data experts.

Invalid Use Of Property in User Control

lotus18
866 512MB
Hello World!

This is my very first time to create my own user control LOL. Can anyone improve this for me? And also I'm having trouble with LoadPicture function : ) tHANkS

Rey Sean
Attached Files
File Type: zip MyControl.zip (84.4 KB, 189 views)
Jan 16 '08 #1
12 1812
kadghar
1,295 Expert 1GB
Hello World!

This is my very first time to create my own user control LOL. Can anyone improve this for me? And also I'm having trouble with LoadPicture function : ) tHANkS

Rey Sean
what version of VB is the file for?
why dont you debug it and post the code that its giving you trouble?, i think that'll be easier and faster, and will allow people that doesnt have the version needed to help you.

(that was just a suggestion)
Jan 16 '08 #2
Killer42
8,435 Expert 8TB
Subscribing .
Jan 17 '08 #3
lotus18
866 512MB
Subscribing .
Hey Killer, have any idea?
Jan 17 '08 #4
QVeen72
1,445 Expert 1GB
Hi Lotus,

When you are using a Picture, You have to use all the 3 Properties :
Let, Get And Set
Add this property to your user Control :and your Picture problem will be solved:

Expand|Select|Wrap|Line Numbers
  1. Public Property Let Picture(ByVal New_Picture As StdPicture)
  2.     Set imgNormal.Picture = New_Picture
  3.     PropertyChanged "Picture"
  4. End Property
  5.  
Regards
Veena
Jan 17 '08 #5
lotus18
866 512MB
Hi Lotus,

When you are using a Picture, You have to use all the 3 Properties :
Let, Get And Set
Add this property to your user Control :and your Picture problem will be solved:

Expand|Select|Wrap|Line Numbers
  1. Public Property Let Picture(ByVal New_Picture As StdPicture)
  2.     Set imgNormal.Picture = New_Picture
  3.     PropertyChanged "Picture"
  4. End Property
  5.  
Regards
Veena
Hi Veena

Thanks for responding. I'll try that later. : )

Rey Sean
Jan 17 '08 #6
lotus18
866 512MB
Hi Veena

Thanks for responding. I'll try that later. : )

Rey Sean
Thanks Veena. It worked!
Jan 19 '08 #7
Killer42
8,435 Expert 8TB
Glad to see you got it sorted. Thanks for that, Veena.

Sorry lotus18, I subscribed so I could get back to this thread, but haven't had the time.
Jan 20 '08 #8
lotus18
866 512MB
Glad to see you got it sorted. Thanks for that, Veena.

Sorry lotus18, I subscribed so I could get back to this thread, but haven't had the time.
Hey Killer42 any suggestions for my control? I know it looks so simple, would you like to improve this one for me? LOL ^ ^

Rey Sean
Jan 21 '08 #9
Killer42
8,435 Expert 8TB
Hey Killer42 any suggestions for my control? I know it looks so simple, would you like to improve this one for me? LOL ^ ^
Just leaving work now. I'll try to have a look at it tonight at home.

I've only created a couple of fairly simple user controls, myself. Mostly just to try it out. I'll try to track down a funny one and post it - it's basically just a picturebox with coloured dots bouncing around in it.
Jan 21 '08 #10
lotus18
866 512MB
Just leaving work now. I'll try to have a look at it tonight at home.

I've only created a couple of fairly simple user controls, myself. Mostly just to try it out. I'll try to track down a funny one and post it - it's basically just a picturebox with coloured dots bouncing around in it.
I'll watch for it : )

Rey Sean
Jan 21 '08 #11
Killer42
8,435 Expert 8TB
I'll watch for it : )
Sorry, got pretty busy. Hopefully tonight.
Jan 21 '08 #12
Killer42
8,435 Expert 8TB
I did find this cute little one. Just add the user control file to your project, place one on a new form, and add this code in the form...
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Resize()
  2.   Tailer1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
  3. End Sub
This is not really necessary, of course - it's just to keep it the same size as the form.

I couldn't post the source of the user control, TheScripts kept spitting the dummy for some reason. Too long, I guess, even though I chopped it into chunks. So I'll put it in a zip file.

Tip: Check out the Style (and possibly TailLength) property. It looks as though only styles "Dot trail", "Bubbles" and "Smoke" are working.
Attached Files
File Type: zip Tailer - source.zip (9.0 KB, 70 views)
Jan 22 '08 #13

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

Similar topics

6
by: TS | last post by:
Hi, i have a problem validating xml against schema. I used http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx validator and it says it is fine. Can you tell me why this doesn't work? ...
1
by: Steven.Xu | last post by:
Hi, everyone. I am writting an user control. There has some properties on it. At the design time, the properties will disply on the property windows and user could change it's value after selected...
5
by: Mark Ingram | last post by:
Hi, ive written a custom control and i would like to display the "invalid property value" dialog box for certain properties on my form if the user enters a value outside the allowed range (in the...
1
by: Niclas | last post by:
Hi, How do I indicate what field fails a validation, usually you see a red star next to the faild field on a form. Is this built in functionality in the valdaition controls or shall I code this...
1
by: Patrick.O.Ige | last post by:
Hi guys, I just moved a project from my pc to a server production (to an ISP). on my pc it all works fine with no errors. After fireing up the first page "default.aspx" i get the error...
5
by: jason.neo | last post by:
Hi all experts, I am going nuts with this Invalid postback or callback argument thingy with .Net 2.0 I am building a file attachment module which relays on a Datatable stored in session (yeah...
1
by: shapper | last post by:
Hello, I am creating a user control where an Asp.Net control is used. It can be either a button, an image button or a label. I am trying to "expose" the Asp.Net control properties and events...
2
by: Benton | last post by:
Hi there, I'm creating a custom server control, inheriting from TextBox. It has this AsDateTime property that returns the textbox contents converted to the nullable DateTime data type, as...
1
by: eBob.com | last post by:
I have some code which is trying to determine where text will wrap in a custom text box (which Inherits from Control). It determines the number of characters which will fit in the first line, but...
5
by: emsik1001 | last post by:
Hi I have a few combo boxes where the match is required. When I select a value and then delete it and go to another control then I get very user unfriendly message "invalid property value". ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
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...
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...
0
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...
0
agi2029
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,...

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.