Jump to content
Xtreme .Net Talk

kingelessar

Avatar/Signature
  • Posts

    26
  • Joined

  • Last visited

Everything posted by kingelessar

  1. After some googling I found out that it is probably impossible what I am trying to do. Thanks for your help.
  2. Thanks for your replies. I don't like the POST idea either, because when users would start entering their a custom url in their browser the session information would be lost. About the MAC address: when someone has a LAN, wouldn't I get the MAC address of the router? And how can I retrieve the MAC address? As far as I know ASP.NET doesn't provide any access to the actual TCP/IP package. The thing I am trying to do is track session information, and make this work in even a textbrowser, and allow the users to enter an url without the session info being lost. Dennis
  3. Hey, I'm trying to create my own state/session management system because of the following reason: I want it to be cookieless and completely invisible to the end user (so no fiddling with the url), so the ASP.NET session thingy isn't good enough for me I could track sessions trough the client's IP, or a combination of the IP and UserAgent, but unfortunately there are a lot of people that have a home network with two computers with almost the same configuration. Does anyone have another idea?
  4. I tried that. The problem is that the javascript value is an IXMLDOMDocument object, and I can't assign that to a input field. Dennis
  5. Hey, I want to pass an IXMLDOMDocument object in javascript to serverside ASP.NET, and back. Does anyone know how I do this? Dennis
  6. Ok michael_hk, I didn't understand completely what you wanted to do. About the temporary file, I don't think it is possible to pass the html directly to the webcontrol. Dennis ;)
  7. I guess you have put all the projects into a so-called solution. You can add a reference in a project to another project in the same solution by right-clicking the project's references dir, click Add reference, and on the Project tab choose the project reference you want to add. Dennis
  8. One thing you could do is filter out the html tags, so you are left with the text you want. You can do that by using the following regular expression: using System.Text.RegularExpressions; strHtml = "<b>some text</b>"; strHtml = Regex.Replace(strHtml,"<[^<>]+>",""); What the regular expression does, it searches for a <, then a random number of characters not < or > and then a >, so that represents a tag. It replaces the found string with "", so nothing, and filters out the html tags. I hope you understand me. Dennis ;)
  9. Hey, cool it worked! I'm not sure what you mean with the ID of the node: do you mean the Index or the Text? To show any of these data in the menu, i would add an menu item once. Then before the menu is shown, it sets the text of that menu item to the ID of the node. menuItem3.Text = clickedNode.Index.ToString();or menuItem3.Text = clickedNode.Text; Dennis ;)
  10. Hey, The problem is that the value of the variable n is lost after each page view. When I open the page the bush picture is shown because it is defined in the html. When I click the next button, the code converts the value of n to a string. But the value of n will always be 0 because it is forgotten after a page view. Then twice, the code adds 1 to the value of n. The result of that is 0 + 1 + 1 = 2, so the code always shows picture number 2. You follow me? ;) What you can do to solve the problem is to save the number in the label instead of the variable n. Hope that helps. Dennis
  11. The way the website describes checks the user's input when the control leaves focus, and then gives an error message when the value is not a numeric value. When you want to limit the keys that can be used in a textbox (i.e. when the user presses the 'A' button nothing happens) you can use the TextBox's KeyPress event. Using the KeyChar property of the event's arguments you can check what key is pressed. When you don't want to block that key, you set the Handled property of the event's arguments to true to prevent the textbox handling the key. Note: Make sure you also allow keys like Backspace and Delete to be pressed, you can find their key codes by creating a new textbox, and in its KeyPress event you show the KeyChar in a MessageBox. That should work. Regards, Dennis ;)
  12. The workingarea in Windows is the part of the screen that is not occupied by the taskbar (the bar that is usually at the bottom of your screen with the start button). I want to create a sidebar that is always visible, and kinda eats off the workingarea. Dennis
  13. Hey microkar, I tried and found it is very easy to do. I presume you know how to create a new ContextMenu. You can show a popup menu for a treenode as follows: subscribe to your TreeView's MouseDown event; in that event you first check whether the right mouse button was used; retrieve the node at the mouse location using the TreeView's GetNodeAt method; check if that node is a Null-reference, if so then it is no node that is clicked; show the contextmenu at the right location. The code i wrote for the event is as follows: private void treeView1_MouseUp(object sender,MouseEventArgs e) { if ( e.Button == MouseButtons.Right ) { TreeNode clickedNode = treeView1.GetNodeAt(e.X,e.Y); if ( clickedNode != null ) { treeMenu.Show(treeView1,new Point(e.X,e.Y)); } } } That should work OK! Tell me if you can get it working. That code shows the popup menu at the point where the user clicked. If you want to show the popup menu nicely under the node, you can change new Point(e.X,e.Y)into new Point(clickedNode.Bounds.Left,clickedNode.Bounds.Bottom) Dennis ;)
  14. Hey, I was wondering if it is possible to change Windows' workingarea, i.e. the area of the screen that is not occupied by the taskbar. I am creating a program that docks at any edge of the screen, and I want to prevent windows from maximizing over or under the program. Anyone any ideas? Thanks in advance, Dennis ;)
  15. OK, sorry for me being a bit hasty. I found a solution :) Take a look at this great article at: http://www.codeproject.com/csharp/DzCollectionEditor.asp Especially the CollectionEditor Howto. Dennis :D
  16. I don't understand you. Maybe you don't understand me... I'll explain more thorough. This are my classes: class MyControl { public MyClassCollection Items; } class MyClass { public MyClassCollection Items; } class MyClassCollection : CollectionBase { public MyClass this[int index] { blabla } } When I see the MyControl control in the vs.net designer, and I try to edit the member Items, i get a CollectionEditor. I can add MyClass instances and everything is alright. But when I try to edit the collection of such a MyClass instance, the designer gives an error about modal forms. I know that is about that no two CollectionEditors can be opened at the same time. So how can I create a "nested" CollectionEditor? Dennis
  17. I'm not that experienced, but I don't understand why your system tray icon doesn't disappear when your form closes. This code: Application.Exit(); this.notifyIcon.Visible=false; this.notifyIcon.Icon = null; this.notifyIcon.Dispose(); doesn't make any sense I think, because first you exit the application and then you try to hide the icon... ??? When my system tray icon doesn't go away, i always place this.notifyIcon.Visible = false; this.notifyIcon.Dispose(); in the Closing event of the form. Dennis
  18. Hello, Does anyone know how I can use the CollectionEditor in a nested way? E.g. I have a MyClassCollection inherited from CollectionBase that is a collection of MyClass items. A MyClass instance has again a MyClassCollection, etc. Hope you understand me... :-\ Dennis ;)
  19. Thanx man it worked!
  20. I just download the DXSDK and soon found out it is difficult indeed. I managed to create a cool game menu with DirectDraw though with the help of http://www.gamedev.net/ Dennis
  21. Thanx alot. I was actually searching for such an article. I'll read it and try it right away! Cheers, Dennis :D
  22. Hey guys, I'm trying to create my own ImageList, mainly to be able to use alpha png. (btw it doesn't have to be compatible with the standard windows controls, its for my own) In there will be a collection of images, of course. So I made an ImageCollection class. From code, it all works fine. But I want to make it possible to add images in the vs.net design thingy. The property shows up in the property window, and i can click the "..." button to bring up the "image collection editor". Now, the problem is that when i click add, i get the error "Constructor on type System.Drawing.Image not found.". I know an Image object has no constructor, but why doesn't the vs.net designer detect that it should bring up a 'choose image' dialog? How can I fix this? Some kind of Editor, Designer or TypeConverter? Dennis
  23. ehm for Xml serialization I never use the serializable attribute and everything works fine with simple classes, as long as i have an empty constructor Thanx for ur responses. Dennis
  24. I don't know the exact uri i used because its a long long time ago ;) . Here is a good website: http://www.developerfusion.com/show/3827/ Dennis
  25. I solved it! I searched on google and found an example of Xml Serialization. I found out that i had to add an empty constructor to the classes i wanted to serialize. Thanx :rolleyes:
×
×
  • Create New...