|
Hi!
Console automaticaly convert string to OEM encoding and then type it in console window...
that is why not all unicode charecters can be converted and shown in console window.
try to do the same on WindowForm...
Good Luck
Alex Kucherenko
|
|
|
|
|
I have two ListViews, DataGrids whatever, and they both contain data from 2 seperate datasets. I'd like to have a scrollbar on one view that when scrolled would automatically adjust the other view so they both stay in sync. Both datasets would contain the same number of rows. Can this be done with C#.NET?
Fairly easily?
Any help/sample code would be greatly appriciated!
Thanks
|
|
|
|
|
C#, at least I think, is alot better than vc++6 since everything is soo easy to use and soo powerful.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
So, you're saying that VB is better than C++?
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I'm not saying that since I myself is a c++ proggrammer. It's just that it is said that C# combines the power of c++ with the ease of vb, though I know that C# has some issues, I think that this will probably erase mfc and visual c++ 6 though it will be alive, it won't be the preffered language anymore, just wait a couple of years and you'll see how it will progress.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Snyp wrote:
I think that this will probably erase mfc and visual c++ 6 though it will be alive, it won't be the preffered language anymore, just wait a couple of years and you'll see how it will progress.
It will do progress, but will not erase C++, ever!
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
GRR... I didn't say that it will KILL C++, I said that it won't be the preferred language...;)
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Whatever, dude!
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Ya ok
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Hi ,
I am trying to add a WindowsMediaPlayer Control in my app so that the user can play the audio file from my app page ! I have added the ref to WMPLib.dll.
My code is as follows:
AxWMPLib.AxWindowsMediaPlayer newMedia = new AxWMPLib.AxWindowsMediaPlayer();
ResourceManager resources = new ResourceManager(typeof(testControl));
newMedia.OcxState = ((AxHost.State)(resources.GetObject("newMedia.OcxState")));
newMedia.Enabled = true;
newMedia.Location = new Point(tX, tY);
newMedia.Name = tName;
newMedia.Size = new Size(tW, tH);
thisPanel.Controls.Add(newMedia);
if (tDefault != null) newMedia.URL = tDefault;
newMedia.URL = @"c:\myfile.mp3";
The last line newMedia.URL = @"c:\myfile.mp3" results in InvalidActiveXStateException. I know the filename is correct as I can play it from Explorer.
Any suggestions !?!
Thanks,
Paul
|
|
|
|
|
In ASP (Code behind module) I'm tring to so a simple assignment of a dropdownlist value to an int but it can't convert the string to int. So how would I cast this?
<br />
dgResult.PageSize = ddlPageResults.SelectedValue;<br />
I tried (INT) but that's C++ I couln't do the ToInt32 either it didn't look like. I know this is super simple but I couln't find an aswer.
|
|
|
|
|
Try converting the string to int with the Int32.Parse() method.
|
|
|
|
|
Hi,
you can try:
<br />
try {<br />
int MyInt = Convert.ToInt32(MyString);
}<br />
catch(Exception ex)<br />
{<br />
}<br />
Good Luck !
Braulio
|
|
|
|
|
I have Data in a typed DataSet and a Form to Edit it.
First Time I edit the Data with the form everything works fine. But if I want to reedit the Data, as I first changes something by the form everything freezes, means that I can't change data in any Control on the form. Even the OK, Cancel Buttons doesn't work anymore. I have to exit by the Close Button of the Form.
Any Ideas?
|
|
|
|
|
hi,Does anyone know how to spread text over columns in a listview in c#?
THIS is EASY IN C++ .you ONLY have TO SET the SetItemData Method of the CListCtrl to 0.
IF you WANT text TO BE DISPLAYED IN COLUMNS SET SetItemData to 1.
example:
m_ListCtrl.SetItemData(0,0); //this lines makes text spread over columns
m_ListCtrl.SetItemData(0,1); //text to be displayed column by column
how can this be accomplished in c#?
thanks
|
|
|
|
|
I personally haven't worked with ListView controls in C#, but I did a quick search in MSDN and found a property called "Tag" in the ListViewItem class which may serve your purpose.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Has anybody determined how to set the cursor to a wait cursor during a long operation where Application.DoEvents() is being called (and thus allowing .NET to reset the cursor to that set for the control the cursor is currently over).
The only solution I have found is to set the current cursor of every control to the wait cursor, but what a pain.
Thanks - Joel
VssConnect - Remote SourceSafe(r) Access http://www.voxcode.com[^]
|
|
|
|
|
Hi.
i have a few checkboxes on my form and i want to show a simple messagebox when one of those checkboxes are checked. how can i do this dynamically?
for instance, instead of writing an if statement per checkbox, like this:
if(checkbox1.checked = true)<br />
{<br />
MessageBox.Show("checked");<br />
}
write it dynamically, like this:
(the <selected checkbox=""> is the name of the selected checkbox)
if(<selected checkbox>.checked = true)<br />
{<br />
MessageBox.Show("checked");<br />
}
i know this is pretty easy for all you guru friends out there.
Thanks,
.gonad.
|
|
|
|
|
I'm not sure if I understand you, but you can maybe use first parameter of your event handler method (sender). You have to set same function as event handler for all checkboxes.
private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
{
CheckBox checked=(CheckBox)sender;
}
i'm only pointer to myself
|
|
|
|
|
Hi.
Thanks for your help. this worked exactly as you said, but i do have a queston.
Can you explain what the
(CheckBox)sender
is specifying? also, can i use this for a textbox, or other controls, as well? for example,
TextBox tb = (TextBox)sender;
I'm new at this stuff, can't you tell?
Thanks again.
.gonad.
|
|
|
|
|
First parameter (sender ) of event handler is affected object.
it is passed as object so you need to cast it to correct type (Button / CheckBox etc..).
So when you have event handler for Button, sender is button user clicked on. If you have event handler for TextBox, sender is this TextBox.
i'm only pointer to myself
|
|
|
|
|
I create tables called "Employers", "Employees". One employer can have many Employees, but one employee can have only one employer.
In my code: I create EmployerClass
{
public Long EmployerID;
public EmployeeCollections Employees;
....
}
I want the EmployeeCollections can have a group of employees order by last name and first name. I can access it like Employees[i](int i) or Employees[name](string name = lastname+" "+firstname).
Can anyone please tell me how to do that?
Thanks in advance!
|
|
|
|
|
I want to populate a winforms treeview control from a relational table without xml in c#.net. I am new to c#, so please bear with me. I set up the oracle connection, dataadapter, fill etc. The code is given below.
My problem is that I have put messagebox and see that
this.treeView1.Nodes.Add(nodeAuthor); seems to add the nodes, but when the program completes and displays the form, I do not see the group_desc populated at all. I did not add anything manually in the Nodes property in Treeview. Please help!!!
this.treeView1 = new System.Windows.Forms.TreeView();
this.oracleConnection1 = new System.Data.OracleClient.OracleConnection();
this.oracleDataAdapter1 = new System.Data.OracleClient.OracleDataAdapter();
this.oracleConnection1.ConnectionString = "the connection strings"; string strSQLAuthors = "SELECT GROUP_MASTER.GROUP_DESC " +
" FROM " +
"GROUP_MASTER ORDER BY GROUP_MASTER.GROUP_DESC ";
TreeNode nodeAuthor;
DataSet ds;
//Create the Connection and the DataSet object, and then open the connection.
ds = new DataSet();
oracleConnection1.Open();
oracleDataAdapter1 = new OracleDataAdapter(strSQLAuthors, oracleConnection1);
oracleDataAdapter1.Fill(ds, "GROUP_MASTER");
//Populate the TreeView from the DataSet.
foreach (DataRow rowAuthor in ds.Tables["GROUP_MASTER"].Rows)
{
nodeAuthor = new TreeNode();
nodeAuthor.Text = rowAuthor["GROUP_DESC"].ToString();
this.treeView1.Nodes.Add(nodeAuthor);
}
//Clean up.
ds.Dispose();
oracleDataAdapter1.Dispose(); oracleConnection1.Close();
oracleConnection1.Dispose();
ram
|
|
|
|
|
Hi,
I want to format several edit boxes, one to show the "." for currency, another one to enter phones number with an +XX-XX-XX-XX, it's possible to do that in an easy way ? ( control, input an output).
Friend of mine say... should be... I can make it with VBA for Ms Access... it should be possible an easy with C#...
|
|
|
|
|
I just submitted a new article that converts my Validating Edit Controls[^] code to C#. Hopefully it will be published soon, but I can email it to you if you need it right away.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|