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

Morven Huang

@Morven Huang
About
Posts
23
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • node EmbeddedResource in *.csproj file?
    M Morven Huang

    Thank you,Shameel. this answer is what i need.

    C# question

  • node EmbeddedResource in *.csproj file?
    M Morven Huang

    Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?

    C# question

  • node EmbeddedResource in *.csproj file?
    M Morven Huang

    Hi all, i looked into several .csproj files today, and i found that node 'EmbeddedResource' are different from each other,i'm curious to know what results in this? anyone have any idea regarding this? (1) <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> (2) <EmbeddedResource Include="FormAbout.resx"> <SubType>Designer</SubType> <DependentUpon>FormAbout.cs</DependentUpon> </EmbeddedResource> (3) <EmbeddedResource Include="CommonText.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>CommonText.Designer.cs</LastGenOutput> </EmbeddedResource>

    C# question

  • The work is done,why does Process.WaitForExit() still block the thread?
    M Morven Huang

    Hi everyone, I run into a tricky issue when I run cmd.exe using Process class in C#. 1)Here's the C# code,it run the specified .bat file in command-line: m_BasicDataProc = new Process(); m_BasicDataProc.StartInfo.FileName = "cmd.exe"; m_BasicDataProc.StartInfo.CreateNoWindow = false; m_BasicDataProc.StartInfo.UseShellExecute = false; m_BasicDataProc.StartInfo.RedirectStandardOutput = true; m_BasicDataProc.StartInfo.RedirectStandardInput = true; m_BasicDataProc.StartInfo.WorkingDirectory = Path.GetDirectoryName(batchFilePath); m_BasicDataProc.Start(); string batchFileName = Path.GetFileName(batchFilePath); string ipLine = batchFileName;StreamWriter inputStream = m_BasicDataProc.StandardInput; inputStream.WriteLine(ipLine); inputStream.Close(); m_BasicDataProc.WaitForExit(); m_BasicDataProc.EnableRaisingEvents = true; 2)In the .bat file,it calls a .vbs file with the content pretty much like this: option explicit dim fso Set fso = CreateObject("Scripting.FileSystemObject") Dim CreateFile Set CreateFile = fso.CreateTextFile("InstallScripts\CreateTriggers.sql", true) ...... CreateFile.writeLine(strStatement) CreateFile.WriteLine set CreateFile = nothing set fso = nothing // I found that the file CreateTriggers.sql was created successfully,it means that the work of this .bat file is finished,but it's really odd that the application is still blocked by the code line "m_BasicDataProc.WaitForExit();" and could not exit. Has anyone been in same situation? Anything you could help would be appreciated!

    C# help question csharp database

  • Is it possible to get result set from a Oracle store procedure via ODBC?
    M Morven Huang

    Hi guys, I got a Oracle store procedure which would return dataset using a ref cursor,it's quite easy to get the result set if I use the classes in System.Data.OracleClient because there's a type OracleType.Cursor which matches the procedure parameter's type. But is it possible to do this via ODBC? There isn't a type likes 'OdbcType.Cursor'. Anything you can help it would be appreciated. :)

    C# oracle help question

  • How to generate odbcDataAdapter.TableMappings?
    M Morven Huang

    Hi guys, I wrote this: string cmd = "select fid,fval from x"; OdbcDataAdapter da=new OdbcDataAdapter(cmd,this.odbcConnection1); int i = da.TableMappings.Count; and I found da.TableMappings.Count was always zero. I don't want to use da.TableMappings.Add() function to add table mapping and columns mapping. Are there any functions in ADO.NET that can generate the mapping info base on a odbcDataAdapter instance? Anything you can help it would be appreciated.

    C# csharp help tutorial question

  • How to stop VS to load user controls into toolbox?
    M Morven Huang

    Thank you for your answer.Yes,it does work!!

    C# visual-studio winforms help tutorial question

  • How to stop VS to load user controls into toolbox?
    M Morven Huang

    Hi guys, There're many user controls in my current project,and VS always initializes and loads these controls into toolbox,sometime it costs me 20 minutes to finish this,and in this 20 minutes VS is no response and I can do nothing. So I'm curious to know if there's a way to stop VS to do this. Anything you can help it would be appreciated!

    C# visual-studio winforms help tutorial question

  • Where Do I Start Learning About Using SQL Databases in C# Applications?
    M Morven Huang

    install a mssql,then use it,it's better to practice,

    C# database csharp algorithms tutorial question

  • Calling A form by its name which is saved as text in a table .
    M Morven Huang

    use reflection,you can find the guideline about using this from msdn or google,it's quite easy..

    C# question

  • When using reflection,how to get the field without creating a instance?
    M Morven Huang

    Thanks everybody.

    C# help tutorial question

  • When using reflection,how to get the field without creating a instance?
    M Morven Huang

    Hi everyone,now I have a winform Form1,in Form1,there is a TextBox1,and its Text is "abcd". In the other project,I want to get the Text of TextBox1,as below: Assembly assembly = Assembly.LoadFrom(@"ClassLibrary1.dll"); Type[] types = assembly.GetTypes(); FieldInfo[] fis; System.Windows.Forms.TextBox tb; for (int i = 0; i < types.Length; i++) { fis = types[i].GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); for (int j = 0; j < fis.Length; j++) { if (fis[j].FieldType == typeof(System.Windows.Forms.TextBox)) { tb = fis[j].GetValue(Activator.CreateInstance(types[i]))as System.Windows.Forms.TextBox; Console.WriteLine(tb.Text); } } } Console.Read(); But I have to create a instance "Activator.CreateInstance(types[i]))".Are there any ways that I can get the Text without create a Form1 instance? Anyone who can help it would be appreciated.

    C# help tutorial question

  • Transfer data from excelsheet to datatable
    M Morven Huang

    You can simply use ODBC to read data from excel to datatable.

    C# csharp help

  • How to get another DataTable from original DataTable?
    M Morven Huang

    maybe you need ot clone the table structure from source datatable,like 'dt=data.Clone()',then import rows.

    C# help tutorial question

  • Do you care the technology when choosing a project?
    M Morven Huang

    No,what you actually need is to learn it,then you'll obtain another skill.

    The Lounge csharp question discussion

  • Anyone here can read Chinese?
    M Morven Huang

    Thanks. I can read english well,but seems it is much more difficult to write in english,so i think maybe i need someone to talk to in english,and he/she can check if there is a mistake in what i said.

    The Lounge help question code-review

  • Anyone here can read Chinese?
    M Morven Huang

    Thanks!

    The Lounge help question code-review

  • Anyone here can read Chinese?
    M Morven Huang

    Sorry to bother you guys. My english is poor,now i'm in Ericssion(China),i'm in big trouble writing or saying english...I need to improve my english,anyone can help me? Thanks in advance. Morven Huang Beijing China

    The Lounge help question code-review

  • OH Man Or Oh Mad?
    M Morven Huang

    maybe 'oh man,u suck'

    The Lounge csharp question

  • why TermsOfUse.aspx? [modified]
    M Morven Huang

    Thanks everybody,I have fixed this issue: click the link "My Settings",on this page,ensure that the last checkbox is checked.Then sign in again.

    modified on Wednesday, August 20, 2008 8:36 PM

    Site Bugs / Suggestions 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