|
If the program is not running it can't check time and display pop-up
|
|
|
|
|
You can either use SchTasks ) to schedule the start-up of your application at givent time or write you own service to do that.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks I have something with it. Please don't be mad at me when i have a program again with this
You are what you are
|
|
|
|
|
Add a timer, handle its Tick event, compare DateTime.Now.Hours to 1 or 13 and show a MessageBox.
If it your timer continues to fire Tick events when the MessageBox is still displaying (while you are sleeping for example ) then you should create a custom Message Box from Form class and store a reference to it in you application like:
Reminder : Form
{
}
MyApplication : Form
{
Reminder reminderForm = null;
myTime_Tick(...)
{
if(reminderForm != null && !reminderForm.Disposing)
{
reminderForm.Dispose();
reminderForm = null;
}
else
{
reminderForm = new ReminderForm();
reminderForm.Show();
}
}
}
or you should be able to just hide and show the reminder form instead of disposing and recreating it.
|
|
|
|
|
How to get a list of all shared netbios resources of remote computer in the Local Area Network, knowing it's IP? Write please the sample of such code. or show me links to some pages, where i can see an answer on this question. links to some resources, containing code of lan-scanners are also welcome.
p.s. it's C#
|
|
|
|
|
Can anyone please help me with this.
I am building a C# console application that has to read a xml file and download the csv file's to a certain location. All the information is written in the xml file.
So far the reading en displaying the content of the xml file is going OK.
But... I do not know the code to download the csv file from the url in the xml file.
Down here i've attached the code i've written for so far.
Thank u.
= = ==
using System;
using System.IO;
using System.Xml;
using System.Net;
namespace Book
{ ///
/// Summary description for Class1.
///
class Class1
{[STAThread]
static void Main(string[] args)
{ XmlTextReader reader = null;
reader = new XmlTextReader("WTZI.xml");
WebClient client = new WebClient();
while (reader.Read())
{ if (reader.NodeType == XmlNodeType.Element)
{if(reader.LocalName.Equals("locatie"))
{Console.Write("{0}",reader.ReadString());}
if(reader.LocalName.Equals("bestemming"))
{Console.Write("{0}",reader.ReadString());}
}
}
}
}
}
====
Content of XML FILE
<bestanden
<bestand
locatie="">http://www.bouwcollege.nl/Exports/CIBG/GRIP_Doelgroepen.csvc:\temp\WTZI\Doelgroepen.csvhttp://www.bouwcollege.nl/Exports/CIBG/GRIP_Instellingen.csvc:\temp\WTZI\Instellingen.csvhttp://www.bouwcollege.nl/Exports/CIBG/GRIP_Toelatingen.csvc:\temp\WTZI\Toelatingen.csvhttp://www.bouwcollege.nl/Exports/CIBG/GRIP_Toelatingfuncties.csvc:\temp\WTZI\Toelatingfuncties.csvhttp://www.bouwcollege.nl/Exports/CIBG/GRIP_Zorgkantoren.csvc:\temp\WTZI\Zorgkantoren.csv
|
|
|
|
|
Take a look at the documentation of the WebRequest.Create method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thnx so far.
I've checked the WebRequest.Create method. What i want to do is, take the response of the source url put it in the variable and download the csv file to the destination file. De destination is also in a variable.
|
|
|
|
|
Call GetResponse on the WebRequest returned by WebRequest.Create . The returned WebResponse has a GetResponseStream method that returns an instance of the Stream type that lets you access the response data. Read from that stream and write the content to another stream representing the csv file.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Yeah, it seems nice, but since i'm very novice in programming, could you please give me an example how to do that?
Thnx
Marcel
|
|
|
|
|
I could, but haven't the time to put an example together. The MSDN documentation of the mentioned classes and methods contains many example and also continuative links. Take those as a starting point and experiment a bit. It's the best way to learn.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I have a TreeView which will be used like the Visual Studio project explorer.
In Visual Studio, there are different context menu for different kind of items.
How can i do that?
As i can see, i can only use one context menu per control.
Thx,
Nuno
|
|
|
|
|
sinosoidal wrote: As i can see, i can only use one context menu per control.
There is no restriction like that. You can add multiple context menus and set them using the Form.ContextMenu property.
Also, you can access the current context menu using the ContextMenu property dynamically add or remove items from it.....
|
|
|
|
|
Ahh! I see! Cool
Thx,
Nuno
|
|
|
|
|
In a handler for the NodeMouseClick event of the TreeView, remove all the context menu items and add items that are specific for the particular node:
treeView.NodeMouseClick+=treeView_NodeMouseClick;
...
private void treeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
if((e.Button & System.Windows.Forms.MouseButtons.Right)!=0)
{
contextMenu.Items.Clear();
contextMenu.Items.Add(e.Node.Name + " 1");
contextMenu.Items.Add(e.Node.Name + " 2");
}
}
--Justin
Microsoft MVP, C#
|
|
|
|
|
For any given date, i need the start date of the week and end date of the week
in C#.Also i need to get the week number. How to get the week number.
For eg. 17/5/2007 - given date
week start date =?
week end date =?
I need the output as week start date = 15/5/2007
week end date = 21/5/2007
Revathi Raj
|
|
|
|
|
Hi,
DateTime inputDate=...;
DateTime outputDate=inputDate.AddDays(-inputDate.DayOfWeek);
gives you the last sunday at or before the input date.
|
|
|
|
|
Don't start a new thread for every post you write. Continue in the same thread.
Revathi Raj wrote: Also i need to get the week number.
Use the GetWeekOfYear method of the Calendar class.
---
single minded; short sighted; long gone;
|
|
|
|
|
I had problem with listbox in c#:
the problem is i have to listboxes the items in listbox1 moves to listbox2
and next button is pressed it moves to the nextpage if the items in listbox2 are moved back to listbox1 and next button is pressed it should show error message. upto here the functionality is working fine
the problem is there is a link below to delete the items in listbox1
once i deselect the items in listbox2 and then delete the items in listbox1
and press the nextbutton the message is not fired instead it is navigating to the next page.
I used javascript for moving the selected items from listbox1 to listbox2 and for deleting the items in listbox1
i require solution to this problem
any one please help me out in solving this problem
Thanks ®ards
giribabu
-- modified at 0:41 Friday 4th May, 2007
|
|
|
|
|
Please translate your request into English
Sorry, no code, no clear information, no screenshot = no answer.
Are you trying to do something like MS Access table creation wizard?
There are available, predefined columns on the left listbox, and you select,add them to the one on the right in this wizard. There are also, next, back like buttons. What do you want?
|
|
|
|
|
hi all,
i worked in ASP.Net and there i have default 6validators,
and i am happy to work with those,
and now when i wanna Restrict my controls, i didn't found any default validator property
please suggest me the approch, to validate textbox(for now)
thnx in advance
Prashanth
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
hi all,
i need coding for following requierment
input - any date(3/04/2007)
output- start date(1/04/2007) and end date(7/04/2007)
Revathi Raj
|
|
|
|
|
What is the corelation between the input date and the output dates?
|
|
|
|
|
I think U R asking the starting and ending date of the week.
dt.AddDays(-(int)dt.DayOfWeek)
dt.AddDays(7-(int)dt.DayOfWeek)
Here dt is of type DateTime which holds the input Date.
Regards,
Arun Kumar.A
|
|
|
|
|
oh Cool guess the requirements, do you work for my company ?
g
|
|
|
|