|
Hi
I am developing Windows Mobile Application, I need a timer to call the callback method , I have used the code below, it worked fine for Windows Application, but device application causing problem.
timer = new System.Threading.Timer(new TimerCallback(OnNextMinute), null,
Timeout.Infinite, Timeout.Infinite);
StartTimer();
}
const long TIMER_INTERVAL = 1000L;
private void StartTimer()
{
// set the timer to trigger an event every 30 seconds
timer.Change(0, TIMER_INTERVAL);
}
public void OnNextMinute(object state)
{
//calling method here
}
Please let me know any other way to use timer in Windows Mobile.
|
|
|
|
|
Hello
Sri harini wrote: it worked fine for Windows Application, but device application causing problem.
What are your problems exactly?
I even wonder how it worked on windows!! Why the Timeout.Infinite?? If you don't want to start the timer immediately, use -1 instead!! Also, why not setting the interval directly -again Timeout.Infinite!!- instead of assigning it to a constant at runtime??
Regards
|
|
|
|
|
Hi,
Im writting an Outlook 2003 plugin. I have some folders with WebViewOn = true, which makes them avaiable to load a web page with a embebed c# user control. All working so far, except for an anoying detail :
All the controls exibit a strange-windows2000-like look and feel. Even text labels are weird, with bigger font. But if i call the webpage from Internet Explorer, all controls look ok.
Does
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
have something to do with it?
Thanks in advance!!!
|
|
|
|
|
Hi All!
I have a programm that when i minimize the form i get a notification icon, i have 2 quastions:
1) how can i make the task from the task bar to disappear.
2) I did an event when clicking the notification icon, how can i restore the form size again to normal? i tried to give it a new size and did invalidate but nothing happened.
|
|
|
|
|
Hello
ytubis wrote: how can i make the task from the task bar to disappear.
this.ShowInTaskBar = false;
ytubis wrote: how can i restore the form size again to normal?
this.WindowState = FormWindowState.Normal
Regards
|
|
|
|
|
i want to know how i can use a header file and *.dll written by C++ in a c# code.
Thank you
Ahmed Ismail
|
|
|
|
|
|
When i attempt to connect to a HTTPS server, i have error.
How to do this?
Help me please!
|
|
|
|
|
Which event hendales the minimize form Event?
Is it MinimizeChanged? if it is,it does not work in my program.
|
|
|
|
|
ytubis wrote: Which event hendales the minimize form Event?
Is it MinimizeChanged? if it is,it does not work in my program.
I couldn't find any such event in the documentation. Can you show us the actual event and the associated documentation?
|
|
|
|
|
The window message sent when a window is minimized is WM_SIZE , so I assume that the equivalent is the Resize event. Check the WindowState property to see if the form is minimized.
The documentation for Form.MinimizeBox confirms that it's the Resize event.
|
|
|
|
|
Hi everyone. I need to obtain the URL of the file that the user clic on a WebControl when it call the FileDownloaded event. How I can obtain this?
Thanks.
|
|
|
|
|
|
hi all
i hv created several controls at runtime but there is an exception thrown that there is multiple controls with the same name
hw to solve this problem
thank u
abdelhameed81
|
|
|
|
|
abdelhameed81 wrote: hi all
i hv created several controls at runtime but there is an exception thrown that there is multiple controls with the same name
hw to solve this problem
thank u
Um. Give each control a different name?
How are you creating the controls? It should be a simple as setting the .Name property for each control.
|
|
|
|
|
by the way i did that
abdelhameed81
|
|
|
|
|
abdelhameed81 wrote: by the way i did that
then you'll need to post a snippet of your code for us to help you further.
Is this an ASP.NET app or a Windows Form application?
|
|
|
|
|
it is an ASP.Net app
and hw can i post a snippet i did not do that before
abdelhameed81
|
|
|
|
|
Hello
abdelhameed81 wrote: it is an ASP.Net app
Then you should have posted it in ASP .Net forum[^]
abdelhameed81 wrote: hw can i post a snippet i did not do that before
A code snippet is a small part of your code that you think it could be the cause of your problem.
To post a snippet:
1- Select the code from your project editor -ie. your Visual Studio IDE-
2- Copy to clipborad -ie. press Ctrl + C-
3- Make a post or a reply here
4- Paste the code -ie. press Ctrl+V-
5- Reselct the code you've just pasted
6- Click on the pre button below the edit control in which you are writing. This will give it unique background and rserve tabs and spaces.
7- If the code is missing some brackets -ie. like < or > - remove the pre tags and click on "Ignore HTML tags..." checkbox below.
Regards
|
|
|
|
|
Hi All!
i have a small program that runs and check if a file exists.
The program is a win app, how can i make the task apear in the right and not as a task in the task bar, i mean in the ToolBar like babylon or anti virus beside the launguage bar.
i am refering in the minimize mode.
how can i do it in C#?
Do i need to draw an icon for it?
Thanks .
|
|
|
|
|
Hi!
You'll need a NotifyIcon for this. I think there's also an article here that deals with the topic.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
Yes thank you
|
|
|
|
|
Hi All. Can someone please help. I am using vs 2003 and SQL 2000. I have to insert about 50000 records into sql. I have tried to use a tread to do this, but when the user say closes the app while the second thread is still running, the app is closed, but the thread is still running and still inserting rows into the database. The code that i used to create a thread is as follows: Thread t1 = new Thread(new ThreadStart(ThreadLoadingData)); t1.Name = "ThreadLoadingData"; t1.Start(); I used the tread in the same class. In ThreadLoadingData i go to different classes for inserting the data. Thera are 5 tables that i must insert into, each one i use a different class. Now i also need to display a progress bar for this, how do i go about solving this problem
Thanks
|
|
|
|
|
Well to close the thread :
t1.Abort ();
This causes a ThreadAbortException you just catch it in the method of the thread (in this case "ThreadLoadingData").
When the exception is caught you just stop uploading.
For the rest, the progress stuff, there is a special class in .net that handles this, I don't have the time to look, but I suggest you take a look online for this in Google or some other searchengine.
Don't you also love the code?
|
|
|
|