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
K

kakarato

@kakarato
About
Posts
27
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Active Directory Reset password - able to login with both old password and new password [modified]
    K kakarato

    Assume you perform login authentication with code below :

    bool loginResult = false;

    using (DirectoryEntry de = new DirectoryEntry(this.SearchRoot.Path, userDN, password, AuthenticationTypes.Secure))
    {
    try
    {
    object x = de.NativeObject;
    loginResult = true;
    }
    catch (COMException comEx)
    {
    }
    return loginResult

    }

    Just Change the AuthenticationTypes to AuthenticationTypes.Secure will solve the problem. If the AuthenticationTypes is AuthenticationTypes.None then it will able to login with old password. refer this :Windows Server 2003 Service Pack 1 modifies NTLM network authentication behavior

    C# csharp com windows-admin question

  • Host Web Service and Web Site in virtual directory & app pool
    K kakarato

    Just wonder is it a good practice to host web site and web services in the same app pool and same virtual directory ?. The asp.net web site will call the business facade directly and the web services will host the business facade for others .net application.

    ASP.NET csharp asp-net wcf business question

  • Unable To select Other TabPage in a UserControl in Form Designer
    K kakarato

    I've create a UserControl with 2 TabPages. First TabPage got 1 TextBox and Second TabPage got 2 TextBox(s). During Form Design Time I drag the UserControl from toolBox to the new Form the UserControl show up correct in the Form. However i'm unable Click on the Second TabPage as selected TabPage to see how second TabPage look like. Please help.

    C# design help

  • TextBox.Clear() won't clear column that it Bind to.
    K kakarato

    I bind text box below with a string typed datarow where the column i'm going to bind is DateTime. Below id the code: this.txtDate.DataBindings.Add("Text", m_DataRow, "END_DT", true, DataSourceUpdateMode.OnPropertyChanged, null, "dd/MM/yyyy"); when i click on a chkbox event below fired: private void chkbox_CheckedChanged(object sender, EventArgs e) { Boolean isChecked = ((CheckBox)sender).Checked; if (!isChecked) { this.txtDate.Clear() } // Line below will clear the text in text box an also clear the m_DataRow.END_DT. //if (!isChecked) //{ // this.txtDate.Clear() // m_DataRow.SetEND_DTNull() //} } Date that show in the textbox is clear. How ever the date time still exist in m_DataRow.END_DT. I Thought when i set the txtDate.Clear it should also clear the m_DataRow.END_DT some how it won't work. Please help.

    C# help

  • MS ReportViewer Cause Application Error
    K kakarato

    I'm using VS2005 with MSAcsess and MS ReportViewer to genearate a report. It work perfectly in my development environment. When i try to deploy the application to Virtual PC with a clean environment, it work fine. The application will hang when user open the report form and close and reopen (sometime happen on the third time)again the report form. Below is the code. And also i found out if user close the form in PrintLayout Mode. I must cancel the report rendering in form close event. this.reportViewer1.CancelRendering(5000); Else the program will hanged forever when user click PrintLayout button. FormReport frm = new FormReport(); this.Cursor = Cursors.WaitCursor; try { frm.ShowReport(sqlStatement + frm2.QueryString + " " + order , reportName); frm.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { //frm.Dispose(); this.Cursor = Cursors.Default; } private void ShowReport(string reportName, ReportsDS reportDS) { if (reportDS.Report.Rows.Count < 1) { MessageBox.Show("No records found. Please import data into system."); this.Close(); } ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "ReportsDS_Report"; reportDataSource.Value = reportDS.Report; this.reportViewer1.LocalReport.ReportEmbeddedResource = reportName; this.reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.RefreshReport(); } private void FormReport_FormClosing(object sender, FormClosingEventArgs e) { try { this.reportViewer1.CancelRendering(5000); } catch (Exception ex) { MessageBox.Show(ex.Message); } }

    C# help workspace

  • Problem with Strong Typed Dataset with DataGridView
    K kakarato

    1.I create a strong typed dataset. 2.I bound the table from the strong Typed dataset to a DataGridView. 3.User Click on a row and press "Select" button. I can just cast the selected row with code below: this.returnedRow = (TypedDS.MasterGroupSearchRow)this.dgvMasterContract.CurrentRow.DataBoundItem; 4.At this moment the this.dgvMasterContract.CurrentRow.DataBoundItem is (TypedDS.MasterGroupSearchRow) But if After Click on the column header .. problem come out ... this.dgvMasterContract.CurrentRow.DataBoundItem will become System.Data.DataRow. So code below will fail .. this.returnedRow = (TypedDS.MasterGroupSearchRow)this.dgvMasterContract.CurrentRow.DataBoundItem; Is there anyway to solve this problem ? or is there anyway to preserve it original typed row ?

    .NET (Core and Framework) help question

  • Create Check box in grid Colunm Header (Win Form)
    K kakarato

    Is is possible to create a grid with a checkbox at column header ? like those web form.

    C# css question

  • Combo Box in ListView
    K kakarato

    Currently I'm able to create a combox box in ListView in Windows Form (PC application) with mouse up event in ListView, by using C#. But is it possible to do the samething for Pocket PC Application? I'm unable to find the mouse up event in ListView. I've do lot of searching in ineternet but stilll unable to find a related article.

    Mobile csharp algorithms question

  • Create Combo Box In ListView in Pocket PC App.
    K kakarato

    Currently I'm able to create a combox box in ListView in Windows Form (PC application) with mouse up event in ListView, by using C#. But is it possible to do the samething for Pocket PC Application? I'm unable to find the mouse up event in ListView. I've do lot of searching in ineternet but stilll unable to find a related article.:(

    C# csharp algorithms question

  • Export 50,000 records to a Text File.
    K kakarato

    Thanks Colin.:)

    Database question database performance announcement

  • Export 50,000 records to a Text File.
    K kakarato

    I'm using a smart device which run Win CE witn SQL CE 2.0. Would like to know what is the best way to export a table in the device with 50,000 records to a text file. Should i use a SQL SELECT statement like "SELECT * FROM TABLE" into a data set and later loop the DataTable in the DataSet and export write it to a text file ? Or select in it into a DataReader and loop the DataReader? Which one will provide a better performance ? I try to to use method 1 (loop the DataTable in DataSet, but the proble is it take a long time to select all the record into the dataset, and it look like hang over there to the user :zzz:, because i can't update the status and show to the user. However method 2 (loop DataReader) seen like bit better at least i was able to update the status to the user and let user know the program is running. Please kindly advise. Thank in advance.

    Database question database performance announcement

  • Combo box bind to object ... need help
    K kakarato

    Thanks for help but an Error Message come out at the same line. The error message is : "Could not bind to the new display member." If i take out the line "this.comboMonth.ValueMember="monthNo" something strange is display in the combo box .. In the combox box it will display "XYZ.Model.Monthlist", where the XYZ.Model is the namespace. this.comboMonth.DataSource = stdData.getMonthList(); this.comboMonth.DisplayMember = "monthDesc"; //If i remark line below some thing strange come out in the combo box //this.comboMonth.ValueMember = "monthNo";

    C# help

  • Combo box bind to object ... need help
    K kakarato

    I think my poor english make u misundestand. I've code below in my form ... private struct MonthList { public MonthList(string desc,string monthNo, string shortdesc) { this._desc = desc; this._number = monthNo; this._shortdesc = shortdesc; } private string _desc; private string _number; private string _shortdesc; public string monthDesc { get {return _desc;} } public string monthNo { get {return _desc;} } public string shortDesc { get {return _shortdesc; } } } private void init_cboMonth() { ArrayList month = new ArrayList (); month.Add( new MonthList ("January","1","Jan")); month.Add( new MonthList ("Feburay","2","Feb")); month.Add( new MonthList ("March","3","Mar")); month.Add( new MonthList ("April","4","Apl")); month.Add( new MonthList ("May","5","May")); month.Add( new MonthList ("June","6","Jun")); month.Add( new MonthList ("July","7","Jly")); month.Add( new MonthList ("August","8","Aug")); month.Add( new MonthList ("September","9","Sep")); month.Add( new MonthList ("Otocber","10","Oct")); month.Add( new MonthList ("November","11","Nov")); month.Add( new MonthList ("December","12","Dec")); this.comboMonth.DataSource = month; this.comboMonth.DisplayMember = "monthDesc"; this.comboMonth.ValueMember = "monthNo"; } It work fine in the form.. by when i try to seperate code above it to another file like below public class stdData { public static ArrayList getMonthList() { ArrayList month = new ArrayList (); month.Add( new MonthList ("January","1","Jan")); month.Add( new MonthList ("Feburay","2","Feb")); month.Add( new MonthList ("March","3","Mar")); month.Add( new MonthList ("April","4","Apl")); month.Add( new MonthList ("May","5","May")); month.Add( new MonthList ("June","6","Jun")); month.Add( new MonthList ("July","7","Jly")); month.Add( new MonthList ("August","8","Aug")); month.Add( new MonthList ("September","9","Sep")); month.Add( new MonthList ("Otocber","10","Oct")); month.Add( new MonthList ("November","11","Nov")); month.Add( new MonthList ("December","12","Dec")); return month; } } private struct MonthList { public MonthList(string desc,string monthNo, string shortdesc) { this._desc = desc; this._number = monthNo; this._shortdesc = shortdesc; } private string _desc; private string _number; private string _shortdesc; public string monthDesc ... public string monthNo ... public strin

    C# help

  • Combo box bind to object ... need help
    K kakarato

    Can i just create a class or struct just for hold a set of static datas, let say objMonth contain two properties Month_Desc(String) and Month_ID (number). So Later when i just need to issue the command : cboMonth.DataSource = "objMonth". The combobox will be able to display Jan till Dec. Thanks.

    C# help

  • GetNextControl again ..
    K kakarato

    Thanks for help. So i should put the code in a base form class instead of inside the textbox base class right ? Instead of using "this" so what should i use ?

    C# question

  • GetNextControl again ..
    K kakarato

    I plan to create a custom textbox class that when user press the enter key it will focus to another control. But i would like to check out that, should i place the GetNextControl method in the textbox class or in the base form class :confused:? I found that code below not working .. X| public class baseTextBox:System.Windows.Forms.TextBox { protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { Control ctrl = this.GetNextControl(this,true); ctrl.Focus(); e.Handled = true; } } } Please advice. Thanks.

    C# question

  • Display an MDI Child Form in Show in Modal Form ?
    K kakarato

    Thanks. For clear alll my confuse :doh:

    C# question

  • Display an MDI Child Form in Show in Modal Form ?
    K kakarato

    Is is possible to show an MDI child form in Modal Forms ? or any other alternative method to show a child form in Modal Form ?

    C# question

  • "object" problem
    K kakarato

    Thanks. You are right, at the base class the 'object' don't have "Show" method. The "SearchFrom" only instance in the inheritted form but not in the class.

    C# help csharp

  • "object" problem
    K kakarato

    I try to build a Form template in VB.Net so later on i can inherit the form template. in VB.NET i can use Public SearchForm As Object; 'Without instance the real SearchForm Class object 'The real SearchForm will be instance in the inherit form. 'in the init. method SearchForm.Show(); the base class sucessfully Compile. But in C# public object SearchForm 'Without instance the real SearchForm Class object 'The real SearchForm will be instance in the inherit form. 'in the init. method SearchForm.Show() but in C# i can't compile it.. an error message come out : 'object' does not contain a definition for 'Show' :(Please help ... urgent ...

    C# help csharp
  • Login

  • Don't have an account? Register

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