Jump to content
Xtreme .Net Talk

MatP

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by MatP

  1. I got the same error, did you find any solution?
  2. Oops.. yes I forgot to put the type at the property.
  3. But if I consider the autoComplete options, once I wrote the second dot, the only thing that is accessible after PropClass2, it's GetType. So I guess that maybe I can access the properties of Class1, but it will be in conflict with Option Strict.
  4. It doesn't work either. Well, is it that bad if instead of declaring _Prop2 as Private, I declare it as Public and that way I can access its properties, but it won't be anymore a property of Class2, but an object that I can access outside of the class.
  5. Ok, I'm not enough familiar with class for doing what I'm looking for. I have two classes, keeping it simple, say Class1 and Class2. Now, Class2 contain a property in it that is class1 (Class2 is not a collection of class1) : Let's keep it simple, here is the Class1 code: Code: Public Class Class1 Private _Prop1 as String Public Property PropClass1() Get Return _Prop1 End Get Set(ByVal Value) _Prop1 = Value End Set End Class Now for the Class2 Code : Code: Public Class Class2 Private _Prop2 as Class1 ******* Public Property PropClass2() Get Return _Prop2 End Get Set(ByVal Value) _Prop2 = Value End Set End Class What do I need to change in class1 or class2 to make the PropClass1 accessible from a Class2 Object ? What I would like is to be able to do: Code: Dim myClass as Class2 Class2.PropClass2.PropClass1 = "I changed the Property of the PropClass1 of the _Prop2 Object in Class 2, Yeah" Actually, with the code above, Class2.PropClass2 is accessible, but not the ".PropClass1" part. What I need to do for now is: Code: Dim myClass1 as Class1 Dim myClass2 as Class2 myClass1.PropClass1 = "blabalblaa" myClass2.PropClass2 = myClass1 That way it works, but I do not want this. In other words, I would like PropClass2 of Class2 to have sub-properties that are the same as the class1 properties, since PropClass2 is a Class1. Hope it was understandable...
  6. I've created a new UserControl, in my project I added a new cursor file, and draw it myself. Now, I would like the cursor to be added in the DLL file when my project is compiled. And, I want to be able in my UserControl to refer to the cursor that I added in the project, not to the filepath of the cursor wich would mean I must distribute the DLL file AND the Cursor File... a kind of: myCursor = Cursors.LoadFromThisProject("myCursor.cur") and not myCursor = New Cursor(Application.StartupPath & "\myCursor.cur") because this one tells me, when I try to add my control to a form, that it couldn't find "C:\program files\Microsoft Visual Studio .Net 2003\common7\IDE\mycursor.cur" file. I tried adding an imageList then adding Cursor files, but it doesn't seem to work like the ICO file. I can't add .CUR file to the imagelist. Thanks for the help,
  7. hmm, I think I've found how to do it... Declare the event: Public Event SelectionChanged() and raise it in the richtextbox_selectionChanged Event: RaiseEvent SelectionChanged()
  8. Hi, I use a user defined control in my project (named CodeBox, it isn't me that create it, but I have the code). This control contain a Panel and a RichTextBox. I want to add an event to the CodeBox that would be accessible when added to my main form (accessible in the Method ComboBox in Vs.Net) The event would handles CodeBox.SelectionChanged, and happen when the event RichTextBox.SelectionChanged happen. I'm sure it isn't difficult, but I'm not too familiar with adding events. Thanks for the help
  9. Hi, I have a similar problem with the error "Input string was not in a correct format" Here's the part of my code I get stuck onto: dim tmpString as String dim myValue as Single tmpString = "0.0000" myValue = System.Single.Parse(tmpString) I tried also with Decimal and Double, and with System.Convert Method... I always get the same error. Thanks for the help,
  10. Thank you, it works. :)
  11. Hi, First of all, my problem is in VB.NET 2003. I'm trying to use Windows API SetParent to bring back a Process (it runs in a command prompt window) into my MDI form, but I can't figure out what I'm doing wrong. This is my code : Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Integer, ByVal hWndNewParent As Integer) As Integer Private Sub mnuCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCalculate.Click Dim myProcess As Process = New Process ' allow the process to raise events myProcess.EnableRaisingEvents = True ' add an Exited event handler AddHandler myProcess.Exited, AddressOf Me.ProcessExited myProcess.StartInfo.FileName = "C:\Eficos\Eficos.exe" myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal myProcess.StartInfo.UseShellExecute = True myProcess.StartInfo.CreateNoWindow = False myProcess.Start() SetParent(myProcess.Handle.ToInt32, Me.Handle.ToInt32) End Sub Thanks for the help, Mat
×
×
  • Create New...