|
I save the login IP adress in my Application DB as Long data Type, I want to Retrive it a gain in a report as IP address. can you help me.
merwa
|
|
|
|
|
|
How can i create a folder/file in registry and how can I write in the registry file?
Regards, Qaiser Nadeem
|
|
|
|
|
Hello,
Look at "Microsoft.Win32" namespace, ther you find the "RegistryKey" class.
This Article[^] will help you!
All the best,
Martin
|
|
|
|
|
I set the TopMost property to true in the Load event, and I call BringToFront() in the Activate event.
But these things seem to have no effect. The form appears, but doesn't come to the front or stay in front.
The form Border Style is set to None, so it has no title bar or border.
Does that make a difference?
How do I cause a form to come in front of all other windows, and stay on top?
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Have you tried SendToBack() in the form that opens the modal form?
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
Hello,
I am using TextBox to display some information to user. I made it disable(Uneditable) as restriction.
i want to highlight the text in TextBox but due to Enable = false, displaying the text always grayed.
How can i highlight the text of Uneditable textbox..
Thanks.
gajesh
|
|
|
|
|
Try to set the ReadOnly property to true and Enabled to false and check its behaviour.
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
You can change the backcolor explicitly, so that your textbox will be in the color you choose...
|
|
|
|
|
How do we create a folder by using C#? For example , suppose if we want to create a new folder means , Right click --> New Folder. The same way I want to create a New folder dynamically
|
|
|
|
|
hi,
use following statement
DirectoryInfo obDir = new DirectoryInfo(MainDataDirectoryPath);
obDir.Create();
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
we can create a a folder by using the statement
Directory.SetCurrentDirectory("C:\\");
Directory.CreateDirectory("Foldername");
Direcotry is a class which is under the System.IO namespace.
|
|
|
|
|
It's just
System.IO.Directory.CreateDirectory(@"c:\my directory");
no need to set the current directory ( which is a bad thing to do anyhow, as it can stop the other code from working )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Please - test to see if the directory exists before you attempt to create it:
if (!Directory.Exists(@"c:\foobar"))
Directory.CreateDirectory(@"c:\foobar"); Under certain circumstances, you might still get directory name collisions, but with this method you've at least got a fighting chance.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all,
Plese some body help me out its very urgent,i am trying to update the dataset records into database but its not workinh fine ...
The code i have tried as follows for your reference
Da=new SqlDataAdapter("SELECT * FROM MailsInQueueTest",sqlcon);
SqlCommandBuilder builder = new SqlCommandBuilder(Da);
Da.FillSchema(MailDataset,SchemaType.Mapped,"t1");
Da.Fill(MailDataset,"t1");
foreach(DataRow dr in MailDataset.Tables[0].Rows)
{
if((Convert.ToInt16(dr[0]))==1)
{
dr.Delete();
//dr[3]=1;
}
}
MailDataset.AcceptChanges();
builder.GetDeleteCommand();
Da.Update(MailDataset,"t1");
Thanks in Advance
Chandra Gupta
|
|
|
|
|
on completion of any change you could try something like the following:
DataSet = changedData = MailDataset.GetChanges();
if(changedData != null)
{
SqlDataAdapter.Update(changedData);
}
else
{
MessageBox.Show(" Error ...", "Error");
}
dotman1
|
|
|
|
|
Apologies type in first line of code, correction.
DataSet changedData = MailDataset.GetChanges();
dotman1
|
|
|
|
|
public string TabloOlarakGuncelle(DataTable tablom)
{
using (SqlConnection connection = new SqlConnection("path"))
{
try
{
SqlCommand cmd = (SqlCommand)connection.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT * FROM Products";
SqlDataAdapter da = new SqlDataAdapter(cmd);
SqlCommandBuilder bldr = new SqlCommandBuilder(da);
//da.Fill(Dset, "Products");
da.Update(tablom);
return " Successfully: Güncelle işlemi tamamlanmıştır";
}
catch (Exception exp)
{
return "Error: Hata:aşağıdaki mesajı sistem yöneticisine bildiriniz \n" + exp.Message.ToString();
}
}
}
www.serkannet.com
|
|
|
|
|
Hi All,
I have richText control (my first time using this control ) and i have on it text that contain 10 word.
I need to paint in red color only 4 word of the text.
How can i do it ?
Thanks for any help.
|
|
|
|
|
|
|
download one of the file in my local folder, it downloaded perfectly. And once again I download the same file in the same folder, an error occurs.
I want to check the folder before i download the file. If the file is alredy in the folder , then it won't download in the folder.
Can you give the code for above Scenerio?
|
|
|
|
|
File.Exists, perhaps ? I would have thought the save file dialog would tell you if the file exists
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
jayarajmrj wrote: an error occurs
What error?
|
|
|
|
|
if (!File.Exists(...))<br />
Deja View - the feeling that you've seen this post before.
|
|
|
|