User Control Questions
Messages   Related Types
This message was discovered on ASPFriends.com 'winforms-cs' list.


Wenfeng Gao

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

Reply to this message...
 
    
Stephen Rees
Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Meor Zaharin Meor Ibrahim
how to create applet? I really appreciate for any good url

thanks

-----Original Message-----
From: Stephen Rees [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 13, 2002 9:32 AM
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions
Importance: High

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is =
situated -
which ain't going to work if it's being downloaded to various machines =
via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but =
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them =
under a
button so that they are only created when the button is clicked. That =
way at
least you can get the underlying control showing in the web page and =
then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. =
I
embedded a DataGrid control to my user control. My user control showed =
up
on a IE successfully.

However my user control will not show up in either of the following =
cases.

1. I add the following line of code to the constructor of my control
TcpClient client =3D new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp =3D JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp =3D JOIN/QUIT

Reply to this message...
 
    
Stephen Rees
Dear Wenfeng ...

My custom column works fine.

Post code if you want me to have a look.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees

It's on your hdd ...

Microsoft.NET\FrameworkSDK\Samples\QuickStart\winforms\samples\iesourcing\cs

You can do it with anything.

Create an app using Winforms ... anything you like.

Then convert the main form to a usercontrol ( user control is better than
control because you can see it in the designer).
Then compile to get errors - you'll need take out AutoScaleBaseSize and the
Main function.
Then go to project properties and compile as library.

That dishes out the dll.

Then the html looks like

<object id="simpleControl"
classid=YourControl.DLL#YourControl.TheControl
height="300" width="600" >
</object>

where YourControl.TheControl is the namespace of the control.

You can then open other forms from within that control.
Easy - and they're cool 'cos the web page background shows through between
the buttons !

I want to build whole websites with it ... basically shove a client app in a
web page ... it's faster data access that using html and asp.
That's why I have been a bit shocked why data access to an external server
requires extra permissions - that then means that the average user has to
download and install an msi file - so it might just have well have been an
ActiveX control.
(java applets can access data on the server with standard security).

(( mmm ... Maybe I can do something with streams with Internet permissions -
but I doubt it ))

When they all went on about ASP, application service providers, this is what
I thought they meant ! Silly me.

Steve.

-----Original Message-----
From: Meor Zaharin Meor Ibrahim [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 02:27
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

how to create applet? I really appreciate for any good url

thanks

-----Original Message-----
From: Stephen Rees [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 13, 2002 9:32 AM
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions
Importance: High

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees

http://65.174.82.63/graphicsexplorer2.htm

http://65.174.82.63/timedpopgrowth.htm --- that's a .NET example.

The're perfect for science co's - you can't do that in a web page.
When you do a java applet they cannot be imported into a stand alone app
without manually transporting the code and altering it and recompiling.
ActiveX needs installing so no one will unless trust is in there somewhere.

With these things you can import them straight into an app without
modification and they don't need installing on the client. So they could be
really neat for displaying scientific/engineering data or plotting cad
objects for the public to view.

It's a bit of a pity that extra perms are needed to access the server they
came from. The apps above generate their own points from code within so it's
safe ... but pre-calculated points scan be saved on the server and
accessed - we shouldn't really need extra perms for this.
Maybe I can access the same IP without restricions, I have been trying with
SQLServer that's on a different server. If not, maybe I can do it with
streams I don't know - I don't think so.
I could write the points in as a parameter but that's cumbersome.

I'm going to get stuck into the perms/security and see what I can come up
with.
So I reckon I talk too much anyway so will leave you for a while till I come
up with something new. Suppose it ain't doing the winforms list any harm.
i'm mostly talking to myself anyway - it's a bad habit !

Regards all
Steve.

-----Original Message-----
From: Meor Zaharin Meor Ibrahim [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 02:27
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

how to create applet? I really appreciate for any good url

thanks

-----Original Message-----
From: Stephen Rees [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 13, 2002 9:32 AM
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions
Importance: High

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Wenfeng Gao

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs" <Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE: User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Wenfeng Gao

Steve,

You are right about custom column!

I forgot to remove my code using System.Diagnostics.EventLog, which is a
protected resource that can not be access by my user control.

Thank you.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs" <Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE: User Control Questions
06/12/2002 07:14
PM
Please respond to
"winforms-cs"

Dear Wenfeng ...

My custom column works fine.

Post code if you want me to have a look.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees
Wenfeng ...

Stuff that works from an app doesn't necessarily work from an applet.

The stuff that's downloaded is downloaded from the web ... so needs
permissions, in case it contains malicious code.

If you run it as an app then it automatically has those permissions as you
take that responibility when you installed it, or rather double clicked it.

You can write an msi file to give an applet those local responsibilities, as
soon as you install that msi file it becomes your problem if anything wrong
happens with the applet (that's why you can sign them with external people
like Verisign or so forth - they tell the people installing them that you
are a decent guy)

It's a long winded way of saying it but if you double click an exe then if
it goes pear shaped then it's your own fault for doubling clicking it - if
you install a permission giving msi to give permissions to an applet - then
its your fault if it goes wrong.

If you run it after downloading it from the web, and it goes pear shaped -
then its the software manufacturers fault - i.e. Microsoft. So they make
damn sure that they have it signed sealed and delivered the necessary tools
to pass the buck ( but it's not passing the buck it's just a necessary way
to stop malicious code running rampant - and hats off to MS - they didin't
have to produce that sort of security did they ? It's in everyones interest
and good on them. Personally I think it could do with loosening slightly in
the name of practicality ... MS would disagree. At the end of the day MS
have tightened security in this area (more than java) at a cost to the
practicality and use of the applets .... i.e. at a cost to the saleable
features of dotNET .... I can only take my hat off to them for "doing
themselves" in the interest of the publics security. Who can argue with
that eh ?)

Regards
Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 17:56
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees
Wenfeng ...

There's a bit more too it and I think you know that.

I know I don't really.

Assigning permissions to local assemblies, that's where you are isn't it ?

I'm afraid you're a bit ahead of me here ( I think most are)

I should probably be asking the questions and you should be patronising me !
( a horrid situation to be in - from this end)

Will help if I can.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 17:56
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Wenfeng Gao

Steve,

Please do not patronise yourself. I do appreciate your help very much. No
body is always 100% correct.

BTW, the applet http://65.174.82.63/timedpopgrowth.htm is cool. Do you have
codes available to public?

Regards,

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs" <Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE: User Control Questions
06/13/2002 11:04
AM
Please respond to
"winforms-cs"

Wenfeng ...

There's a bit more too it and I think you know that.

I know I don't really.

Assigning permissions to local assemblies, that's where you are isn't it ?

I'm afraid you're a bit ahead of me here ( I think most are)

I should probably be asking the questions and you should be patronising me
!
( a horrid situation to be in - from this end)

Will help if I can.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 17:56
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees
Cheers Wen ...

Support always supported !

PopTimedGrowth is part of .Net
I have it as part of Beta2 samples ... the RTM dotNET I have is a free
educational version that a mate gave me 'cos his brother works for a college
.... And thank God for that ! - unfortunately it had absolutely no examples
with it. So I had to load it in on top of the free RTM framework ... that
then at least gave me some examples again.
Poptimedgrowth is part of the ResourseCD with Beta2 disks.
Beta2ResourcesCD\RESKIT\Samples\CS\WinForms-Graphics-PopGrowth
If you haven't got this then download from my website at http://
65.174.82.63/WinForms-Graphics-PopGrowth.exe noting that this is a
self-extracting zip file straight from the resources cd. If you are not
happy with this then tell me and I'll put up a standard zip file and no
offence will be taken - promise, just ask.
If what you unpack is Beta2 code you will probably find that all that needs
changing is the dispose method :: change to
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>

        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }
then do the biz to convert to applet.

If you want me to do it all for you I will - and supply the dll code in RTM
... I just thought it might be practise, apart from the fact that I don't
really know what I've done with it - it 'should' be here somewhere !

Besides .. that's not the best one - the GraphicsExplorer is (check the
Mandelbrot)

I didn't write this either ( though I have done similar and orginal work in
the area of chaos) but I did add the zooming to the original code - which
can be found somewhere at codenotebook.com .... Since I added the zoom he
has changed his to include a version of that zoom ... I still don't think
he's managed/bothered to turn it into an applet - though I haven't been
there for a while. He a cool guy - a physicist.

Again ... if you can't find or do what you need I'll take a closer look at
my system (which itself is pretty chaotic at the moment) and find all the
code you need to get the applet working.

Cheers Wang.
I'm off to bed now, I'm kanackerackereroooooed.
:0)
Steve.

(??? I just had problems connecting to codenotebook.com .... I hope he's ok
????)

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 19:59
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Please do not patronise yourself. I do appreciate your help very much. No
body is always 100% correct.

BTW, the applet http://65.174.82.63/timedpopgrowth.htm is cool. Do you have
codes available to public?

Regards,

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/13/2002 11:04
AM
Please respond to
"winforms-cs"

Wenfeng ...

There's a bit more too it and I think you know that.

I know I don't really.

Assigning permissions to local assemblies, that's where you are isn't it ?

I'm afraid you're a bit ahead of me here ( I think most are)

I should probably be asking the questions and you should be patronising me
!
( a horrid situation to be in - from this end)

Will help if I can.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 17:56
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp" target="_blank">http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp" target="_blank">http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp" target="_blank">http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp" target="_blank">http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp" target="_blank">http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Stephen Rees
Wen ..

I know - sorry m8. It's just I don't know enough about everything and I want
to.
It plays havoc with my confidence levels.

The GraphicsExplorer is here
http://www.componentsnotebook.com/notebooks/csharp/canvas2.html

It's an updated version I think with the zooming built in ... I haven't seen
it yet, methix I'll take a sneak preview also.

Regards
The new & confident
Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 19:59
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Please do not patronise yourself. I do appreciate your help very much. No
body is always 100% correct.

BTW, the applet http://65.174.82.63/timedpopgrowth.htm is cool. Do you have
codes available to public?

Regards,

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/13/2002 11:04
AM
Please respond to
"winforms-cs"

Wenfeng ...

There's a bit more too it and I think you know that.

I know I don't really.

Assigning permissions to local assemblies, that's where you are isn't it ?

I'm afraid you're a bit ahead of me here ( I think most are)

I should probably be asking the questions and you should be patronising me
!
( a horrid situation to be in - from this end)

Will help if I can.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 17:56
To: winforms-cs
Subject: [winforms-cs] RE: User Control Questions

Steve,

Thank you for your replies.

I think that IP address is not an issue. I have a working winform app using
the same IP address. That IP address is not assigned dynamically.

I think that it might be related to .NET partial trust codes. I read Jason
Clark's recent article on MSDN, but do not know how to get around it.

Wenfeng

"Stephen Rees"
<sr@stephenrees.n To: "winforms-cs"
<Click here to reveal e-mail address>
et> cc:
Subject: [winforms-cs] RE:
User Control Questions
06/12/2002 06:32
PM
Please respond to
"winforms-cs"

Wenfeng ...

I know nothing of TCP so I'm only doing trial and error here.

Altering permissions to full trust didn't fix it.
Changing it to 127.0.0.1 did.

Sounds like it has to originate at the IP of where the applet is situated -
which ain't going to work if it's being downloaded to various machines via
isp dynamic IP assignement.
Remember these things are on the client not the server.

If you could grab the final IP and slot it in dynamically somehow - but
that
sounds like a job for Reflection-Emit to me.

Note also :: don't put these constructors in the main code, do them under a
button so that they are only created when the button is clicked. That way
at
least you can get the underlying control showing in the web page and then
you know it works. It will then display a securtity message.
If you don't you get a blank box.
(or you handle the exception within I suppose)

I'll get back to you on the custom column one.

Steve.

-----Original Message-----
From: Wenfeng Gao [mailto:Click here to reveal e-mail address]
Sent: 13 June 2002 00:02
To: winforms-cs
Subject: [winforms-cs] User Control Questions

Hi,

I created a user control derived from System.Windows.Forms.UserControl. I
embedded a DataGrid control to my user control. My user control showed up
on a IE successfully.

However my user control will not show up in either of the following cases.

1. I add the following line of code to the constructor of my control
TcpClient client = new TcpClient("164.90.243.60", 6868);

2. I add a customer column to the DataGrid control.

How to get around these? Thanks.

Wenfeng

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
 
System.Diagnostics.EventLog
System.Net.Sockets.TcpClient
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid
System.Windows.Forms.UserControl




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com