|
I think it has something to do with oledb. Can you try the following with that byte array?
byte[] data = ...;
ASCIIEncoding.GetString(data);
WM.
What about weapons of mass-construction?
|
|
|
|
|
I wrote a program needs to connect to remote servers,
my problem is - my program throw an exception when i try to connect from firewalled or proxy environment. the question is:
How can i import IE settings to my program?
OR "at least"
How can i the proxy settings in my program?
please help me with a piece of code or at least ClassName
please reply...
|
|
|
|
|
Well, as far as getting the proxy settings from IE -- You can grab the ProxyServer value from HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer (REG_SZ); how you use this depends on what you're connecting to obviously...
<br />
RegistryKey key = Registry.CurrentUser;<br />
key = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings");<br />
Console.WriteLine(key.GetValue("ProxyServer"));<br />
-- modified at 7:07 Monday 16th October, 2006
|
|
|
|
|
Thanx,
but i still can not establish a connection becuase i cannot use that value or where i can use it in my connection
//establish TCP connection
try {
CallTrace(" Connect at port {0}", port);
serverTcpConnection = new TcpClient(popServer, port);
} catch (Exception ex) {
throw new Pop3Exception("Connection to server "+ popServer + ", port " + port + " failed.\nRuntime Error: "+ex.ToString());
}
|
|
|
|
|
I don't know how to play a sound from my program.
Example:when i click on button to play a sound.
I have Visual Studio 2003.
Help.
Vasildb
|
|
|
|
|
Hi Vasildb,
put this in a static class:
public static bool Play (string filename)
{
return PlaySound (filename, IntPtr.Zero,0x00020000 |0x0000);
}
///
/// Plays A sound
///
/// <param name="szSound" />
/// <param name="hMod" />
/// <param name="flags" />
/// <returns>
[DllImport("winmm.dll", EntryPoint="PlaySound")]
private static extern bool PlaySound( string szSound, IntPtr hMod, int flags );
Got it from a forum and work perfect
Nassos
GanDad
|
|
|
|
|
Hi all,
I retreive some data (Attendance data) from SQL Server and show it in dataGridView object. After that, I want for example use the data to count the number of attended days and absent days for a single person. There is time and date column, and I want to use it to calculate attended and asbsent days without sending additional query, Just use the retreived data in DataGridView for that pourpose.
Example for a single row with data :
FingerprintID | DateTime | FunctionKey | InOut
11200 7/12/2006 11:44:00 AM 1 Yes
It's important to know that I can't modify the current database structure, I have to use it as it is.
so, how can I do that?
|
|
|
|
|
If you're using a dataset to display the data you can iterate through the rows in the datatable inside the dataset that is being displayed. There you find these fields that can be used to calculate the absent days, etc.
e.g.:
foreach(DataRow row in dataSet1.Tables["SomeTable"].Rows) {<br />
<br />
}
WM.
What about weapons of mass-construction?
|
|
|
|
|
i think it is a simple question but i am not able to figure it out.
My problem is that i am using a combo box in the form and i have only two items predifined in it. I want the user to choose only one of these two items and not being allowed to change or right in the combo box. Meaning i want the combo box not to be editable.
N.B: i am using VS2005
Thanks in advance
jamil abou khalil
|
|
|
|
|
u can make the combobox select only
by changing the dropdownstyle property to dropdownlist type.
rahul
|
|
|
|
|
Thanks it worked
Jamil abou khalil
|
|
|
|
|
Hi,
here is the syntax,
MessageBox.Show (IWin32Window, String, String)
what is the actual purpose of IWin32Window interface, Can i use this close the message box if the user not reponding for certain period of time,
my requirement is when the user clicks logout button on my application. i have manually close the already displayed messagebox and have to show the login screen. Is there any option to manually(thru code, as like as user pressed cancel button on the messagebox) close the message box.
Note: Here iam not talking about timeout messagebox, i want to manually close the message box.
Thanks and Regards,
Srini
|
|
|
|
|
IWin32Window is used to display message box infrontof specific control
e.g.
you have two forms form1,form2. and if you want to disply your message in front of other form . so simple pass the object of that form in the MessageBox.Show(); function
sameer
|
|
|
|
|
Thanks!
modified 28-Sep-16 7:31am.
|
|
|
|
|
Are you looking for code or for an existing app? If the latter, you're in the wrong forum.
|
|
|
|
|
Hi
How can i get the field names of a table ( only field names not the data) in MsAccess? What will be the query???
regards
sAqIb
|
|
|
|
|
hi
try to make a select statement with impossible condition.
ex: select * from myTable where 1=2
Tamimi - Code
|
|
|
|
|
|
could you explian more !!
DataSet ds =new DataSet();
SqlDataAdapter ad = new SqlDataAdapter("select * from myTable where 1=2",connection);
ad.Fill(ds);
for(int i =0; i<ds.Tables["myTable"].Columns.Count; i++)
{
string str = ds.Tables["myTable"].Columns[i].ColumnName.ToString();
}
Tamimi - Code
|
|
|
|
|
How can I know whether the mailid provided is valid or inavlid mailid using smtp server in C#
bhanu
|
|
|
|
|
Dear programmers
i have a appilcation which have multiple forms i w want to add help file to them.
when user press F1 the help file should open and respective form topic should be open
can any one done this thing before or have any idea how i can do it how can i create help file.
i am waiting for ur responses
sikandar
|
|
|
|
|
There a Number of Help creater(HelpScribble..etc) available on the market.either you can download them from net. these'll help to create HTML Help files(Help.chm).you can access them by
Help.ShowHelp(this,path);
sameer
|
|
|
|
|
Sir,
In VB.Net The keyword Redim is used to modify the array at runtime.I have an array in C# .Now the problem is , i need to modify the array at runtime .How can i implement that?
Please help.
Thanks
|
|
|
|
|
Modify in what terms?
Increase the size or something else
If you want to increase the size u better use the Arraylist which
grows dynamically.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
ok Sir , I will use theArrayList.Can u please give an example that illustrates how to dynamically increase decrease the array size using ArrayList.
Thanks
|
|
|
|