|
how to draw progress bar in "orbit" download in file bottom
thanks
|
|
|
|
|
Where do you want to draw it ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
can i start and stop the sql server programaticaly ?
Reason is , i have to take the backup of the database , at regular intervals. Which can't be done without stopping the service manager.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
|
My database is sql server and front end is asp.net 2.0 c#
May i use the window or web service in this case ?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
SQL server has a windows service running. You need to Stop/Start that. The Service controller class gives access to the services installed on machine. What is the problem you are facing now ?
|
|
|
|
|
I want to start/stop the Sql server service manager programatically
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hello,
By using "System.ServiceProcess" you can start and stop a service:
Like:
public static void StopService(string servicename)
{
ServiceController actService = FindServiceByName(servicename);
if(actService!=null)
{
actService.Stop();
actService.Dispose();
}
}
All the best,
Martin
|
|
|
|
|
what parameter should i write , if i have to stop the sql server service manager
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
You use the stop method as given by martin above and to start you use the start method.
(These won't work under Vista by the way, unless you elevate your app to Administrator using an Application Manifest File.)
Dave
|
|
|
|
|
i created the window app there i was trying to write the system.serviceprocess
i was unable to to write there , the library was tot emerging.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
You need to add a reference in your project references to System.ServiceProcess and then add using System.ServiceProcess; at the top of the class.
Dave
|
|
|
|
|
ServiceController actService = FindServiceByName(servicename);
and there is a problem in FindServiceByName funciton
what should i add for this function ?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sorry, forgot that one!
Something like that:
public static ServiceController FindServiceByName(string servicename)
{
ServiceController actService = null;
ServiceController[] services;
services = ServiceController.GetServices();
for(int i = 0; i < services.Length; i++)
{
if(services[i].ServiceName.Equals(servicename))
{
actService = services[i];
}
else
{
services[i].Dispose();
}
}
return actService;
}
All the best,
Martin
|
|
|
|
|
Thank You....
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hello,
You are wellcome!
But let me say, that I'm sure you would have finished this task much faster by using google.
All the best,
Martin
|
|
|
|
|
Sonia Gupta wrote: Reason is , i have to take the backup of the database , at regular intervals.
You should be using SQL Server's built-in backup facilities rather than trying to back up the data and log files as files. Use SQL Agent to schedule backups of the database and (if applicable) transaction logs.
Many backup products (e.g. Backup Exec) include support for backing up SQL Server through SQL Server's backup API.
If you're running SQL Server 2005 on Windows Server 2003, backups of the files through Volume Shadow Copy services are possible. However, you should prefer to use SQL Server's own backup facilities where possible.
If you want to perform a backup under programmatic control, rather than scheduling a job, you can use the BACKUP DATABASE command.
If you don't fully understand the transaction log, you should set the database to use the Simple recovery model. This will allow you only to restore the last full backup - any operations performed after the backup was started will be lost. If you leave it using the Full or Bulk-Logged recovery models, after performing a full backup through the SQL Server API, the transaction log will retain records of all operations performed in order to allow recovery to the point of failure.
These records are only cleared when the transaction log is backed up through SQL Server's backup API or the BACKUP LOG command. The log is not cleared after performing a full backup. Typically this means that the log file will keep growing, depending on the log growth configuration. If the log cannot grow any more due to hitting the limit configured, having autogrow disabled, or running out of disk space, the server will fail the operation.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
I am displaying an image in picture box in stretched mode.
I want to draw line on the image on mouse click.
As the image is stretched, the line is not getting drawn exactly between point selected.
How can we draw a line so that it is exactly drawn according to the pictureBox clicked points?
Thanks in advance
|
|
|
|
|
Hello,
If you are painting on the pictureBox Graphics object, the "SizeMode" should not make any difference.
In this test project I placed a PictureBox on a Form handelt the Events:
MouseDown
MouseMove
MouseLeave
MouseUp
Paint
bool downok = false;
bool draw = false;
bool end = false;
Point startPoint = Point.Empty;
Point endPoint = Point.Empty;
Pen linePen = new Pen(Color.Red);
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
draw= false;
downok = true;
end = false;
startPoint = new Point(e.X,e.Y);
}
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(!end)
{
if(downok)
{
draw = true;
downok = false;
}
endPoint = new Point(e.X,e.Y);
pictureBox1.Invalidate();
}
}
private void pictureBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(!end)
{
endPoint = new Point(e.X,e.Y);
pictureBox1.Invalidate();
end = true;
}
}
private void pictureBox1_MouseLeave(object sender, System.EventArgs e)
{
if(!end)
{
pictureBox1.Invalidate();
end = true;
}
}
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
if(draw)
{
e.Graphics.DrawLine(linePen,startPoint, endPoint);
}
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
if(linePen!=null)
{
linePen.Dispose();
linePen=null;
}
}
base.Dispose( disposing );
}
All the best,
Martin
|
|
|
|
|
Your best bet is to forget about the picturebox, draw the image onto your screen, and then draw the lines on top, using code similar to the code someone gave you. The key point is that the picturebox becomes a waste of time, just draw direct onto your form in your paint event.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
As my subject says all that I have been struggling with the same exception as "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".
The scenario is I am using socket programming to send some data to the client machine from my server using a web service. I have tested around 50 odd cases in which the same exception is raised in around 10 cases and rest is delivered successfully.
Can anybody help me out with this exception? Exception details are pasted below -
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)
As far as fire wall and antivirus is concern, as mentioned before few cases are reaching to the client machine and few are not. So can anybody help me out of this problem.
Thanks in Advance....
Ankur
|
|
|
|
|
It seems that your connection timed out
SkyWalker
|
|
|
|
|
hi everyone,
can i fix the column width of the listview? example: i have Column1 width=100, Column2 width=200. i don't wan't the user resize the column? because i have some column hidden. hehe. is there any property of listview no resize column?
Thank You.
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
I can't remember if there is such property but if there is not, you can handle ColumnWidthChanging event of the listview class and cancel the event
|
|
|
|
|
Hi,
I would like to customize the display i receive from datetime time picker into a message box.
That is my motive is to display the date in a message box in 0131 format ie mmdd.
But right now it is displaying as 01/31.
Am working in C#.
Is there any way to do this and how.
I have treid these but its no good.
string str1 = string.Format("{0:mmddyy}",dateTimePicker1);//string.Format("{0: mm}",str);
//MessageBox.Show("The Name of the Database is CustList_PGE_" + dateTimePicker1.Text);
//MessageBox.Show("The Name of the Database Table is CustList_PGE" + dateTimePicker1.Text+08);
Thanking you
|
|
|
|