|
Hello all, I am currently taking a C# programming class and have no prior knowledge of any programming. I am to write a program that takes a user's input and encrypt it, only using the ASCII code table (32-126). Now I know that there is a way of doing without re-inventing the wheel to say. I just can not find it. I think I need to use a character array, but just can not figure it out. Also I know that there is something in the System.Security that does this, but can not find out any information. Please help. Thanks
Rich Poulin
|
|
|
|
|
|
Hi,
I am making an application in VSC# 2005 which has a "WebBrowser" control in it, I want to be able to manipulate a webpage in the webrowser control from within the application.
I have worked out how to get (and set) the text in a form on the webpage with something like;
webBrowser1.Document.GetElementById("Textbox1").InnerText.ToString();
which is fine, but I just can't work out how to invoke a button on the webpage. Basically I want to get the text from the form, change it, paste it back into the form (all of which I can do) and then call the "Save" button to save my changes (which I can't do). Any help would be greatly appreciated!
Thanks in advance, Martin.
|
|
|
|
|
OK I worked out one way, by putting the user focus on the correct button, then simulating pressing the enter key;
webBrowser1.Document.GetElementById("Save").Focus();
SendKeys.Send("{ENTER}");
but it's pretty ugly, and possibly not very robust. Anyone got any better ideas?
thanks
|
|
|
|
|
how can I do to get the disk space of a computer of a domain (The domain hasn´t got Active Directory)?
thanks
|
|
|
|
|
This may not be possible unless you have an application sitting on the target machine that will publish how much disk space is free.
On the other hand, I'm no expert when it comes to Windows networking, so take this with a grain of salt.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
how can I do to get a list of all the computer of a domain (The domain hasn´t got Active Directory)?
And how can with a list the printers?
|
|
|
|
|
i am working with [b]Windows control library[/b] in c#.i am using ShDocVw.dll in my project. i add a refrence of this dll into my project. but the problem is that when i complie this project it gives me an error dll doesn't have strong name. i already have one another dll with strong name. how can i add another dll using strong name. or i s there is any anther alternative to put this dll into Globlal Assembly.
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
Hi Amit,
If you want to add shdocvw.dll to the gac go to your project and then
In the solution explorer right click on the project name in the window.In the contextual menu click properties under the common properties\general category
you will see wrapper assembly for activex\com objects in the 'wrapper assembly key file' give the name of .snk file with wchih you want to sign this assembly.you can use the same key.compile it and then register it using gacutil.Hope it Helps.
Rakesh
|
|
|
|
|
i go through the same way as u have written.i named ShDocVw to "wrapper assembly key file" . where do i use this .snk Key.i had already used "AssemblyKeyFile" attrubute in Assemblyinfo.cs file. becoz i m using one another dll also.
after giving name ShDocVw to "wrapper assembly key file" when i compile.it is giving the same error " ShDocVw.dll does have strong name. if i used second AssembleKeyFile attribute in assemblyinfo.cs it is giving an error "duplicate assembly key file attribute" . how can i solve this problem
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
Hi,
I display a lot of images in a context menu, using OwnerDraw=true and overring OnMeasureItem/OnDrawItem. The automatically displayed arrows are great, but the menu takes all the screen height! My boss want the menu to be shorter...
I tried to display only a few images, and added my own arrow items at the beginning and the end of them, but I can't make the menu scroll when I click/select the arrows!
- when clicking the arrows, the menu automatically closes
- when selecting them, I dynamically modify the images items, but I can't make the menu update!
I tried everything: Refresh/Update/Invalidate of the parent control, PerformSelect on all the images items, calling SendMessage with WM_PAINT, WM_PRINT, WM_PRINT_CLIENT with the menu handle, and the parent control handle, I've even tried to set to false then back to true all the images items OwnerDraw, they update more or less, but the false ownerdraw menu (brief) displaying is awful!
I didn't manage to find an answer to my problems on the web, so if someone have a clue it would be great to tell me! Either about how making my long menu not taking all the screen height, or forcing the menu to update when I dynamically modify it!
Thanks a lot
Thibaud
|
|
|
|
|
Allow the menu to close as normal when the arrows are selected, update the items, and make it appear in the same location again.
If you added the context menu to the control using the "ContextMenu" Property create a delegate for the MouseDown event and note the location of the mouse when the right mouse button is clicked.
Update the menu items, then call:
myCtrl.ContextMenu.Show(myCtrl, savedX, savedY);
David
|
|
|
|
|
Hi, thanks for your answer. That's a goog idea yes, I will try it. But I'm afraid the menu closing then re-opening will be unaesthetic.
Otherwise, I have found another solution on a French forum: http://www.csharpfr.com/code.aspx?ID=34929
This solution consists in using the SetMenuInfo API to set the maximum menu height. But you also need to create a new contextmenu class, as SetMenuInfo needs a handle, and the only valid handle can be obtained by calling CreateMenuhandle, which is a ContextMenu protected method!
|
|
|
|
|
Considering that I'm a novice C# user there may be a very simple answer to this problem. I have 3 tabs in my application; one where the search parameters are entered and the second where the related file is displayed in a richtextBox. For some reason unless I view the richtextbox tab before I try load a file into it I am unable to view any loaded files. Any help in this regard would be appreciated.
Kind Regards,
Alvin
|
|
|
|
|
Some code would definitely help. Where are you instantiating the textbox?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hi, how can i save a real picture on the SQL DB and retrieve it through .net
Thanks alot
Hamody
|
|
|
|
|
I'm having a very odd problem. I have a basic C# form app that pInvokes into a C++ dll. When I build my C++ dll and C# app in Release mode, the C# app can load the dll and call into it just fine.
However if I build the solution in Debug mode, the C# app throws a DllNotFoundException. I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there.
Why is it able to load the release version and not the debug version?
|
|
|
|
|
dxben wrote: I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there.
And the name of the debug dll is the same?
xacc.ide-0.1 released! Download and screenshots
|
|
|
|
|
Yeah its the same. Actually someone else pointed out to me that my debug dll is probably dependent on the debug dll of the CRT and that it can't find it. So I need to make sure the debug DLL of CRT is in my path. What is the filename of the debug crt DLL?
|
|
|
|
|
i have an object
public class Class2 : System.MarshalByRefObject
{
public Class2 ( ) { } // default constructor
public Class2 (string param1, string param2) { }
}
i cant use the 2nd constructor with remoting, when i use wsdl on the remoting url it doesnt have a signature for the 2nd constructor.
how do i implement this?
thanks
|
|
|
|
|
I guess you want an object instantiated with the second constructor to be registered with the remoting framework. If that's what you wanted to do, use the Marshal[^] method. Like
Class2 c2 = new Class2("x", "y");
RemotingServices.Marshal(c2,...);
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
HI,
I have a usercontrol with a testbox in it, and i am using "keydown" event of the textbox with in the control (for my specific functionality) .( i am using this control in my (win)form).
On form level i have one "Button". and i set "AcceptButton" property of form to this button.
My problem is, when i hit enter key while having focus on textbox of usecontrol, "Acceptbutton" property of form is executing instead of "keydown" event of usercontrol.
How do i make execute, "keydown" event of usercontrol on hitting enter key?
Regards,
satz
|
|
|
|
|
You can't get it to do both. AcceptButton is used to indicate the button that is to get the notification when the user presses Enter in the dialog.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have a trivial question.
When we create a C# windows application "bin" and "obj" folder is created in the project folder.
Will anyone please tell me that what is the signifance of these 2 folders.
Thanks a lot
|
|
|
|
|
The obj directory is a temporary directory. Visual Studio uses this for temporary files when compiling and linking. Files out of the bin directory are what you should deploy. This is the directory to which build variables like $(TargetPath) refer.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|