User Profile

Collapse

Profile Sidebar

Collapse
gvuksa
gvuksa
Last Activity: Mar 5 '13, 08:38 AM
Joined: Feb 20 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I tried this and it works in windows forms application but I need something for WPF application.
    Here I used PrintPreviewCon trol but I don't know how to show it in WPF form.
    Also I would prefer to use DocumentViewer to show preview.
    Can anyone help me with that?
    Code:
            PrintPreviewControl ppc;
        
            //Here goes MouseDown I just used btn_Click for testing
            private void btnClick_Click(object
    ...
    See more | Go to post

    Leave a comment:


  • Code:
    private void richTextBox1_Click(object sender, EventArgs e)
             {
                 var form2 = new Form2(this);
    
                 form2.textBox1.Text = this.textBox1.Text
    
                 form2.Show();
             }
    See more | Go to post

    Leave a comment:


  • Use Enter event in Properties window in events.
    When you enter texbox it will show result.
    Code:
    private void tbRes_Enter(object sender, EventArgs e)
            {
                // Do calculation that you want
                double res = double.Parse(tb1.Text) + double.Parse(tb2.Text);
    
                // Pass result to textbox
                tbRes.Text = res.ToString();
            }
    See more | Go to post

    Leave a comment:


  • Use Textbox_TextCha nged event for your code.
    Code:
    private void textBox_TextChanged(object sender, TextChangedEventArgs e)
            {
                 if (textBox != "")
                 {
                     // your code for getting data from database
                 }
            }
    See more | Go to post

    Leave a comment:


  • You should use mysql_error to know exactly what the error is.
    You should maybe lose empty lines or try something like this
    Code:
    $query="insert into naipone(Amtoffirstrelease, Amtofsecondrelease, head, subhead," .
     
    "Availableamt,sanctionedamt,progressivebal) values" .
     
    "('$Amtoffirstrelease','$Amtofsecondrelease','$head','$subhead','$Availableamt','$sanctionedamt','$progressiveba"
    ...
    See more | Go to post

    Leave a comment:


  • gvuksa
    replied to Code to check first and last letter.
    Simply extract first and last letter and check condition.
    Here is C# code:
    Code:
    private void btnEnter_Click(object sender, EventArgs e)
            {
                //Get ID to string
                string s = textBoxID.Text.ToUpper();
    
                //Get IDs first letter
                string firstLetter = s.Remove(1, s.Length - 1).ToUpper();
    
                //Check last letter
                bool lastLetter
    ...
    See more | Go to post

    Leave a comment:


  • gvuksa
    started a topic How to show Print preview in form control wpf

    How to show Print preview in form control wpf

    Hi,
    I can't figure out how to show print preview in control.
    I have class Printer : PrintDocument that contains what i want to print but how to show that in form and in which control.

    updated:
    To be more precise i have listbox with documents for printing. When user selects document i want to show print preview in some control next to this

    Thanks!
    See more | Go to post
    Last edited by Niheel; Feb 21 '13, 11:02 AM. Reason: added information moved into question
No activity results to display
Show More
Working...