|
Well, i am trying to add a voice clip sending in my messenger app! Same as voice clip sending in MSN Messenger 7.5 and 8! So, it would not be a very good idea to make a new connection everytime a user would like to send a voice clip, because the TCP handshaking period is about couple of seconds and above! It would be much annoying for user to wait that time period!So.. i thought i could open one TCP connection when the application is starting, or when the user click "connect" button and send all voice clips through the same connection! Of course, in both directions! Any help please! How do you think this would be the best to do?
Thanks!
|
|
|
|
|
hi i want to embedd or bind any file to my app in runtime and extract it at run time again( for example i want that user can embedd or bind access db into my exe file or extract it again at run time) how to do that ??
codeproject is best ..
thanks
|
|
|
|
|
Would you explain it more. If you want the schema of an Access DB file then you can use OleDbSchemaGuid.
Saqib
|
|
|
|
|
no i don't want embedd only access db into my app, i want to embedd any file to my app or bind it to my app.(for example i want to bind an exe file to my app).
|
|
|
|
|
With binding what do you exactly mean, like what would you take or give to that bound file.
Saqib
|
|
|
|
|
with binding any file to my app at runtime i wnat that end user bind any file such az exe or bmp or ... bind or embedd to my app that other can not access it .
|
|
|
|
|
I've created a customized control that is basically a textbox with some labels. Among other things, I'm trying to expose a couple attributes of the textbox (called myText).
Within the class of the user control, I've put
<br />
public bool Multiline<br />
{<br />
get { return myText.Multiline; }<br />
set { myText.Multiline = value; }<br />
}<br />
This is all fine, and I can modify this within code, but how do I get this property to show up in the properties window in the .NET designer? Is there some special tag I need to put before it?
|
|
|
|
|
That's all you need, if you want to set the description (displayed at the bottom of the property grid) then use the [Description("Your description")] tag, likewise there's a category attribute (when the property grid is in the category view) and a few others such as designer (not applicable to this property).
But basically any property is by default displayed in the property grid. To hide it use the [Browsable(false|true)] attribute.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Turns out all I needed to do was re-open the designer where I was trying to use the custom form. That got it showing up. Anyways, thanks for the help, and the advice on [Description()]
|
|
|
|
|
hi Drew McGhie!
basically, your code is already fine...
maybe the "myText" textbox is not initialized? if the initialization of this textbox was done on the InitializeComponent method... there would be no problem. perhaps you do the initialization by demand?
hope this helps!
microsoc
|
|
|
|
|
I am trying to parse a email message retrieved using POP3 to extract the subject, the sender, the date and the subject. Do you know a certain open source library or code to help me do that in c#.
|
|
|
|
|
I also have the same proble but this code will help you some what....
Pop3Message msg2 = obj.Retrieve(msg);
Response.Write("Message {0}: {1}");
Response.Write(msg2.number);
Response.Write("aashu1");
//int i = msg2.message.IndexOf("Content-Disposition: inline");
//int j = msg2.message.Substring(i).IndexOf("------=");
//int k = msg2.message.Substring(i).Length;
//int p = k - j-1;
string str1 = Regex.Match(msg2.message, "\nTo <to>[^\n]+)\n", RegexOptions.IgnoreCase).Value.ToString();
string str2 = Regex.Match(msg2.message, "\nFrom <from>[^\n]+)\n", RegexOptions.IgnoreCase).Value.ToString();
string str3 = Regex.Match(msg2.message, "\nCC <cc>[^\n]+)\n", RegexOptions.IgnoreCase).Value.ToString();
string str4 = Regex.Match(msg2.message, "\nSubject <subject>[^\n]+)\n", RegexOptions.IgnoreCase).Value.ToString();
int h = msg2.message.IndexOf("\n\n");
string str5 = msg2.message.Substring(h+4);
Response.Write(str1);
Response.Write(" ");
Response.Write(str2);
Response.Write(" ");
Response.Write(str3);
Response.Write(" ");
Response.Write(str4);
Response.Write(" ");
Response.Write(str5);
Response.Write(" ");
Response.Write(" ");
Response.Write(" ");
Response.Write(" ");
aashutosh tiwari
|
|
|
|
|
[VS .NET 2005] i want to add by code an image into resource library starting by the path of the image... how?
|
|
|
|
|
You cannot add an image into the resources (.resx) of an application without recompiling the whole thing, AFAIK. This is because embedded resources are actually compiled into the target app.
Perhaps if you describe what you're trying to accomplish, we might be able to help you find an alternative solution.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you!
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
i do that to load an image and set as background for a panel, but it works on my pc where i have got the images then if i run it on another pc it doesn't show background image couse they aren't on the other pc, so i've think to move it into resource:
[EditorAttribute(typeof(MyFileNameEditor), typeof(UITypeEditor))]
[Category("Image state"), Description("Mouse over image")]
//[DefaultValue("")]
public string MouseMovePath
{
get
{
return MouseMove_path;
}
set
{
try
{
MouseMove_path = value;
FileStream fs = new FileStream(MouseMove_path, FileMode.Open, FileAccess.Read);
move = Image.FromStream(fs);
fs.Close();
this.Invalidate();
}
catch
{
MouseMove_path = "(none)";
}
}
}
|
|
|
|
|
|
try this :
http://www.aisto.com/roeder/DotNet/
Use Resourcer. You can add image to resource file.
|
|
|
|
|
Concerning: C#, OdbcDataReader, MySQL, MyODBC
I've built a service which every x seconds performs a series of checks and if they all validate true, it launched a conversion which takes up to 20 minutes.
While converting the service still performs these checks every x seconds and that's all good )
So now I've got like a two-threaded monster; one performing checks while the other is performing a conversion.
ENTER THE PROBLEM:
I'm using MySQL as the database. I use MyODBC to establish the connection and the OdbcDataReader to read my recordsets. OK! The database connection can only have ONE active OdbcDataReader at a time and now my two-threaded monster gets conflicted.
Queries from the checks can't access the database while the conversion has an active OdbcDataReader and even worse the conversion sometimes fails because of the checks |
I've built a simple MySQL class with the methods:
open(...)
query(...)
close(...)
Which I pass round to all the objects (I tried creating new instances each time and I got the MAX Connections Exception'ish Error).
Is there anyone out there who can help my out of this hole I've seem to have dug myself into?
It isn't supposed to be easy, if you know what I mean
|
|
|
|
|
You have two problems:
1. You are trying to share a database connection between threads.
2. There is some database object that you are not closing properly.
Don't try to share the connection. Give each thread a connection on it's own. Actually, don't even hold on to the connection when you don't use it.
Remember to close database connections and datareaders when you are done with them. If you don't, the connection will remain open, and you'll run out of available connections.
---
b { font-weight: normal; }
|
|
|
|
|
hi,
i am programmatically creating a TableLayoutPanel to display some stuff in a windows form. i would like to make the background color different for every other row. does anybody know how to manipulate the colors of a TableLayoutPanel?
thanks,
RC
ps. sorry if this is on the wrong discussion board. i wasn't sure where to put it...
|
|
|
|
|
Hi I am making a program in Visual studio 2005, but I have run in to a problem. The compiler will not accept the following line of code:
string[] strsplit = strFileName.Split(new Char[] {'\'});
The compiler will however accept this line of code:
string[] strsplit = strFileName.Split(new Char[] {'2'});
So the problem must be the “\” character. Is there anyone who knows how to make the compiler accept this specific character?
Nick_L
|
|
|
|
|
\ is an escape character used to create unprintable characters such as the carriage return '\r' and line feed '\n'.
In order to add a \ to a string or char, you must escape that escape character like this '\\' .
|
|
|
|
|
Use @"\"
e.g.
"C:\Program Files\Microsoft" <- wrong
@"C:\Program Files\Microsoft" <- OK
|
|
|
|
|
Hello,
How to save my DataTable, to my HD ?
If I written something like that :
// Create a DataTable.
DataTable table = new DataTable("Product");
// Create a DataColumn and set various properties.
DataColumn column = new DataColumn();
column.DataType = System.Type.GetType("System.Decimal");
column.AllowDBNull = false;
column.Caption = "Price";
column.ColumnName = "Price";
column.DefaultValue = 25;
// Add the column to the table.
table.Columns.Add(column);
// Add 10 rows and set values.
DataRow row;
for (int i = 0; i < 10; i++)
{
row = table.NewRow();
row["Price"] = i + 1;
// Be sure to add the new row to the
// DataRowCollection.
table.Rows.Add(row);
}
And now I want to save my DataTable, to my HD in the current directory with a name like "MyDataTable.mdb" ?
How I code it ?
Thanks.
Tintin92
|
|
|
|
|
Try this to save to XML on HDD:
//Instantiate DataSet
DataSet ds = new DataSet();
//Add the table to the DataSet
ds.Tables.Add(table);
//Write XML output to HDD where filename is full path
ds.WriteXml(filename);
I hope this helps give you a few hints.
|
|
|
|