Community discussion forum

Wordpad Editor

Tags: vb6 India
  • 2 years ago
    I am creating a wordpad in VB 6 using Rich Text Box and Common Dialogue Conrols ..the project is completely menu drive and will have all the features of the wordpad( not all that MS Word)..like fonts, cut ,copy,paste,insert image, save ,new etc...

    It is based on a MDI system....here if user wants, can "new" a number of child forms(Form1) with the Rich Text Box (rtb1) and Common Dialogue Controls(cd1) on it.....

    But I am having problem while dynamically loading the forms ( by creating the object of Form1) and also having problem while resizing the 2nd, 3rd and 4th .....nth chold form1.rtb1

    in the original form1 I have used the following

    rtb1.Height = form1.scaleHeight
    rtb1.Width = form1.scaleWidth

    in the form1_Activate()  event....the 1st one is ok..but the prob occurs with the newly dynamically loaded forms their rtb1 is not getting resized.....

    please help......

    I will post the code in the morning.....

    Thanks in advance


















  • 2 years ago
    i understood the actual problem. the problem is in the resize block, you have assigned form1 height and width for all new forms

    rtb1.Height = form1.scaleHeight
    rtb1.Width = form1.scaleWidth


    remove form1 and put me.scaleHeight

    and you hv to give the same in the form_resize event instead of activate event. if user resizes the form this will not resize the richtextbox.







  • 2 years ago
    first of all thanks for replying my topic....

    I have somehow fixed that mentioned problem (somewhat)

    by using

    frm.rtb1.height=scree.activeform.scaleheight
    and the same for the width....

    but there is a new problem.....

    I cant save the contents of the newly created rtb's

    that is whneever I click "New" a new instance of the said Form1 is created and loaded with all the original parameters ...but whneever I try to save the content of the newly created form1.rtb it saves only the first one....and after closing all the child form1 when I click the "New" it displays 2 new forms ..why ????

    any help .....???
















Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!