Click here to Skip to main content
15,914,447 members
Home / Discussions / C#
   

C#

 
GeneralRe: thread and progress bar Pin
Popoxinhxan7-Oct-04 15:34
Popoxinhxan7-Oct-04 15:34 
GeneralRe: thread and progress bar Pin
Dave Kreskowiak8-Oct-04 4:39
mveDave Kreskowiak8-Oct-04 4:39 
GeneralRe: thread and progress bar Pin
sreejith ss nair7-Oct-04 1:29
sreejith ss nair7-Oct-04 1:29 
QuestionHow to conjoin C# code with VC++6.0 code? Pin
momer6-Oct-04 19:42
momer6-Oct-04 19:42 
AnswerRe: How to conjoin C# code with VC++6.0 code? Pin
Heath Stewart6-Oct-04 19:50
protectorHeath Stewart6-Oct-04 19:50 
GeneralThanks! Pin
momer7-Oct-04 15:31
momer7-Oct-04 15:31 
Questionhow to stream video files via web application(asp.net) Pin
walpork6-Oct-04 18:57
walpork6-Oct-04 18:57 
AnswerRe: how to stream video files via web application(asp.net) Pin
Heath Stewart6-Oct-04 19:48
protectorHeath Stewart6-Oct-04 19:48 
Generalmy drawing disappear Pin
xiaowenjie6-Oct-04 17:14
xiaowenjie6-Oct-04 17:14 
GeneralRe: my drawing disappear Pin
Heath Stewart6-Oct-04 19:47
protectorHeath Stewart6-Oct-04 19:47 
GeneralRe: my drawing disappear Pin
xiaowenjie7-Oct-04 3:47
xiaowenjie7-Oct-04 3:47 
GeneralRe: my drawing disappear Pin
Heath Stewart7-Oct-04 7:28
protectorHeath Stewart7-Oct-04 7:28 
GeneralRe: my drawing disappear Pin
xiaowenjie20-Oct-04 20:14
xiaowenjie20-Oct-04 20:14 
GeneralRe: my drawing disappear Pin
Heath Stewart20-Oct-04 21:46
protectorHeath Stewart20-Oct-04 21:46 
GeneralAccessing an object created by another class Pin
NietzscheDisciple6-Oct-04 15:59
NietzscheDisciple6-Oct-04 15:59 
GeneralRe: Accessing an object created by another class Pin
Christian Graus6-Oct-04 16:27
protectorChristian Graus6-Oct-04 16:27 
GeneralRe: Accessing an object created by another class Pin
NietzscheDisciple6-Oct-04 17:21
NietzscheDisciple6-Oct-04 17:21 
GeneralRe: Accessing an object created by another class Pin
Tom Clement6-Oct-04 17:59
professionalTom Clement6-Oct-04 17:59 
Maybe I'm missing something here, but it seems that you're trying to obtain an event from your user control that contains the trackbar. I don't really know why you need the separate UserControl, since you could just place the trackbar on the form, but if you have to do that, you'll need to declare a public event on the UserControl, then create an event handler in your form. In the user control, you would handle the value changed event (whatever that is) from the track bar, and raise the event.

The .NET documentation indicates a pretty straightforward design pattern for this. Assuming your event is ValueChanged you typically declare a method:

private void OnValueChanged()
{
if( ValueChanged != null ) ValueChanged(this, EventArgs.Empty);
}

In the event handler for the trackbar event, call this method.

You'll also need to expose a public property that tells you where the progress bar is, so that in your form, when you respond to the event you can read the value and pass it to your SecBuff.

All that said, really, it would be much easier just to site the track bar on the form and respond to its value changed event by passing the current track bar position into the SecBuff.


Another approach you could take would be to pass the SecBuff object into your user control as a property, then respond to the value changed event on the track bar by setting the corresponding value on the SecBuff object.

Tom Clement
Apptero, Inc.
www.apptero.com

articles[^]
GeneralRe: Accessing an object created by another class Pin
NietzscheDisciple6-Oct-04 18:14
NietzscheDisciple6-Oct-04 18:14 
GeneralRe: Accessing an object created by another class Pin
NietzscheDisciple6-Oct-04 18:42
NietzscheDisciple6-Oct-04 18:42 
GeneralRe: Accessing an object created by another class Pin
Tom Clement6-Oct-04 19:07
professionalTom Clement6-Oct-04 19:07 
GeneralControls related question Pin
NietzscheDisciple6-Oct-04 15:08
NietzscheDisciple6-Oct-04 15:08 
GeneralRe: Controls related question Pin
Christian Wikander6-Oct-04 21:12
Christian Wikander6-Oct-04 21:12 
GeneralPasswordAge from LDAP Pin
Andy *M*6-Oct-04 12:11
Andy *M*6-Oct-04 12:11 
GeneralRe: PasswordAge from LDAP Pin
Heath Stewart6-Oct-04 19:44
protectorHeath Stewart6-Oct-04 19:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.