Jump to content
Xtreme .Net Talk

RonQ

Avatar/Signature
  • Posts

    28
  • Joined

  • Last visited

Everything posted by RonQ

  1. RonQ

    OOP question

    Thanks you very much for your help, it was easyer than I thought, with the rejilla array I can generate one event for all the cuadraditos and cast the sender to get it state and the adjacent states... thans again.. for(int i=0;i<ms.Y;i++){ for(int j=0;j<ms.X;j++){ rejilla[i,j]=new Cuadradito(i,j,ms.Tipo(i,j)); this.Controls.Add(rejilla[i,j]); rejilla[i,j].MouseUp +=new MouseEventHandler(rejilla_MouseUp); } } Bye, RonQ.
  2. RonQ

    OOP question

    Hello, I'm learning and I want to know the best way of doing this. I have a NxM square of inherited pictureboxes dinamically created: //in the form public frmMain(){ for(int i=0;i<N;i++){ for(int j=0;j<M;j++){ this.Controls.Add(new Cuadradito(i,j,number)); } } } //the point class public class Cuadradito:PictureBox{ public Cuadradito(int xCoord, int yCoord, int num){ state=num; } private void Cuadradito_MouseDown(object sender, MouseEventArgs e) { state=some_value; } } The number passed is the state of this point. In the MouseDown event I change the state of this point and I need to change the states of the adjacent points. Mi question is how can I do this. I have the N and M values of the points I need to change the state but the MouseDown event occurs only in the instance of "Cuadradito" clicked, so how do I tell the rest of the points to change states. I mean, there is no comunication between instances of this class. I can add an event, but I don't know if this is the best way to do it (an event that fires after the MouseDown, like ChangeState). Thanks, hope you can help. RonQ.
  3. Hello, I've made a control (two textboxes in a table), now I want to inherit that control and create two new controls adding to those textboxes a listbox in one case and a checkbox in another, for example. But when I inherit the control I can't see the original design, I can access the controls in the base class but only by code, I can't see them, and if I compile and show the child control in a page, the base control doesn't apear, I get an empty page (since the child control is empty). What I'm doing wrong? Thanks, Ronq.
  4. I found one, is just what I need, is not as great as the dotnetcharting, but is really good and complete... and completely free!! http://www.carlosag.net/Tools/WebChart/Default.aspx bye, Ronq.
  5. Thanks for the link, but I need one that is completely free, the free version of this component adds an logo and a link to the page. I don't need one as good as this, just siple 2d columns and pie charts. If anyone knows... Thanks, Ronq.
  6. Hello, is there any free charting class or component. I need to make some financial charts, and doing it by hand with GDI+ could be too much work, maybe somebody has done this before and can help me. There are a few commercial components but I'm looking for a free one. Thank you. Ronq.
  7. Is doing that (using the API) unmanaged code?
  8. Hello, Can anyone explain what is p/invoke? or give a link or anything.... Thank you, Ronq.
  9. Thank you very much... that code is great, that's exactly what i needed.... two months ago... :p just kiding. I can still use it! Thanks again.. Bye, Ronq.
  10. thanks for your answer, but... I can't find Interop.Scripting.dll, is a file or a namespace, can you tell me the full namespace/file name?? Bye, Ronq.
  11. Did you duplicated also the "Undo" function?? can you send me that code? Bye, Ronq.
  12. Hello, simple question... How do I get the free space of a drive, example "c:" 2GB, "d:" 130 Mb... etc. Thanks, Ronq.
  13. I copyed the your code and it worked great, I think your problem is that you have to create a C# Console Aplication, that's what I did, or you can change the project type in the solution explorer in the project properties. I also made a new file example.cs with that code and then I copiled it with the command line "csc example.cs" and it worked great too. Try some of this and tell me.. Bye, Ronq.
  14. I have this class that inherits an ArrayList, and I want to add a Filter Function, I want the method to return the same object (the inherited arraylist) with only some of the items depending on the value of property in the contained object that will be passed as a parameter, and I want the returned items to be the actual items of the arraylist, not a copy of them. How could this be implemented? It's something like the Filter function in the datasource object. This is my class: Public Class cLineaArrayList Inherits ArrayList Default Public Shadows Property item(ByVal Index As Integer) As cLinea Get Return DirectCast(MyBase.Item(Index), cLinea) End Get Set(ByVal Value As cLinea) MyBase.Item(Index) = Value End Set End Property Public Shadows Sub Add(ByVal Value As cLinea) MyBase.Add(Value) End Sub 'This is the function I want to create, but I don't know how to do.. Public Function Filter(FilterIndex As Integer) as cLineaArrayList 'I should have to scan all items and copy them, how? End Function End Class Thanks, Ronq.
  15. About the functionality of the program it will have to be hard coded, the servers doesn't give you any functionality, they only send and receive messages (network TCP/IP packets), each one in their own protocol, you will have to create the different functions like "sendIM" for each server, the same with login, chats, etc... It's an arduous task to do what you want.
  16. This could help you: http://searchvb.techtarget.com/vsnetATEAnswers/0,293820,sid8_gci831710_tax293474,00.html and it has a link to MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchCreateYourOwnDynamicPropertiesPreservePropertySettingsInVisualBasicNET.asp This, they say, "is the proper way to save configuration settings in the .NET environment". Bye, Ronq.
  17. Hello, Is there a way to inherit the textbox default context menu? I want to add a few items, like char count, etc. Thanks, Ronq.
  18. Thank you very much, I need more practice with OOP and overloading, I didn't even think of that. I'm a VB programmer and every new thing I learn about .NET make me want never go back... :D Bye, Ronq.
  19. Is there a good reason to change from XP to LongHorn, I know there was a big change since win 98 to XP but now? I don't think it worth it, they keep doing new operating systems instead of improving the ones thy have because of the business and not the quality. What do you think? Bye, Ronq.
  20. Hello, Happy new year! I need help with collections. I have an array of a class (all the same type of course), but I think an arraylist would better fit my needs, the problem is that the arraylist is a collection of objects and I want it to be a collection of the type of my class cList. because when I want to call a method or a property in the class I have to cast everytime to the type I want, Is there a way to cast the arraylist to know that the type will be always the same, something like (im dreaming...): Dim X as Arraylist of cList :D Is there a way to do it, or another type of colection that can help?? 'With arrays Dim x() as cList redim x(0) x(0)=new clist x(0).text="Hello" 'With arraylist Dim x as new arraylist x.add(new clist) DirectCast(x.item(0),clist).text="Hello" 'I don't want to do the casting every time i use x. Thanks, Ronq.
  21. After not getting an answer I started reading the documentation (should have done that from the begining, although I would have liked some help), and I found the way to do it. Here it is: 'myDataSetSchema is the XML schema describing the data structure as 'a database is a DataSet XML schema. 'Declare a table object for the Table "TableName" Dim myTable As myDataSetSchema.TableNameTable = ds.TableName 'Declare a DataRow object to fill the data and then insert 'to the database Dim myRow As DataRow For I=0 To 10 'Instanciate a new row for the Table "TableName" myRow = myTable.NewRow() 'Fill the row with Data myRow("Filename") = "Pepe" myRow("Custom1") = "X" myRow("FieldCount") = 3 'Add the row to the table myTable.Rows.Add(myRow) Next I Bye, Hope that helps anyone like me.. hehe Ronq.
  22. Hello, I have a ADO.NET DataSet filled with a 3 or 4 tables, I send this dataset with a webservice to other computer that receives the dataset but doesn't have a database, only can work with the dataset. What I want to know is how can I make a JOIN query to the dataset, I can't use the SqlDataAdapter because I dont have a connection to any database. I don't think the filter method of the dataview let me do the JOIN, but maybe there is another way to do it... Any help with this would be great Thanks, Ronq.
  23. Hello... how are you?! I have some data from a structure array: Public Structure AddressFileHeader Dim VersionTag() As Byte Dim Filename As String Dim Custom1 As String Dim Custom2 As String Dim NextFree As Integer Dim Categories() As SomeDataType Dim FieldCount As Short Dim NumEntries As Integer End Structure I've made a DataSet XML schema of this like it is a table from a database, now I want to add the data in the structure to the dataset like table rows, I know it can be done, but i don't know how to. Do I have to convert this to to XML and then add the xml to the dataset or there is a easyer way to do it?? Thanks, Ronq.
  24. RonQ

    Convert string

    It was easyer than i tought i read the entire encoding namespace help to know that the Default encoding would work fine. 'The string is "aécX" 'With this Temp=Encoding.Default.GetChars(r.ReadBytes(3)) 'I get Temp = "aéc" Thanks, to HJB417 for your help! bye, Ronq.
  25. RonQ

    Convert string

    It isn't an NFO file is a dat file from a palm program, it isn't unicode. I think it is this encoding "Windows operating system (windows-1252)", im going to try this. Any more help is welcome. Bye, Ronq.
×
×
  • Create New...