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
B

bruze

@bruze
About
Posts
56
Topics
40
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to Create UI AUTOMATION for OUTLOOK 2007 using C# .Net 3.0 (using System.Windows.Automation;)
    B bruze

    I am getting aeInbox:Null

    C# csharp design algorithms testing tools

  • How to Create UI AUTOMATION for OUTLOOK 2007 using C# .Net 3.0 (using System.Windows.Automation;)
    B bruze

    Can Any One Help, I am trying UI AUTOMATION for OUTLOOK 2007 using C# .Net 3.0 (using System.Windows.Automation;) My Requirement's are mentioned below. 1) Open Outlook 2007 2) Open Inbox 3) Select first unread email. 4) Open the first unread email. 5) If there are attachements, download the attachements. 6) Select next unread email and do the same as above. I can open the OUTLOOK 2007, But I am getting NULL value while Searching Inbox using PropertyCondition.

    PropertyCondition pc = new PropertyCondition(AutomationElement.NameProperty, name);
    return parent.FindFirst(TreeScope.Descendants, pc);

    Here are the Code,

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows.Automation;
    using System.Windows.Automation.Provider;
    using System.Threading;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System.Windows;
    using System.Windows.Forms;

    namespace AmmeaBahavathi
    {
    class OutLookUIAutomation
    {
    [DllImport("user32.dll")]
    private static extern bool SetForegroundWindow(IntPtr hWnd);
    [DllImport("user32.dll")]
    private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
    [DllImport("user32.dll")]
    private static extern bool IsIconic(IntPtr hWnd);
    private const int SW_RESTORE = 9;

        static void Main(string\[\] args)
        {           
            // look for outlook already running
            Process\[\] processes = Process.GetProcessesByName("outlook");
            AutomationElement aeOutLook = null;
            Process proc1 = new Process();
         
            if (processes.Length == 0)
            {
                // start new outlook process              
                proc1.StartInfo.FileName = "outlook";
                proc1.Start();
                proc1.WaitForInputIdle();
                Thread.Sleep(5000);
                aeOutLook = AutomationElement.FromHandle(proc1.MainWindowHandle);
            }
            else
            {
                proc1.Close();
                // pull up the existing outlook window
                IntPtr hWnd = processes\[0\].MainWindowHandle;
                if (IsIconic(hWnd))
                {
                    ShowWindowAsync(hWnd, SW\_RESTORE);
                }
                SetForegroundWindow(hWnd);
            }
                       
            
            if (aeOutLook != null)
            {
    
    C# csharp design algorithms testing tools

  • How to read the mail from OutLook Express using UIAutomation in C# 3.0
    B bruze

    Can any one Help, I am trying to do following step dynamically using UIAutomation in c# 3.0 1)Open Outlook 2)Open Inbox 3)Select first unread email. 4)Open the first unread email. 5)If there are attachements, download the attachements. Select next unread email and do the same as above. I have tried below code.I Can open the outlook Express.But I can't read mail.

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Threading;
    using System.Windows.Automation;
    using System.Diagnostics;

    namespace ConsoleApplicationUI
    {
    public class ReadMail
    {
    static void Main(string[] args)
    {
    ProcessStartInfo psInfo = new ProcessStartInfo(@"C:\Program Files\Outlook Express\msimn.exe");
    Process prov = Process.Start(psInfo);
    Thread.Sleep(5000);

            //Read Inbox
            AutomationElement Inboxstart = null;
            PropertyCondition Inboxconds = new PropertyCondition(AutomationElement.NameProperty, "Inbox");
            Inboxstart = AutomationElement.RootElement.FindFirst(TreeScope.Descendants, Inboxconds);
    
    
            if (Inboxstart != null)
            {
                InvokePattern InboxstartInvoke = (InvokePattern)Inboxstart.GetCurrentPattern(InvokePattern.Pattern);
                InboxstartInvoke.Invoke();
            }
    
           
            Console.Read();
        }
    }
    

    }

    Thanks, Bruze

    C# csharp testing tools regex help

  • How to convert Dialogic .vox to .wav using c# or vb
    B bruze

    Can any one help, How to convert Dialogic .vox to .wav file using c# or vb. I have dialog vox file,I need to convert Dialogic .vox to .wav file using c# or vb. Below code using convert ADPCM Vox to Wav but my requirement is Dialogic .vox to .wav

    Module moduleVOX2WAV

    Dim WaveHeader() As Int32 = New Int32() {&H46464952, &HFFFFFFDB, &H45564157, &H20746D66, 16, &H10001, 6000, 12000, &H100002, &H61746164, -1}
    Dim IndexShift() As Int16 = New Int16() {-1, -1, -1, -1, 2, 4, 6, 8}
    Dim StepSize() As Int16 = New Int16() {16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794}
    Dim Nibble2Bit(,) As Int16 = New Int16(,) {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {0, 1, 1, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 0, 1, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}, {1, 1, 1, 0}, {1, 1, 1, 1}}
    Dim SignTable() As Int16 = New Int16() {1, -1}
    Dim StepSizeIndex As Int16 = 0
    Dim Signal As Int16 = -2
    Dim AvgBuffer() As Int16 = New Int16() {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    Dim AvgIndex As Int16 = 0
    Dim Total As Int32 = 0
    Dim Length As Int32
    Dim Offset As Int32
    Dim nibble As Int16
    Dim ReadBuffer(4096) As Byte
    Dim WriteBuffer(8192) As Int16
    
    Public Sub Convert(ByVal srcVOXFile As String, ByVal destWAVFile As String)
        Dim strm As New IO.FileStream(srcVOXFile, IO.FileMode.Open, IO.FileAccess.Read)
        FileOpen(2, destWAVFile, OpenMode.Binary, OpenAccess.Write, OpenShare.LockWrite)
        FilePut(2, WaveHeader)
        Length = 4096
        While Length = 4096
            Length = strm.Read(ReadBuffer, 0, 4096)
            For Offset = 0 To Length - 1
                nibble = 0
                Signal
    
    C# csharp help tutorial

  • How to play the .vox file in browser. Using C# with Asp.net 2.0
    B bruze

    Thanks for reply

    ASP.NET csharp asp-net help tutorial

  • How to play the .vox file in browser. Using C# with Asp.net 2.0
    B bruze

    The browser was showing(audio/voxware) plugin. I have manually searched for the plugin, but browser showed message (audio/voxware) plugin not found". So can u please provide this plugin details.

    ASP.NET csharp asp-net help tutorial

  • How to play the .vox file in browser. Using C# with Asp.net 2.0
    B bruze

    Can any One help, How to play the .vox file in browser. I can able to play .wav file in browser, but its not able to play the .vox file, because broswer asking the plugin MIME type (audio/voxware) My requirement is .vox file should play in the browser when we click the Play button event using C# with Asp.Net 2.0 Thanks, bruze

    ASP.NET csharp asp-net help tutorial

  • How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application
    B bruze

    I got it. Thank you So much for your reply

    ASP.NET csharp design sysadmin security tutorial

  • How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application
    B bruze

    Thanks For Your Reply. Actually, First of all I want to record the audio and Save into Client box using browser.Once I recorded the audio file then Upload into Server folder. Thanks, Bruze

    modified on Monday, September 21, 2009 5:29 PM

    ASP.NET csharp design sysadmin security tutorial

  • How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application
    B bruze

    c# .net 2.0 web application. I have tried following code.It is working fine in Server box (I have created vitrual direcory for record folder in c: drive "), but it not working in client box.

    c:\\record\\record.wav"

    Code

    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Microsoft.VisualBasic.Devices;
    using Microsoft.VisualBasic;
    using System.Runtime.InteropServices;

    public partial class Recording : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    
    \[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)\]
    private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
    
    
    protected void btnRecord\_Click(object sender, EventArgs e)
    {
        //Record
        mciSendString("open new Type waveaudio Alias recsound", "", 0, 0); 
        mciSendString("record recsound", "", 0, 0);
    }
    
    protected void btnSaveStop\_Click(object sender, EventArgs e)
    {
        // stop and save
        mciSendString("save recsound c:\\\\record\\\\record.wav", "", 0, 0); 
        mciSendString("close recsound ", "", 0, 0); 
        Computer c = new Computer(); c.Audio.Stop();
    
    
    }
    
    protected void btnRead\_Click(object sender, EventArgs e)
    {
        //Read
        Computer computer = new Computer();
        computer.Audio.Play("c:\\\\record\\\\record.wav", AudioPlayMode.Background);
    }
    

    }

    Thanks, Bruze

    ASP.NET csharp design sysadmin security tutorial

  • Dynamically change the Crystal report
    B bruze

    Can any one help, I am developing the crystal report(salary report) for emp salary details application using c# .net 2.0 version window application. In "salary report" have following field object and text objects are there. field objects ************ 1)modeofpayment1 2)VoucherNumber1 3)AccountNumber1 4)ChequeNumber1 5)BankName1 text objects ********** 1)txtmodeofpayment 2)txtVoucherNumber 3)txtAccountNumber 4)txtChequeNumber 5)txtBankName Requirement *********** If modeofpayment1 field object value is "Cash" then 1)txtAccountNumber 2)txtChequeNumber 3)txtBankName text objects is invisible. If modeofpayment1 field object value is "BankDeposit" then 1)txtVoucherNumber text object is invisible. I have tried following code

    CrystalDecisions.CrystalReports.Engine.TextObject temp = ((CrystalDecisions.CrystalReports.Engine.TextObject)cr1.ReportDefinition.Sections["Section3"].ReportObjects["txtAccountNumber"]);
    temp.Text = "";

    the above code is ok for only one record. How to do for multiple record. Thanks, Bruze.

    Windows Forms csharp help tutorial announcement career

  • Transfer the data from xls sheet to sqlserver using SSIS
    B bruze

    Hi, I need to transfer the data from xls sheet to sqlserver but actually the thing is if the source excel file has different sheets, in each sheet i have the data and i need to move the entire data( all the data that is present in all sheets of the excel file) to a single table into sql server like wise I have many xls files ( which have many sheets ) . for eg: excel file 1: -> sheet 1 -> sheet 2 -> sheet 3 excel file 2: -> sheet 1 -> sheet 2 -> sheet 3 excel file 3: -> sheet 1 -> sheet 2 -> sheet 3 now i need to get the data from all of the files and i need to insert into a single table ( sql server) in ssis package so plz help me by giving the solution . thanks

    Database sql-server database sysadmin help

  • How to create a discussion forum using asp.net(c#)
    B bruze

    Hi, Can any one give some idea about create a "discussion forum" using asp.net(c#). Thanks, bruze

    ASP.NET csharp asp-net tutorial discussion

  • Is the Conversion of VB.net 2.0 code to ASP is possible or not?
    B bruze

    Can any one help, Is the Conversion of VB.net 2.0 code to ASP is possible or not? Thanks,

    C# csharp help question

  • Generation of Report in .NET from whatever comments in Solution file.
    B bruze

    U go through the .net architecture

    C# csharp tutorial

  • Generation of Report in .NET from whatever comments in Solution file.
    B bruze

    Can u explain, what is your correct requirement?

    C# csharp tutorial

  • How to Compare the two database tables(table1,Table2) and update the difference into (table2) using c#
    B bruze

    Can any one Help I am trying Compare the two database tables(table1,Table2) and update the difference into (table2) using c#. I have Compared two tables and got the difference value. How to update the difference value into table2 particular row? Student.aspx ************* In aspx page I have added the three Gridview

    Student.aspx.cs
    ********************
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Data.SqlClient;

    public partial class Student : System.Web.UI.Page
    {
    Comapre objComapre = new Comapre();
    protected void Page_Load(object sender, EventArgs e)
    {
    DataTable First=new DataTable();
    DataTable Second = new DataTable();
    DataTable Compare = new DataTable();

      First = objComapre.GetStudentTableOne();
      Second = objComapre.GetStudentTableTwo();
      Compare=compareDataTables(First, Second);
    
      GridView1.DataSource = First;
      GridView1.DataBind();
      GridView2.DataSource = Second;
      GridView2.DataBind();
      GridView3.DataSource = Compare;
      GridView3.DataBind();
    }
    
    public DataTable compareDataTables(DataTable First, DataTable Second)
    {
        First.TableName = "FirstTable";
        Second.TableName = "SecondTable";
    
        //Create Empty Table
        DataTable table = new DataTable("Difference");
    
        try
        {
            //Must use a Dataset to make use of a DataRelation object
            using (DataSet ds = new DataSet())
            {
                //Add tables
                ds.Tables.AddRange(new DataTable\[\] { First.Copy(), Second.Copy() });
    
                //Get Columns for DataRelation
                DataColumn\[\] firstcolumns = new DataColumn\[ds.Tables\[0\].Columns.Count\];
    
                for (int i = 0; i < firstcolumns.Length; i++)
                {
                    firstcolumns\[i\] = ds.Tables\[0\].Columns\[i\];
                }
    
                DataColumn\[\] secondcolumns = new DataColumn\[ds.Tables\[1\].Columns.Count\];
    
                for (int i = 0; i < secondcolumns.Length; i++)
                {
                    secondcolumns\[i\] = ds.Tables\[1\].Columns\[i\];
                }
    
                //Create DataRelation
                DataRelation r = new DataRelation(string.Empty, first
    
    C# csharp database design security help

  • Error:Assembly '' was not found in Custom Control(WPF)
    B bruze

    Can any one help I have tried, Create one Custom Control using Custom Control(WPF) in visual studio 2005 and .net 3.0, MyCustomButton

    ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MyCustomButton"

    but I got the default error and can not open the Design Page. Error: Assembly '' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project.

    WPF csharp wpf help dotnet visual-studio

  • Can not Convert System.Windows.Controls to System.Windows.Forms.Controls [modified]
    B bruze

    Can any one Help I have created one Panel Control(System.Windows.Forms) using wpf window application and create one user control using Windows Control Library. I want to add the usercontrol in Panel I have tried the following code xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" Title="Sivam" Height="300" Width="300" Loaded="Form_Load"> grid> windowsformshost margin="7.37,6.72333333333333,48,22"> wf:panel height="50" x:name="panel1" text="Prompt" xmlns:wf="#unknown" /> /windowsformshost> /grid> /window>; private void Form_Load(object Sender, EventArgs e) { UserControl1 uc1 = new UserControl1(); **panel1.Controls.Add(uc1);** //System.Windows.Forms.Integration.ElementHost host = new System.Windows.Forms.Integration.ElementHost(); //UserControl1 uc1 = new UserControl1(); //host.Controls.Add(uc1); //panel1.Controls.Add(host); } But I got the Error Convert System.Windows.Controls to System.Windows.Forms.Controls Thanks, Siva

    modified on Thursday, September 11, 2008 9:52 AM

    WPF wpf help csharp css dotnet

  • How to add Controls to ListView Control in WPF
    B bruze

    Can any one Help, I have tried add Controls to ListView Control in WPF Application. private void Form_Load(object Sender, RoutedEventArgs e) { Button btn = new Button(); btn.Name = "Button1"; btn.Content = "Button Text"; listView1.Controls.Add(btn); //this.listView1.Controls.Add(new Button()); } But I got the Error 'System.Windows.Controls.ListView' does not contain a definition for 'Controls' How to add Controls to ListView Control in WPF Thanks, Sivaprasad

    WPF help csharp wpf tutorial
  • Login

  • Don't have an account? Register

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