|
Sorry about that Heath, I just skimmed your article, I should have read more thoroughly. Filling the gap of the .aspx page (server) and the embedded control (local machine) with the web browser interface makes perfect sense.
I'll give it a go!
Thanks again for the tips.
R.Bischoff
.NET, Kommst du mit?
|
|
|
|
|
|
No, but you could use onreadystatechanged :
<object id="myControl" clsid="MyAssembly.dll#MyNamespace.MyControl"
onreadystatechanged="setProperties();">
</object>
<script language="javascript">
function setProperties()
{
if (myControl.readyState == "complete")
myControl.Prop1 = "something";
} Don't forget, though, that you can use the <param> tags inside the <object> element to set public properties on the control as well.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I read in a chunk of a file in bytes, converted it to ascii, made it a string and now I am trying to clear out the '\0' characters. Any advice?
|
|
|
|
|
The simplest single-line call is to do this:
<your string>.Replace('\0'.ToString(), ""));
or
<your string>.Replace("\0", ""));
I would probably recommend stripping unneeded chars as you're reading in the bytes, or when you convert to ascii, if you're doing that work yourself and can find a good place to insert the logic; it'd probably be faster that way.
-Jeff
here, bloggy bloggy
|
|
|
|
|
dammit I knew it was somthing simple like that thanks
|
|
|
|
|
I just started wondering how are those modern 3D RTS-games made. The 3D world structure I mean. How are those 3D mountains (that are not models but can be dynamicalle be altered in runtime) and stuff like that made ...
Isn't there a article somewhere covering something like this ?
Regards, Desmond
|
|
|
|
|
|
Search for books on Amazon about DirectX. I'm reading a couple and they explain a bit of this, though not using the advanced techniques of modern 3D engines for games. That takes experience and deep research into modern game programming.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
No, Mueller hints at this in his book "In Search of the Lost Win32API."
I have not seen anybody actually write code for a Windows Application.
All the texts write their code for Console Applications.
Dave Brighton
|
|
|
|
|
I want to know how to send data from one form to another? Like lets say I want my program to put data in the textbox of another form, how would I go about doing this?
Thanks,
K
|
|
|
|
|
This was anwserd so many times in thsi forum ...
Search a little.
But the idea is to pass a refrence of the form with the textvox to the form that wants to change that textbox in the constructor.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
|
Thanks, but what if I didn't create the class for the textbox I want to send to. For example, if I wanted to send info to a text box in a web browser, where I can start the process with the Process class, but how would I access a reference to it?
|
|
|
|
|
That's been answered many times as well. You need to get a handle to the process (see the System.Diagnostics.Process class in the .NET Framework SDK) then P/Invoke FindWindow and FindWindowEx to get the window handle (HWND - represented by an IntPtr in .NET) of the control. Then you can P/Invoke SendMessage to send WM_SETTEXT to the HWND with the text you want to set. Search this forum for more information, and see the Platform SDK for details. Previous experience with Windows messaging will definitely be a plus.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks alot I saw your previous post with the code. I searched for this, but I wasn't getting back results that applied to what I wanted to do, I guess the keywords I was searching for weren't specific enough.
K
|
|
|
|
|
Hi,
What is the best way to store encripted passwords?
I'm using a simple XML file to store the passwords but I don't know how to store the key used in encriptation in a safe way.
The passwords are to connect to a database, so they need to be tranformed back to the original values.
Thanks
|
|
|
|
|
You might want to look up documentation of the following method. I think it is what you are looking for
FormsAuthentication.HashPasswordForStoringInConfigFile
R.Bischoff
.NET, Kommst du mit?
|
|
|
|
|
DrGreen wrote:
The passwords are to connect to a database, so they need to be tranformed back to the original values.
That's not a good way to do it. You should store passwords in a one-way hash (like MD5) which someone else mentioned. Instead of sending clear-text passwords across the wire (which can be easily sniffed) and decrypting the passwords from the database to compare, a much more secure approach is to hash the clear-text password and compare that with the password in the database. This can be done better by using a SALT value and other mechanisms to avoid replay attacks.
There are several articles about this here on CodeProject.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
can anyone tell me to create a prev/next in datagrid. I would like to display record in a datagrid with multiple pages.
thank You
|
|
|
|
|
I take it this is in reference to ASP.NET's DataGrid ? If so, this belongs in the ASP.NET forum. Really, though, the documentation is pretty clear about how to do this and even includes examples.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
In general you are talking about pagination, maybe a google on "datagrid pagination" is in order.
if you are referring to asp.net, research the following properties of the datagrid;
AllowPaging
AllowCustomPaging
event:
PageIndexChanged
Good luck!
R.Bischoff
.NET, Kommst du mit?
|
|
|
|
|
Hi
I want to be able to create an Type from an string.
I have tried using Type.GetType(string). But I just cant get it too work.
Im getting assembly not found in msorlib thing or the executing assembly errors.
Im trying to get the Type from for example Type.GetType("TextBox"). But this dont work since the program doesnt seem to know where to look.
How can I load the System.Windows.Forms assembly so it knows where to look?.
|
|
|
|
|
Have you tried Type.GetType("System.Windows.Forms.TextBox") ?
|
|
|
|
|
Yes and I allways get an TypeLoadException.
The problem is that the Type.GetType method searches the executing assembly in this case an testlibrary.
"An unhandled exception of type 'System.TypeLoadException' occurred in xmltestlibrary.dll
Additional information: Could not load type System.Windows.Forms.TextBox from assembly TestLibrary, Version=1.0.1589.1600, Culture=neutral, PublicKeyToken=null."
|
|
|
|