|
Here is my code with your modification:
Option Explicit
Public Enum ControlOptions
Undefined = -1
Yes = 1
No = 0
End Enum
Private m_OptionPicked As ControlOptions
Private Sub UserControl_Initialize()
m_OptionPicked = ControlOptions.Undefined
End Sub
Private Sub optYes_Click()
m_OptionPicked = ControlOptions.Yes
End Sub
Private Sub optNo_Click()
m_OptionPicked = ControlOptions.No
End Sub
Public Property Get OptionPicked() As ControlOptions
OptionPicked = m_OptionPicked
End Property
Public Property Set OptionPicked(NewValue As ControlOptions)
m_OptionPicked = NewValue
End Property
And here is the error:
Compile error:
Definitions of property procedures for the same property are inconsistent, or property procedure has
an optional parameter, as ParamArray, or an invalid Set final parameter
|
|
|
|
|
Once again, my bad! Change the Set to Let:
Public Property Let OptionPicked(NewValue As ControlOptions)
m_OptionPicked = NewValue
End Property
The Set version is used for setting object references...
RageInTheMachine9532
|
|
|
|
|
It is not your bad it is my luck of knoledge that I can't figure out by myself.But I am learning
I was able to compile the ocx project and then use it in my main project, however I still can't see the value.
UserControl11.Value ????
|
|
|
|
|
Thats because it's called OptionPicked, not Value.
RageInTheMachine9532
|
|
|
|
|
I love you... Thanks for the help...
|
|
|
|
|
Hi there;
Can any one please help me on "how to Embed Progress Bars in a List Control".
Thanks;
|
|
|
|
|
Did you take a look at this example http://www.codeproject.com/listctrl/napster.asp?
|
|
|
|
|
I wish to do a UML and implementation mapping in different programming languages,such as visual basic and C# but i have no idea on where to start or where to find any info, googling wasn't much help either...
Any ideas anybody??
|
|
|
|
|
Do you want an environment that will generate source code from UML, or generate UML from source code?
|
|
|
|
|
Not really but what i need is to show the contrast between the different languages's UML diagram, like how it is implemented in UML for java, comapring to a visual basic UML diagram and so on..where can i find resources for this info?
|
|
|
|
|
Since UML is independent of implementation or deployment (it is, by definition, a modeling language) a diagram shouldn't differ for different language implementations; ideally, you are creating use-cases (language-independent), state diagrams (language-independent), packages and classes, with properties, events and methods, and building or modeling the problem domain and a solution set in an abstract manner, trying to define the best or best practicable architecture for a system.
True, if you are planning on implementing something in VB6 rather than VB.NET, C# or Java, you don't get to inherit or interface in a manner that is as elegant as the latter, so in that case, your classes could be a bit one-dimensional...
Then again, that's just my opinion, I could be wrong.
Anyone else out there care to discuss?
|
|
|
|
|
Hey,
I found an article on this site, about the Cabinet.dll, which enables compressing and decompressing (multiple) files. Now I want to use this DLL in an application, but haven't got an idea (VB.NET app) because I'm pretty new to VB.NET. Has anybody got an example or hint about using this DLL??
|| Kewl, it works ||
|
|
|
|
|
Respected sir/madam,
I would like to know how to store an image in the backend of an access using ADODB control with VB6 acting as a front end.
PRAVEED
|
|
|
|
|
1) u can either store the path of the images and retrieve them l8r from the vb app
2) u can use ole_objects
rIsHaBh
|
|
|
|
|
can u give me the illustration of how to use the Ole object to store the image
PRAVEED
|
|
|
|
|
Dear All,
this is a repost. I want to draw the still and running waveforms for a wavefile when its being played. Like its done in winamp. I have no idea how to go about it. I know the straucture of a wav file. can someone point me to a way how it can be done. This is important.
Thanx and regards
rIsHaBh
|
|
|
|
|
I have a form containing two list boxes and two buttons. The form loads with a list of 50 items on Listbox1 and Listbox2 is empty. When you select an item from ListBox1 and then press Button1, the selected item is moved to ListBox2. When you select an item from List Box2 and press button2, the item is returned to ListBox1. However I want to code my program such that when the user presses button2 without selecting an item from Listbox2 , there is no program error created, but the program simply tells the user to select an item. Currently my program halts and gives me the following message box: An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of valid values.
Help Me Folks
Problem 2
How can I make an item that has been return back to Listbox1 appear in a different color?
|
|
|
|
|
1. In your Button2 click handler, write something like this:
If ListBox2.SelectedItems.Count > 0 Then
'Code to move your items from ListBox2 to ListBox1
Else
MsgBox("Please select an item from ListBox2")
End If
2. I don't think the standard listbox supports having different fonts for its items. You may have to create your own user control for that. See example Color List Box[^].
|
|
|
|
|
My boss has a project he wants me to convert to .NET. However, he is really concerned about people having to download the Framework, when its around 20 meg to download. It occured to me that it might be possible to develop for the compact framework, and that this might be significantly smaller, as I would assume its for handhelds. So I'd like any advice anybody can offer on the issue. Can you tell me, is the compact f/w able to run on desktops, is it much smaller, is this all worth the hassle? Will Dallas ever return to TV, and will JR get shot again?
To make money on this project we have to sell thousands of units of the software, and I don't think we can do that other than by download, and who wants to download an extra 20MB ontop of the current 10MB of the application? Its a tough call.
Also, if anybody has any sample code for calling .NET functionality from VB6 I would be vey grateful, as this will help me greatly with the refactoring of future applications.
Many thanks.
Nursey
|
|
|
|
|
cnurse wrote:
It occured to me that it might be possible to develop for the compact framework, and that this might be significantly smaller, as I would assume its for handhelds. So I'd like any advice anybody can offer on the issue. Can you tell me, is the compact f/w able to run on desktops, is it much smaller, is this all worth the hassle?
Compact Framework is for devices running Windows CE (which means if you have a CE Desktop, then yes ). It is much smaller, but I'm assuming you're running NT, yes? If so, then it's the full framework or not at all.
cnurse wrote:
To make money on this project we have to sell thousands of units of the software, and I don't think we can do that other than by download, and who wants to download an extra 20MB ontop of the current 10MB of the application? Its a tough call.
Well, IE, sends as part of the headers the .NET version if it's installed - so if that header is there you don't need to provide links to the framework, only for users who don't have it. I think for the difference between 10 and 30 meg (as opposed to say, 2 meg and 30 meg), I wouldn't worry about it - only Broadband users are going to really try to pull that down anyway.
cnurse wrote:
Also, if anybody has any sample code for calling .NET functionality from VB6 I would be vey grateful, as this will help me greatly with the refactoring of future applications.
It's easier than that - .NET projects can be registered as COM objects that can be instantiated from VB (there's an option in the projects settings). There's an attribute you apply to the class you wish to expose, and so forth.
Ian Darling
"The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski
|
|
|
|
|
Ian,
Crystal clear as always. Thanks for the help mate.
The thing I have in the back of my mind is to run the application which could be developed in .NET, as a web app. There would be the minimum of downloads then, and of course nobody has to work hard to keep up to date with the latest version! 8-) I only have to rollout to one location too, sounds good huh!?
Regards,
PS:Like your little signature. UN*X can also be seen to be called XENIX, CTIX, AIX....hehe
Nursey
|
|
|
|
|
cnurse wrote:
The thing I have in the back of my mind is to run the application which could be developed in .NET, as a web app. There would be the minimum of downloads then, and of course nobody has to work hard to keep up to date with the latest version! 8-) I only have to rollout to one location too, sounds good huh!?
Web apps can be good. HREF-EXEs (also known as ClickOnce or No-Touch Deployment) look better
Unfortunately for you, it would seem to be best suited to corporate LANs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchno-touchdeploymentinnetframework.asp[^]
But in the longer term, this might be how a lot of software is deployed in future generally.
Ian Darling
"The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski
|
|
|
|
|
I'm having a problem that has me a bit confused. Maybe somebody out there can help me a bit.
I am making an adventure type fighting game and am using a listbox to display the combat results. My combat routine is contained within a function that calculates inititive, hitting, damage and whatnot. Right now all the info gets displayed all in one shot. What I want is to add a delay between the initiative and attacking messages.
What I've tried is a simple for next loop, but for some reason this has no effect. So I tried the 'System.Threading.Thread.Sleep(2000)'method and this seems to create a pause. However it seems to run at the beginning of the function even though I put it halfway into my function.
Why is the .sleep method getting run first? Hopefully this makes sense.
thanks.
|
|
|
|
|
This is happening because your thread gets puts to sleep before your window has a chance to update. What you need to do is put an 'Application.DoEvents()' just before the Sleep statement and that should take care of it.
RageInTheMachine9532
|
|
|
|
|
Awesome! Now it works the way I want it. Thanks.
|
|
|
|
|