|
Someone 1-voted that; I have no idea why...
P.S. Maybe they wanted Unicode char ctrl_z = '\u0026' ;
|
|
|
|
|
Which is why I pay no attention to ratings like "Reputation". I try to help people (when I'm able to) because others have helped me.
/ravi
|
|
|
|
|
Well said.
It is a shame it is only possible to measure the irrelevant, such as up-votes/down-votes, and number of posts. Only by seeing how helpful someone is could you give a proper rating.
|
|
|
|
|
sometimes it is relevant for future use to reader.
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
or
char ch = (char)(0x1A);
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
To make it compilable and readable use the escape sequence in a character constant thus:
string ctrl_z = "\x1A";
char ctrl_z = '\x1A';
It's time for a new signature.
|
|
|
|
|
Hello,
I've seen a number of articles/discussions here regarding reading the region/culture info (System.Globalization) from the OS. What I haven't seen so far is how to set that information programatically via C#. If it's here, please let me know what search criteria you used or if you have an idea of how to do it, even better. I'm thinking that I will have to end up using pinvoke and the API, but wanted to hear your thoughts. I'm looking for a native C# implementation...
Thank you in advance for any and all information.
|
|
|
|
|
|
Hey Ravi,
Thanks for the information. It steered me into the "right" direction for my purpose. I'm writing a unit test and by doing:
regionInfo = new RegionInfo("US");
CultureInfo cultureInfo = new CultureInfo(0x0409);
Thread.CurrentThread.CurrentCulture = cultureInfo;
Assert.AreEqual(regionInfo.TwoLetterISORegionName, regional.GetLocaleCode(), "Locale code is: " + regional.GetLocaleCode());
NOTE: regional.GetLocaleCode() is a call to get the system region settings
I was able to have my Regional settings set to something other than "US" and the tests ran as though the system was set to the "US" regardless.
In curiosity, do you know of a way to commit those settings to the system? Or would that be more of a registry manipulation exercise? Or "C", none of the above.
Thanks again.
|
|
|
|
|
I hope you're not trying to set it globally/permanently.
|
|
|
|
|
No, I'm creating some NUnit tests and I don't want to depend on the system happening to be of a certain setting.
But, having said that, what would be your concern for the ability to set that or said another way, wouldn't there be legitimate reasons for wanting to have the ability to set the value of the region/culture (perhaps programmatic configuration for one)?
Just curious...
|
|
|
|
|
I wouldn't want an application doing it to my system.
|
|
|
|
|
glauben wrote: wouldn't there be legitimate reasons for wanting to have the ability to set the value of the region/culture
I'd have your app off the system and be looking for some way to have you shot, oh lets change all the globalisation setting to iraq or something, sound like a particularly nasty virus to me. Which is why you are having trouble locating a simple way of doing this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Really? So if an install program asks whether to install for the current user or all users, is that configuration too much? Or a browser that asks to make itself the default browser over another one already installed (ala Firefox), or another app that says, hey should I change all those default extensions so that my app runs when you double click on them, or apps that place themselves into the run once/run at start up area of the registry, is that too much?
My point being is that these are system settings and apps will change them for the benefit of the user - though many times giving the user a choice. And there are plenty of great articles on this and many other sites for utilities (like SysInternals) that change settings, again to benefit the user of the software. So when I saw "virus", I just thought that was pretty harsh.
Anyway, thanks to the people that have helped in the past and have contributed vast amounts of time and knowledge - it is much appreciated.
|
|
|
|
|
I don't have a problem with most of the changes you have mentioned, most of them won't ruin my day but setting the globalisation/culture info for the machine I would consider particular nasty, even with the option of asking the user to Ok the change. Most users do not know the implications of the culture change, all of a sudden all my dates that rely on dd/mm/yyyy now display as mm/dd/yyyy, and that is just one of the many changes it would cause.
Nope, culture info should not be able to be changed globally from anywhere but the system.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
Developing a a project in visual studio 2008, c# .net, using videolab (www.mitov.com) components.
has a component that outputs video to DSfilters and i would like to use this so windows media encoder picks it up, i have been playing around with VCam sdk http://www.e2esoft.cn/vcam/vcamsdk.asp[^]
and it works great however i enquired over 2 weeks ago about buying the software and no one has got back to me.
does anyone know of any similar software that will be seen by windows media encoder as a capture device or is there a way to do this with media encoder sdk
kenny
|
|
|
|
|
Virtual webcam can be found on the web.
For instance : ManyCam Virtual Webcam
But I don't know if I capture your question.
|
|
|
|
|
Hi,
I am a starter in developping applications with csharp smart device projects.I want to create a Form named PrincipalMenu where I have many icons that let me pass to other Forms.With the toolbox tool,I create my listView and i associated an imageList.I want now to show my icons(which are the nodes of my imagelist)when running the application and associate to anyone a code to let me pass to a form.
I write this code but it doesn't show me anything when running application:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Essaie
{
public partial class Form1 : Form
{
private const int IMG_Traveaux = 0;
private const int IMG_Stock = 1;
private const int IMG_Energie = 2;
private const int IMG_Sync = 3;
private const int IMG_Info = 4;
private const int IMG_Quitter = 5;
private ListViewItem LVI_Traveaux;
private ListViewItem LVI_Stock;
private ListViewItem LVI_Energie;
private ListViewItem LVI_Sync;
private ListViewItem LVI_Info;
private ListViewItem LVI_Quitter;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ListView MaLV = new ListView();
MaLV.Parent = this;
MaLV.Dock = DockStyle.Fill;
MaLV.View = View.Details;
LVI_Traveaux = new ListViewItem("Travaux");
LVI_Traveaux.ImageIndex = IMG_Traveaux;
LVI_Stock = new ListViewItem("Stocks");
LVI_Stock.ImageIndex = IMG_Stock;
LVI_Energie = new ListViewItem("Energie");
LVI_Energie.ImageIndex = IMG_Energie;
LVI_Sync = new ListViewItem("Synchronisation");
LVI_Sync.ImageIndex = IMG_Sync;
LVI_Info = new ListViewItem("Informations");
LVI_Info.ImageIndex = IMG_Info;
LVI_Quitter = new ListViewItem("Quitter");
LVI_Quitter.ImageIndex = IMG_Quitter;
MaLV.Items.Add(LVI_Traveaux);
MaLV.Items.Add(LVI_Stock);
MaLV.Items.Add(LVI_Energie);
MaLV.Items.Add(LVI_Sync);
MaLV.Items.Add(LVI_Info);
MaLV.Items.Add(LVI_Quitter);
}
}
}
Can someone tells me the error and gives me the code of any node of the listview
thanks for u help
modified on Friday, April 2, 2010 11:58 AM
|
|
|
|
|
Tunisien86 wrote: ListView MaLV = new ListView();
This ListView will never be visible as you did not add it to the Form's Control collection.
Either you create a ListView with Visual Designer, and your code should populate that one (without creating a new LV), or you don't create an LV with Designer, your code creates one, adds it to this.Controls , and chooses its Location, Anchor, Dock, whatever, and populates it.
|
|
|
|
|
Hi Luc,
I am really starter.I don't understand u answer.If u can explain to me step by step or can u give a tuto to make my listview.
Thanks for u understood
(if u don't mind,can u give me u email or msn to contact from near)
|
|
|
|
|
In your Form1_Load() handler, add this line just before returning from the method:
this.Controls.Add (MaLV); /ravi
|
|
|
|
|
Hi,
I don't understand u meaning,sorry"just before returning from the method"
Thank u if u give me u code.
|
|
|
|
|
If you don't understand the phrase "just before returning from the method", I respectfully suggest you spend some time learning the basic concepts of programming before venturing to write code.
/ravi
|
|
|
|
|
Hi,
Thank u for u advice.I wanna tell u that is not a problem of learning programming,it is a problem of langage.I wanna tell u that in Tunisia,we study our subjetcs including informatic with French langage so there is a difficulty of langage.I will be grantful for u to understand my situation
Thank u
|
|
|
|
|
What I meant was, "dans votre Form1_Load procédure, ajoutez la ligne juste avant le retour". Sorry, I can't do any better.
/ravi
|
|
|
|