|
You should look at the System.Drawing.Image class. There you find routines to Load and Save an Image. To Display one, you can use a panel or picturebox.
So try it and when you have a specific question or problem with the classes or functions ask again.
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hi,
I´ve a designproblem how I shall compare values from two lists of data and finally store in a output. But the output is not the problem it is the mapping, comparing. For sure I can use a several of techniques for comparing data but Im looking for a optimal method in C# 2.0. Maybe I can use the generics List, Comparer etc...?
Ok, first I recieve a xml file via a webservice. I validate and transform it for prepering the mapping, see <sou<<<rcedatalist>. Second I get the mappingvalues from the database and bind to a List<>, xml!?!
It is the "SourceId" attribute I want to compare with a equal value from the second list. The SourceId is a generic attribute and e.g. "16481788" means street and "16481791" city, ok!?!
Below shows the sourcelist of data, the list of mapping values and a outputlist.
<br />
<br />
<SourceDataList><br />
<DataRow SourceId="16481788" value="21st street" dbType="string" /><br />
<DataRow SourceId="16481789" value="Manhattan" dbType="string" /><br />
<DataRow SourceId="16481790" value="2345" dbType="int" /><br />
<DataRow SourceId="16481791" value="New York" dbType="string" /><br />
</SourceDataList><br />
<br />
<MappingDataList><br />
<DataRow SourceId="16481788" DestId="21" /><br />
<DataRow SourceId="16481789" DestId="22" /><br />
<DataRow SourceId="16481790" DestId="23" /><br />
<DataRow SourceId="16481791" DestId="24" /><br />
</MappingDataList><br />
<br />
<OutputDataList><br />
<DataRow DestId="21" value="21st street" /><br />
<DataRow DestId="22" value="Manhattan" /><br />
<DataRow DestId="23" value="2345" /><br />
<DataRow DestId="24" value="New York" /><br />
</OutputDataList><br />
<br />
These three list only show the structure. I can treat them in any suitable format, e.g. generic lists etc. Maybe in performance purpose I want to make i xml batch insert into the database.
List1 List2 = XmlStream > Database
I hope you have good tips out there
Best regards
//Albin Malmgren
|
|
|
|
|
I'm sorry if this has been asked before - I have spent some time searching and not found an answer...
My question is this : I have developed a Usercontrol in C# / Winforms that is intended to be a child control of certain other controls, not developed by me. Is there any way that my control can 'listen' to it's parents events (specifically mouse events) and respond to them?? This seems like it should be trivial but I'm drawing a blank (too much PHP probably
Thanks in advance
Ian Roberts
|
|
|
|
|
Control does have a Parent property. Did you try accessing that property and subscribing to its events?
|
|
|
|
|
Hi,
I have created a control, and added event handling capabilty throught delegates.
Now the problem here is, i want to use this control as a ActiveX control and i am unable to find a way to handle the events on the web page???
P.S. i have tried my control in windows application, it works fine! Also i have used delegates to expose my control's events for outside world, if you have a better( rather another) way i would love to see that.
Thanks in anticipation
|
|
|
|
|
hi frnds
i am using .net 2003, i want to change the font of each item in the listbox in c#.its a windows application.
i think i am clear to u all.
just in brief i am explaining the problem once more.
the items that are added in the listbox should've different fonts and sizes.
Thanks in advance.plz solve it ASAP.
bye
nauty
|
|
|
|
|
|
i think you need a 3side Controls to help you
|
|
|
|
|
hi guys!
need some help.
i m deploying a .net application using the .net setup project and also using the installer class to add some custom actions every thing is running fine..
but i want to rollback the setup if a condition does not matches.. for which i m using the
base.rollback(isavedstate) method but it gives an exception
that "savedstate might be corrupted" and then rollback the setup from the catch block..
i m searching for it from a long time but couldnt figured it out. can any one tell me what i m missing..
i wrote the code some what like this:
protected override void OnBeforeInstall(IDictionary savedState)<br />
{<br />
base.OnBeforeInstall (savedState);<br />
<br />
try<br />
{<br />
if(DialogResult.No==(MessageBox.Show("This Setup Will restart your Internet Infromation Service Mannager(IIS). Do you want to Continue ? ","Alert",MessageBoxButtons.YesNo,MessageBoxIcon.Hand)))<br />
{<br />
<br />
base.Rollback(savedState);<br />
return;<br />
<br />
}<br />
}<br />
catch(InstallException iex)<br />
{this.Rollback(savedState);<br />
<br />
}<br />
catch(Exception ex)<br />
{this.Rollback(savedState);<br />
}<br />
}
but it gets rollback in the catch block gining the error.
abhinav
|
|
|
|
|
Hello All,
Im Coding cluster Management functions in C# using the APIs. When I am trying to DLLImport for the API GetClusterGroupState as
I get an System.AccessViolationException that protected memory is accesses. Let me know the How shoud I use this API in c#. Here is my code.
[DllImport("clusapi.dll", EntryPoint = "GetClusterGroupState", SetLastError = true,
CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.StdCall),
SuppressUnmanagedCodeSecurityAttribute()]
internal static extern int GetClusterGroupState(
IntPtr hClusGroup,
out string strOwnerNode,
[MarshalAs(UnmanagedType.I4)] int nNodeNamebuf);
Thanks
|
|
|
|
|
Hi
Is it possible to show animated gif in DataGridViewImageCell?
It is need to use ImageAnimator in Paint event
ImageAnimator.Animate(image, new EventHandler(animate))
ImageAnimator.UpdateFrames();
but which method call in animate?
private void animate(object o, EventArgs e)
{
....
}
Any method which force Paint event? Which? Invalidate is not available for the cell.
Thanks for an advice
Ela
|
|
|
|
|
Hi Everybody.
does anybody knows why I can´t debug with framework 2.0.50727? even when I actived the "Enable Debug" option in the IIS configurations for ASP .NET, in "Edit Global Configuration" and in "Edit Configuration"?? I ran the aspnet_regiis.exe with the option "-i" but get nothing; I'm working in VS 2003 (7.1.3088).
Now I'm working with Framework 1.1.4233.
I need because I can´t access to the items of a ListBox after I bind it, but once I change to Framework 2.0.50727 and run it direct from my web browser I don´t have any problems.
Grettings and thanks for your help.
|
|
|
|
|
You cant debug .NET 2 with VS2003. You have to use cordbg or the GUI debugger included with the SDK or use Visual Studio Express.
|
|
|
|
|
Ok thanks, now I get it.;)
But anyways, what I commented about the ListBox, does anybody knows what about that (accessing the items after bind the control)?
|
|
|
|
|
I want to display the cpu and memory use ration on the dialog,but I don't know how to write the code?who can help me!
|
|
|
|
|
for this you have to use Windows Management Instrumentation (WMI) classes
Add Reference to System.Management Namaspace From AddReference OPtion of your Solution Explorer.
Luck is Opportunity with hardwork
|
|
|
|
|
I want to display the cpu and memory use ration on the dialog,but I cann't know how to write the code?who can help me!
|
|
|
|
|
a good start would be to take a look at: System.Diagnostics.PerformanceCounter that
allows you to get the CPU usage.
|
|
|
|
|
Hi,
I have read few articles about localization, and I have stumble across one big question how can someone edit my localized (dll) file ???
I want to add option (if there is such possibility) for my users to change localization files by themself, but I dont know how to do it?
So as far as I know after compiling from resx file generates dll file that can be later used for localization, so there is no way it can be xml file or such so that it can be edited?
Any healp?
Big thanks!
|
|
|
|
|
For "amateur" translations - which is probably what you have if you expect the users to do the translation - look at WinRes.exe (part of the SDK). It works on the .resources files as far as I remember - but you can easily making a tool extracting these from the DLLs. The .NET linker can create a DLL from the translated .resources file. Notice you have to be careful getting the name of the embedded resources right, but it's not too hard if you make a sample with VS and see how it names everything.
For professionel translation buy a commercial localization tool so you get support for leverage etc.
For enterprise level translation, make your own tool, as the commercial solutions simply sucks if you get a high level of text and updates flowing though your localization process.
|
|
|
|
|
Do you know if there is any sample code around for any of this solutions ?
Thank you.
|
|
|
|
|
1) Search for WinRes on Google. I know it exist, I never used it.
2) Contact a translation vendor and let them deal with it - you give them the DLL with the English text embedded, they return translated DLL's (in case they are signed you need to work with them how their tool can support this - possibly though delayed signing).
3) This should only be done by enterprises - if you are not working for a company at least 3 software developers in a deticated localization team (NOT localization engineers - the entire localization team will probably be at least 15 people before you have the 3 developers) this is not the option for you. Such a localization team will also be experienced in using third party localization tools and can hence make the judgement on when your translation volume is so high that they no longer can keep up using the standard 3rd party tools.
Unfortunately Microsoft made some serious design errors in the localization file format of .NET, but it is still best to follow the standard .NET localization methods instead of inventing your own XML format.
|
|
|
|
|
Well I wanted to create my application so that anyone can edit file, for instance I give application to my friend in France, he takes it and translates it into French without having to play around with WinRes resgen and other things .
Thank you anyway for you`r response.
|
|
|
|
|
Hi,
I am using .Net Framework 1.1
Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.
(or)
Is it possible to raise an Event if a shared directory is being accessed in windows.
Actually my problem is simple, I have an application in which i have to monitor network access.If a user in the network tries to access a folder in the network a message is sent to the server indicating that a user is trying to access the network.The server decides to allow or deny permission for the user to view the directory at random.
note:I have a service running in the server and another in the client.
Any Ideas ..,
Thanks un advance...
Luck is Opportunity with hardwork
|
|
|
|
|
sundar156 wrote: Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.
You can use the FileSystemWachter for watching Directories (look in the documentation for "FileSystemWatcher class, about FileSystemWatcher class").
It should work, as I know, but I'm working with .Net 2.0
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|