Jump to content
Xtreme .Net Talk

mark007

Avatar/Signature
  • Posts

    185
  • Joined

  • Last visited

Everything posted by mark007

  1. So your reasoning is it's slow? What sort of proportion compared to using c# pointers? Any other issues? Admittedly, this may not matter for this problem particularly but would be useful for others searching on the subject, and myself ;)
  2. Not wanting to antagonise in any way, just would like to know... Which will reveal?
  3. What is type for DataSource and what is the type of Spreadsheet1? You need to make sure that they are compatible.
  4. Just a follow up - I've still not worked out if this is possible but I'm thinking it's probably not - I can't think of a way of doing it really unless I could get the HTML out of the evaluated template.. (Some may have noticed the typo in the above - it should clearly say: So template 2 is used multiple times....) In the end I built my own template control by parsing my own templates where all the fields looked like: [DataItem] Works fine as I'm pullign the templates from a DB but obviously I couldn't use it as with a standard tmeplated control by typing the HTML into the page. :)
  5. In fact thinking about it more if you gave the hanlde and the window does still exists but it's hiden you could use SetWindowLong to display it again. Would probably be safer to send a tray message though as then any intialistaion type stuff that might be doen when it is reshown from the tray would be done. :)
  6. It depends on how you can retsore it manually from the system tray. If you have to go via a right-click menu for exmaple then maybe not but if it is a double click or single click then you could send a Tray events message using the Sendmessage API. To get the handle of the other app you need to use the FindWindow API. Not sure off the top of my head whather the window still exists when the item is in the systray - may well be application specific. I suggest using something like Spy++ or Winspector Spy to check for it when it is minimised to the taskbar. Check out: http://www.mentalis.org/index2.shtml for more info on the API's involved. Hope that helps. :)
  7. Which will reveal?
  8. I'm an Actuary working at a pensions consultantancy. Lasy year I started working part-time and set up my own IT business which I now do for half my week. I use VB(A), Vb.Net, SQL, Java, PHP, ASP/.net. I think having both a regular income job and being self-employed in my hobby I get the best of both worlds! I spend far too much time on forums like this though and used to be mainly found at the sister forum xtreme vb Talk. :)
  9. Not quite true. You can use the system.runtime.interopservices marshall class. For example this code takes apart an integer into bytes and puts it back together again. You can of course do similar with a floating point number. Sub test() Dim x As System.Int32 = 32400 Dim b(3) As System.Byte Dim i As New System.IntPtr 'take apart i = Marshal.AllocHGlobal(4) Marshal.WriteInt32(i, x) For j As Integer = 0 To 3 b(j) = Marshal.ReadByte(i, j) System.Windows.Forms.MessageBox.Show("Part: " & b(j)) Next 'put back together Dim y As System.Int32 Dim py As System.IntPtr py = Marshal.AllocHGlobal(4) For j As Integer = 0 To 3 Marshal.WriteByte(py, j, b(j)) Next y = Marshal.ReadInt32(py) System.Windows.Forms.MessageBox.Show("Result: " & y) End Sub HTH :)
  10. If it's in outlook you could use the outlook com object model to get the details...
  11. Not if you use them properly - they should work fine. Only future drawback that I can think of will be that code will have to be rewritten slightly for 64 bit windows when it arrives. :)
  12. I've been working on a custom templated web control and wondering if it woukd be possible to create a complex control whereby one template provides the field for another. For example: <asp:controlname> <Template1> <div><%# Container.Template2Data %></div> </Template1> <Template2> <b><%# Container.Item %></b> </Template2> </asp:controlname> So template 1 is used multiple times with some source data and then the items genarated from this are placed in the Template2Data fields in the first template. Is this possible? :)
  13. Yep, will copy. It creates a copy and moves the copy. :)
  14. Not sure I follow...
  15. Or you could just use: SelectedItem=Page.Request.Form.Item("Age")
  16. It won;t be for anyone who should have access ;) Also as I'm only using sessions rather than cookies per se cookieless sessions where the session id is passed in the url is possible. :)
  17. Sure, if was a questionnaire type form I would. But it will be making changes to large amounts of data in a large textbox - no way round it. It's not that I expect people to take 20 minutes with it though anyway. More that it's quite likely to start then get interrupted by a phone call and then resume after - easily passing 20 minutes. :)
  18. You want to check out http://www.mentalis.org and look at the api guide which gives documentation and examples for using Win32 API's. It also lists .Net functions that replace them where appropriate but this appears to be unoften.
  19. Can you show us the code you are using at the moment? If you do all the manipulation in the page load event then the users shouldn't see the change..
  20. Assuming the Contact you wish to copy is objItem and the detination folder is objFolder you would use: Dim objItem2 as Object objItem2=objItem.Copy() objItem2.Move(objFolder) Hope that helps. :)
  21. Hmm, can't say I know much about possible .Net solutions here but you could use some API's e.g. FindWindow or enumerate windows to allow selection from a list to get the application handle and then use postmessage to send the characters to the application...
  22. Yes, for a non-fixed-width font it won't work though the measure string method mentioned earlier could perhaps be used to find the number of characters before a space is needed. If I have some freetime or need a break from what I'm working on I might try and knock something more foolproof up and compile it to a custom control. :)
  23. What code are you currently using?
  24. Can't speak for anyone else but I don't really follow what you mean...
×
×
  • Create New...