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
D

draco_iii

@draco_iii
About
Posts
33
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Printing a web page
    D draco_iii

    I am looking for a way to print and html page from an embeded web browser window. Is there an easy way to do this. I created the document because I did not want to go through all the trouble of designing my own print function to do every line and all the text on the page.

    C# html

  • Problem with DataTable
    D draco_iii

    I am using MySQLDriverCS and I have a table I have gotten through the select command. When I try the following foreach(DataRow myData in MyDataTable.Rows) { } I throws an InvalidCastException in System.Data.dll I have even tried sending the rows to a DataRowCollection and it does the same thing when doing the foreach loop. I have checked HasErrors property and it is false. This is not making much sence to me. Anyone have any ideas.

    C# help

  • Loading a DLL Dynamically
    D draco_iii

    I need to load DLLs only if they are in a directory. Is there a simple way to do this?

    C# question

  • Counting New Lines in a String
    D draco_iii

    Actually the StringReader class will work better for what I want to do. Thanks for pointing me to it.

    C# csharp

  • Counting New Lines in a String
    D draco_iii

    I need to count the number of new lines(\n) in a string. I thought about using regular expressions, but I do not really understand them very well. .NET also does not provide a way to get this information. The only other way I can think of doing it is writing a function to count them through other string functions, if there is a faster or better way to do it I would really like to know.

    C# csharp

  • Encrypting\Decrypting
    D draco_iii

    The problem with the orginal code is I was not Seeking to the beginning of the stream.

    C# security

  • Encrypting\Decrypting
    D draco_iii

    I am using the following to open and write and encryped datafile. FileStream fout = new FileStream(OptionsDataFile, FileMode.Create, FileAccess.Write); TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider(); CryptoStream encStream = new CryptoStream(fout, tdes.CreateEncryptor(new byte[] {22,184,62,104,66,100,202,17,91,254,197,181,224,62,36,138,128,227,146,111,134,83,241,125} ,new byte[] {216,237,102,42,142,11,133,104,}), CryptoStreamMode.Write); ASCIIEncoding AE = new ASCIIEncoding(); and the following to decrypt. FileStream fin = new FileStream(OptionsDataFile, FileMode.Open, FileAccess.Read); TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider(); CryptoStream encStream = new CryptoStream(fin, tdes.CreateDecryptor(new byte[] {22,184,62,104,66,100,202,17,91,254,197,181,224,62,36,138,128,227,146,111,134,83,241,125} ,new byte[] {216,237,102,42,142,11,133,104,}), CryptoStreamMode.Read); ASCIIEncoding AE = new ASCIIEncoding(); int tempByte = new int(); byte[] inBytes = new byte[(int)fin.Length]; encStream.Read(inBytes,0,(int)fin.Length); When it gets to the read I get the following. An unhandled exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll Additional information: Bad Data. Anyone have any ideas why. Everything is the same for the write. I just do not get why the data would be bad.

    C# security

  • checking time values
    D draco_iii

    I have three time values and they are in string format. string time1 = "12:00:00" string time2 = "12:30:00" string time3 = "13:00:00" time2 changes, but time1 and time3 stay the same How can I check to see if time2 is between time1 and time3? I have thought of several different ways but they are all lengthy and involved. I though maybe something like this would work but want to make sure it will always work. if(time1 <= time2 <= time3) { do such -n- such } will this work for strings

    C# question

  • ListView getting the Selected Item
    D draco_iii

    This gives access to the "Selected Index". listView1.FocusedItem.SubItems[0]

    C# question

  • Datatables and XML
    D draco_iii

    How can I write a Datatable to and XML file.

    C# xml question

  • Open an "About" window....
    D draco_iii

    What exactly are you trying to do with the Click? Do you want to close the about window? about.ActiveForm.Hide() Is this where you are trying to open the about window? Form aboutForm = new about(); aboutForm.Show(); It depends on what file the aboutClick() is in.

    C#

  • Component Authoring
    D draco_iii

    I wanted to thank you so very much. That was right on target, I had something very similar, but was missing the "enum" contructions that allowed it to work properly. Again, thank you very much, I searched for hours yesterday, but to no avail.

    C# help

  • Component Authoring
    D draco_iii

    While creating a web component I ran into a problem with setting the properties for the Designer Property Pages. One of my Properties can only be Top,Bottom,Left, or Right. I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject.

    C# help

  • Getting the HTML Page from an WebBrowser Component
    D draco_iii

    How can I go about getting the HTML Page so that it can be parsed. I already have the AxSHDocVw.AxWebBrowser displaying the page, now I just need to get at the HTML code. ??????????

    C# question html

  • Accessing varibles across forms.
    D draco_iii

    Thanks. As soon as I got the space out of the name it worked perfectly. There needs to be a an article about making a static varible class. It is the best way I have seen to have global varibles.

    C# question

  • how to get an object's values from other form ?
    D draco_iii

    That would depend entirely on exactly what you are trying to do. If the Object is a Control you have added to the form and you know the objects name. You can access the Controls properties and methods viafor(int i = 0; i == this.ParentForm.Controls.Count-1;i += 1){ //Perform actions on registered objects. if(this.ParentForm.Controls[i].Name == "ControlName"){ //Perform actions on control. } }
    However, if you need to access varibles only, you should create a static class similar to this.using System; namespace staticTest { public class Setting{ public static String[] test = new String[10]; public static int[] testInt = new int[10]; static Setting(){ } } }

    C# question csharp tutorial

  • Accessing varibles across forms.
    D draco_iii

    Made the static class for the variable it look like this using System; using Perpetual_Settings; namespace Brazen_Mail { /// /// Summary description for Setting. /// public class Setting { public static Perpetual_Settings.PerpetualSettings test = new PerpetualSettings(); static Setting() { test = new PerpetualSettings(); } } }

    But when running the code I get this error.

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in system.windows.forms.dll

    Additional information: File or assembly name Perpetual Settings, or one of its dependencies, was not found.

    I can see the Properties and Methods from the class when trying access them via VS, but it craps out when I try and run the program.

    C# question

  • Accessing varibles across forms.
    D draco_iii

    How do you go about letting them know about each others existance or at least letting the child forms see full existance of the main running form? I need to be able keep one set of the varibles not multiple instances so that they can be written to or read from by any of the child forms. Doing so, would allow less overhead and insure that all of the child forms are working from the same set of "settings".

    C# question

  • Accessing varibles across forms.
    D draco_iii

    I have a varible that is declared in the main application form as public. How can I get at this varible from another form. I have tried accessing the forms varible via Form1.varible and this.ParentForm.varible and so forth. All to no avail and I need to have access to this varible from anywhere in the program. Any suggesttion would be greatly appreciated.

    C# question

  • how can i move a rectangular from one position to another
    D draco_iii

    You can do this by changing the Rectangle Draw points and then redraw the object. Rectangle DrawRectangle = new Rectangle(4,4,50,50); private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { e.Graphics.DrawRectangle(System.Drawing.Pens.Beige, DrawRectangle); } private void button1_Click(object sender, System.EventArgs e) { DrawRectangle = new Rectangle(20,20,50,50); panel1.Invalidate(); }

    C# question
  • Login

  • Don't have an account? Register

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