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
N

natsuyaki

@natsuyaki
About
Posts
36
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Current directory issue to load a assembly thru reflection
    N natsuyaki

    I think Assembly auto searches assemblies in GAC and application folder. You'd better pass a absolute or relative path to it, rather than setting current directory... ;P

    C# help debugging question

  • Passing Variable to Parent form
    N natsuyaki

    Err, I see, txtUsername is private huh? define a property: public string Username { get{return txtUsername.Text;} } So, in main form: stripLblLoginAs.Text = "Login As :" + login.Username;

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    FrmMain frmMain = (FrmMain)this.MdiParent your login form doesn't have a parent, so the frmMain will be null when running. try this: in main form: LoginForm login=new LoginForm(); login.ShowDialog(this); if (login.DialogResult==DialogResult.OK) { this.toolStripStaff.Visible = true; ........ in login form: else if ((txtUsername.Text == username) && (txtPassword.Text == password)) { this.DialogResult=DialogResult.OK; ........

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    A dialog is not a MdiChild, so childLogin.MdiParent = this; can be ignored. According to my experience: childForm child=new childForm(); child.ShowDialog(parent); works. My code and I is not professional. take careful advantage.

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    childForm.ShowDialog(parentForm)

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    Forms can be shown as dialog and return a DialogResult, that makes things simple.

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    Why don't you the login form as a dialog?

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    I admit that it's ugly. But it works.

    C# question

  • Passing Variable to Parent form
    N natsuyaki

    set the txtUsername as public, or just define a public variable in child form.

    C# question

  • MDI
    N natsuyaki

    FrmMain frmMain = this.MdiParent as FrmMain;

    C# help question

  • meta data and attribute
    N natsuyaki

    That's a big work to do.... You may be interested in this book: Applied .Net Attributes by Jason Bock Sorry, here we go. And this could also help:http://www.codeproject.com/KB/cs/attributes.aspx

    modified on Monday, May 12, 2008 4:30 AM

    C# csharp dotnet question

  • meta data and attribute
    N natsuyaki

    1.some like that 2.some attributes reprent for "mark",and some for "deal". That means, some attributes are use for comment the content, some for the compiler that the content will be processed by the mean mentioned in the attributes. So, some keep there and some disappeared. This is my point of view. For the precise definition, please view msdn.

    C# csharp dotnet question

  • Multi-thread form managing [modified]
    N natsuyaki

    I solved it in a tricky way....: _CurrentPlugin.Window.ShowDialog(this); :)

    C# question database adobe

  • Multi-thread form managing [modified]
    N natsuyaki

    Could you please give please give more details? I'm not so good at messages.. ;P Thanks.

    C# question database adobe

  • File header processing... [modified]
    N natsuyaki

    Sorry for misunderstanding.... ;P I'll check it out whether the method will seek to the Begin and overwrite my header...

    C# cryptography help question

  • File header processing... [modified]
    N natsuyaki

    Thanks a lot. But doing this will cause the header be compressed with the data.

    C# cryptography help question

  • File header processing... [modified]
    N natsuyaki

    thanx boblaw. But the HASH is the hash code of the compressed data.

    C# cryptography help question

  • Multi-thread form managing [modified]
    N natsuyaki

    I've written a plug-in architeture based application. Plugins exist in isolated assemblies and each plugin runs in it's own thread provided by the host application. But these plugins just cannot display their own forms. Exactly, they can, but it's just a "flash". How can I deal with this? Herewith the working model: All the plugins implement the interface IPlugin. The host start the plugin through the method in IPlugin with a new thread. The plugin begin its work as is required(this is where I want the plugin shows its form). The plugin trigger an event while the progress changed. When the task is done, the host will destroy the instance of the plugin. thanks in advance...

    modified on Sunday, May 11, 2008 10:57 AM

    C# question database adobe

  • meta data and attribute
    N natsuyaki

    1. i don't really know, maybe the tool you mentioned can. 2. I wrote a custom attribute PuginAttribute. All the plugins must add this attribute. So, I can get it at runtime by GetCustomAttribute(), if exists, that mean this is a plugin. [Plugin(true)] public class SamplePlugin:IPlugin { ..... .... IL code would be displayed like this: .custom instance void [XXXX]aaa.bbb.ccc.PluginAttribute::.ctor(bool) = ( 01 00 00 00 )

    C# csharp dotnet question

  • ManagedRijndael Out of Memory Exception
    N natsuyaki

    Yes, if each piece is encrypted with the same key and IV. And remember to use the same size to decrypt. Sample: //Start the Encryption process FileStream fs = new FileStream(f, FileMode.Open); byte[] data=new byte[1024]; while (true) { int i = fs.Read(data, 0, 1024); if (i <= 0) break; else { CStreamWriter.Write(data, 0, 1024); //OUT OF MEMORY EXCEPTION HERE CStreamWriter.FlushFinalBlock(); } }

    modified on Sunday, May 11, 2008 7:19 AM

    C# data-structures security performance help 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