Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mark T

@Mark T
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Capture data from web page
    M Mark T

    I thought "What does he mean?... grumble... grumble..." And then I looked and found it. Don't know why I didn't see it before. Thanks. Mark

    IT & Infrastructure html com hardware help question

  • Very fast textbox needed
    M Mark T

    You may be able to use DirectX or OpenGL. I know it seems like overkill to use a 3D engine to display simple text, but graphics cards are built for speed. Of course, you will have to handle all aspects of the display yourself. Disclaimer: I've no clue how fast text can be written in either DirectX or OpenGL.

    C# csharp performance announcement

  • Information needed
    M Mark T

    I'd start with C# in Easy Steps. Only $10, and very basic... but everybody needs to start with the basics, don't they? Gives information in a very clear form. By Tim Anderson, ISBN 0-7607-5733-X. (I found mine at a Barnes and Noble store.)

    C# csharp help

  • Access IE's document's parentWindow
    M Mark T

    You can try basic a debugging technique: enter this line double d = document.parentWindow; Now, of course, this will not compile cleanly, and that is just what we want! Look at the error message and it will tell you that it can't convert from type zzz to double. (zzz will be a real type name, of course.) Now you know that this should work, so enter it: zzz z = document.parentWindow as zzz; Then try to proceed from there. One step at a time.

    C# com

  • DirectX under C#
    M Mark T

    I'm looking for information on the right way to draw to two different windows using a single DirectX device. The biggest key is device.Present(overrideWindow) but SwapBuffers also seem to be involved, and perhaps the Viewport settings may make a difference. I'd appreciate pointers to a good resource, comments, or suggestions. Working source code, of course, is even better. - - - - further detail: I am currently drawing one window with 2 viewports and Present() it. Then I draw the other window with a single viewport and Present(win2) it. The second window's viewport size gets misinterpreted, somehow, and it doesn't fill the second window even though it is explicitly set to use the window's full width and height. The first window's display is (not suprisingly) duplicated in the region not filled by the viewport on the second window. Drawing withing the viewport on the second window is correct. I do not have a separate SwapBuffer for the second window, since it doesn't seem necessary, and it is unclear to me what benefit it would provide. - - - - Mark

    C# graphics learning csharp game-dev

  • how can encrypt a film
    M Mark T

    That depends upon the level of security you want. There are several public domain encryption functions out there which are very good. But from a practical viewpoint, if you aren't protecting something extremely valuable, just do something unexpected with the contents of the file. A very weak encryption. It still won't be worth anyone's time to try to figure it out. For instance, for every group of 5 bytes in the file, reverse the order of those 5 bytes. Mark

    C# question

  • Calling a method from a form in another form [modified]
    M Mark T

    I hope someone can come up with a better method, but here is how I solve that problem. In the second form, make a new function (or put it in the form's constructor) which accepts a form as its argument and stores it in a local variable (perhaps called mainform). From Main(), call this function and pass the main form. Now, to call something withing the main form's class just use: mainform.mymethod(); Mark

    C# help regex tutorial question

  • Capture data from web page
    M Mark T

    I want to gather the charted data from this page: http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?Score=10 and process it in software. The problem is the page content is loaded via scripts and the page's .html source does not contain the data. So my initial idea of getting and processing the page's .html source won't work. Embedded URLs in the scripts do not provide the data. Manually typing Control-A Control-C and pasting into a text document would work, but I'd prefer an automated solution. A. I've seen one Windows program control another, but I've never done it. Is there some straightforward way my browser be controlled to send me the text or save it to a file? OR B. Perhaps a FireFox plug-in should be written? (I've never written a plug-in before, either.) OR C. Other? Suggestions would be appreciated. Thanks, Mark

    IT & Infrastructure html com hardware help question

  • Access web page text from C#
    M Mark T

    The information that I want is the large table of Stock related information. I tried looking at links in the .html source, and the one that I suspect provides the content gave an "invalid" reply from a database. Perusing the scripts (which I do not know how to read) it appears the script and the database may exchange some password-like information before allowing the query. Still looking for a way to capture the text that the Web browser has already obtained, without doing a manual copy and paste to a text file. Mark

    C# csharp html com help question

  • Access web page text from C#
    M Mark T

    Thanks for the try, but this just retrieves the general page setup and the scripts themselves... none of the data that is displayed on the page is in what is obtained. (I do really appreciate the pointer to these functions, however. I need them for another project I have in mind!) Still looking for a solution. Mark

    C# csharp html com help question

  • Access web page text from C#
    M Mark T

    20 Feb 2007 I want to gather data from this page: http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?Score=10 and process it in C#. The problem is the page content is loaded via scripts (I think) and the page's .html source does not contain the data. So my initial idea of getting and processing the page's .html source won't work. Manually typing Control-A Control-C and pasting into a text document would work, but I'd prefer an automated solution. A. Is there an easy way to actually handle the scripts from within C# (or .NET in general)? OR B. I've never done control of another program through C#, although I understand that .NET allows this. Can my browser be controlled to send me the text or save it to a file? OR C. Perhaps a FireFox plug-in should be written? (I've never written a plug-in before, either.) Suggestions would be appreciated. Thanks, Mark

    C# csharp html com help question

  • ArrayList with restricted access
    M Mark T

    Thanks to you both who responded. I couldn't figure it out without you. For others interested, here is a minimal solution class which seems to work so far. You may want to add other properties or functions, but this is what I need for now. I call it a Firm List since, for the user only, the array size is no longer variable but is firm (solidified). The user can read and use each item in the list, but can't make the list contain a different item nor change the number of items in the list.

    using System;
    using System.Collections;

    namespace FreeForAll {
    public class FirmList : IEnumerable {
    ArrayList foundation;

    public FirmList(ArrayList source) {
      foundation = source;
    }
    
    public IEnumerator GetEnumerator() {
      return foundation.GetEnumerator();
    }
    
    public bool Contains(object item) {
      return foundation.Contains(item);
    } 
    
    public int Count {
      get { return foundation.Count; }
    }
    

    }
    }

    Here is how, within another class, I return a FirmList as property "SomeList". Within this class, I have full accees to the ArrayList itself and all of its abilities.

    class A {
    ArrayList TheRealList = new ArrayList();
    FirmList TheFirmList;
    A() { // constructor
    TheFirmList = new FirmList(TheRealList);
    }
    ...
    void SomeFunctionThatAddsMembersToTheArrayList() {...};
    ...
    public FirmList SomeList {
    get { return TheFirmList; }
    }
    }

    And, finally, here is how some other code might use it, just like and ArrayList is used:

    A aaa = new A();
    aaa.SomeFunctionThatAddsMembersToTheArrayList();
    FirmList list = A.SomeList;
    foreach (object o in list) {
    ...
    }
    WriteLine("{0}", list.Count);
    if (list.Contains(...)) {...

    Hope this helps someone else. Mark

    C# help csharp performance

  • ArrayList with restricted access
    M Mark T

    I have a class with a function that returns an ArrayList. The problem is that I don't want any client that calls the function to be able to add or delete items from the ArrayList. I want to force the client to use my class' other functions to make any modifications (because related data has to be updated). Unfortunately, speed is an issue, so I can't just copy the ArrayList and send the copy. Also, a copy would allow the client to think he is making a change when it is actually being ignored. I'd prefer him to get a compile error if he calls Add(), for instance. I can't find any C# syntax that can make a returned value (or a returned parameter) read only. (The C# "readonly" syntax won't let the client replace the ArrayList with another, but WILL let the client change the content of the ArrayList, and so it is insufficient). Any ideas would be appreciated. Mark 11 Feb 2007

    C# help csharp performance
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups