Hi Thomas,

Thanks for the information, but that too I have tried and did not worked.

The thing is that it does not use the inputs for the picturebox.
I solved it by adding picturebox in the form, renamed some lines and it works 
now.

Like you can see I replaced outpic with NSCEPictureBox1 and that did the trick.

With kind regards,

Charles

Sub NSCEPictureBox1_mousedown(button, shift, x, y)
  NSCEPictureBox1.drawpoint x,y
  tmpxy=x & "#" & y
  xp=x
  yp=y
End Sub

Sub NSCEPictureBox1_mouseup(button, shift, x, y)
  If dkline Then
    dy=Abs(yp-y)
    dx=Abs(xp-x)
    If dx>dy Then y=yp Else x=xp
  End If
  NSCEPictureBox1.drawline xp,yp,x,y
  tmpxy=tmpxy & "#" & x & "#" & y
  sezn(pocet)=tmpxy
  tmpxy=""
  Rem MsgBox (sezn(pocet))
  pocet=pocet+1
End Sub

Sub NSCEPictureBox1_mousemove(button, shift, x, y)
 If Dfree Then
    NSCEPictureBox1.drawline xp,yp,x,y
    tmpxy=tmpxy & "#" & x & "#" & y
    xp=x
    yp=y
  End If
End Sub


Sub f1h_click
    form1g_hide
    form1h_show
  NSCEPictureBox1.fillcolor=H00FFFFFF
  NSCEPictureBox1.BackColor=&H00FFFFFF&
  NSCEPictureBox1.Appearance=2
  NSCEPictureBox1.borderstyle=1
  NSCEPictureBox1.scalemode=3
  NSCEPictureBox1.drawwidth=2
  NSCEPictureBox1.width=200
  NSCEPictureBox1.height=100
    
     Dfree=True
     Dline=False
     Dkline=False

End Sub

--- In [email protected], Thomas Gruber <computerhu...@...> wrote:
>
> Hi Charles,
> the "form_load" routine must have the name of your form (e.g. form1h) 
> followed by "_load".
> So if your form is called "form1", it must be named
> 
> Sub form1h_load
> ...
> 
> That way, it will run when your form is loaded (made visible), which happens 
> when you execute the statement
> 
> form1h_show
> 
> 
> 
> Kind regards
> Thomas
> 
> 
> Am 22.10.2010 um 17:14PM schrieb inpcle:
> 
> > 
> > Hi,
> > 
> > I want to intergrade Qsketch in my form.
> > 
> > I tried to replace load_form with form1h_load
> > but that did not worked.
> > If I hide the last form that I am in it, then I see like the example in NS 
> > basic the box and I can draw lines.
> > 
> > How can I make it work in my form when I load the form (form1h_show)?
> > 
> > With kind regards,
> > 
> > Charles
> > 
> > Sub load_form
> > Dfree=True
> > Dline=False
> > Dkline=False
> > Dim titlebar
> > titlebar=Array("About")
> > SetMenu "titlebar",titlebar
> > 
> > AddObject "picturebox","outpic",20,120,180,100
> > outpic.borderstyle=1
> > outpic.scalemode=3
> > outpic.drawwidth=2
> > outpic.width=200
> > outpic.height=100
> > 
> > End Sub
> > 
> > Sub outpic_mousedown(button, shift, x, y)
> > outpic.drawpoint x,y
> > tmpxy=x & "#" & y
> > xp=x
> > yp=y
> > End Sub
> > 
> > Sub outpic_mouseup(button, shift, x, y)
> > If dkline Then
> > dy=Abs(yp-y)
> > dx=Abs(xp-x)
> > If dx>dy Then y=yp Else x=xp
> > End If
> > outpic.drawline xp,yp,x,y
> > tmpxy=tmpxy & "#" & x & "#" & y
> > sezn(pocet)=tmpxy
> > tmpxy=""
> > Rem MsgBox (sezn(pocet))
> > pocet=pocet+1
> > End Sub
> > 
> > Sub outpic_mousemove(button, shift, x, y)
> > If Dfree Then
> > outpic.drawline xp,yp,x,y
> > tmpxy=tmpxy & "#" & x & "#" & y
> > xp=x
> > yp=y
> > End If
> > End Sub
> > 
> > Sub btnk_click
> > Bye
> > End Sub
> > 
> > Sub about_click
> > MsgBox("Quick sketch" & vbCrLf &"NS Basic/CE" & vbCrLf & "www.nsbasic.com" 
> > & vbCrLf & "PDA technology" & vbCrLf & "www.pda.cz")
> > End Sub
> > 
> >
>


-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.

Reply via email to