|
If I get you correctly, you ask me to use two tick event. Yes I think that. But one of tick event execute only one time, stop it after 2 minute.
And also I do all those things in constructor method.
I appreciate your help all the time...
Eranga
|
|
|
|
|
No, not even remotely.
The timer has an interval property. Inside your tick event, set the Interval property to the value you want it to be after the first time it fires.
All I am suggesting is you do something like
Timer.Interval = 2000; // 2 seconds
inside the tick 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 )
|
|
|
|
|
Ok, I got the point and I'll try it now.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Hi to ALL...
i have one doubt regarding to my project ...i have one compiled socket source code .In this source code are fully worked Windows XP...but in this code is not suitable for vista(not compiled)..
what is the problem for this ?
Whats the solution for that?
Is there any DLL corruption or not?If it is yes what kind of DLL add that problem ..?
....Please give your suggestion or any URL ...
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
What's the actual issue ? Sounds to me like Vista is blocking your sockets. If it won't build under vista, then post your errors.
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 thanks to your replay ..thats no error displayed ..its executed when i clicked one event ..that action is terminated in vista ..but in XP its worked thats the problem ...
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
OK, so your program doesn't work in Vista. Welcome to the club. You need to learn how vista permissions work and investigate how to change your code so it works in Vista.
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 )
|
|
|
|
|
yes ..its absolutely correct ...but how its possible
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Hi friend i am waiting for your replay!!!
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
I'm sure you are. At this point, I'm not sure how you expect that I'd have any idea of what your program does, what the error is, or anything else that I could use to diagnose the problem. I'm also logging off for dinner, why not get the exact text of your error message, and type it into google ?
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 Friend Thanks to your Replay....Actually Mr .Christian its not displaying any error ...the output of our project is one kind GUI.In Windows XP when i Clicked that application its worked ..At the same time In Vista i Clicked that application its suddenly terminated ...this is my problem thats why i am not search in google...
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
OK - well, I guarentee that I have absolutely no idea what's going on, how can I ? Have you checked the event log ?
Worst case - get a dev environment in Vista, and debug it to see what line it fails on.
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 )
|
|
|
|
|
k Christian ..i ll check it ..please send your mail address ..
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: please send your mail address ..
Why should he do that? SO you can pester him in private!?
People here are volunteers and the answers go on the forum so that if someone with a similar problem arrives they can see there is already a solution. Asking for a private email correspondance is somewhat inconsiderate of other users. If you want private assistance then pay for it. If you want free then respect the people who are available to help.
|
|
|
|
|
rowdy_vc++ wrote: Hi friend i am waiting for your replay!!!
You waited about 45 minutes for a reply! Get a grip. If you want a response that fast pay for it. People here are volunteers who spend their spare time to help. They are NOT at your beck-and-call whenever you want them.
You were given a suggestion to follow up, but it seems you were too lazy and started to pester people instead. Just to recap, the suggestion was: "You need to learn how vista permissions work and investigate how to change your code so it works in Vista."
|
|
|
|
|
loading pages should be showed before the next page data are loaded. help me friends.
How may i know calculate the next page controls are loaded?
Is there any methods to find out this problem?
Note: I don't want using ajax controls
Gopinath.R
|
|
|
|
|
vingo_mail wrote: Note: I don't want using ajax controls
1 - post in the right forum ( asp.net )
2 - if you don't want to use the technology that solves your issue, then I guess you just have to live with it. AJAX is the ONLY way to show something on your page while the server is in the process of sending new data.
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 )
|
|
|
|
|
Hello
I am new to XmlSerializing and I got a problem when trying to serialize a nullable int.
The thing I serialize look like this
private int? length;<br />
public int? Length {<br />
get { return this.length; }<br />
set { this.length = value; } }
But when I serialize this, and it is null, the output looks like this:
<Length d3p1:nil="true" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance" />
What I want it to do is, when the int is null, I want it to be ignored and thereby not having any output to my xml-file.
I could make my int to a string and then convert the string to an int whenever I need, but that doesnt seem to be a good solution to me.
So, does any of you know a way to XmlSerialize an int and then if it is null, it shouldt be showed in the xml-file, or a good article/something?
//QzRz
|
|
|
|
|
To play a AVI stream I use this code in c#:
const uint WS_CHILD = 0x40000000;
const uint WS_VISIBLE = 0x10000000;
const int ACM_OPEN = 0x400 + 100;
const int ACM_PLAY = 0x400 + 101;
IntPtr handle = CreateWindowExW(
0,
"SysAnimate32",
null,
WS_CHILD + WS_VISIBLE,
0,
0,
300,
300,
windowHandle,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero);
SendMessageW(handle, ACM_OPEN, streamhandle, id);
SendMessageW(handle, ACM_PLAY, -1, -1);
...
DestroyWindow(handle)
This works fine in XP, 2003,... But in Vista and Longhorn, the stream is loaded (the background is painted), but not every AVI is played, some are, and some are not. Is there something I missed?
|
|
|
|
|
Hi,
just a guess, but what about codecs? Do you have the same codecs installed? Do the movies play with Media Player?
Cheers,
Chris
"Obstacles are those frightening things you see when you take your Eyes off your aim"
- Henry Ford
Articles
Blog
|
|
|
|
|
I do not thing codecs are the problem. Let's take the example of shell32.dll. Here the AVI resource with id 165 is playing in Vista, but the one with id 162 (the Avi one sees when files and/or folders are deleted) is not. When I delete a folder, I do see the animation (so I presume the codec is installed); when I want to play the animation in another window, I only see the background.
|
|
|
|
|
I want to show a dialog box, that I've created in visual studio when data has arrived from a socket.
I'm using Socket.BeginRecive and passing it a callback method OnDataRecieved.
When I try to show a dialog to get user input upon data received it. The dialog works fine when it's opened via a button on the main form.
This is the code I'm using to get the form.
<br />
RestoreDeleteDialog form = new RestoreDeleteDialog();<br />
form.ShowDialog();<br />
After I've called BeginReceive() and the event method has ended (ie it's stopped executing the code I've written and is sitting their waiting for an event such as button click or an incomming packet) it will crash with this error:
InvalidOperationException
"The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone)."
If I change the above code to form.Show(), ie so the form is not modal, (which is what I want the, as I don't want the netcode blocking for user input) form will not load and will just be a white window. I've put break points in the code that I've written and there are no infinite loops or anything like that. This happens after the constructor and the form load events have run, when my code has exited.
I'm thinking this problem is being caused by a problem threading, as BeginRecieve() is presumably going to be running in another thread, but I'm not really sure about the inner workings of the non-blocking socket methods, or about how I might spawn the dialog off in another thread with out it causing this error.
Anyone got any ideas?
|
|
|
|
|
Hello
When drawing on a PictureBox, I try to do something but I don't know if it's possible
In fact I try to do TWO operation in the same process
1- Update the ground image of my PB drawing some new elements using one graphics
2- Add some temporary elements on another layer using another graphics
Below is my code
At the end I do
this.pb_cont.Image = cityImage;
This will save my new ground image but it also hide whatever I draw on the other Graphics
How can I avoid that ?
Is it possible to re apply graphicsT content on the PB
With my poor knowledge I thought to do this :
GraphicsState OldG = graphicsT.Save();
this.pb_cont.Image = cityImage;
graphicsT.Restore(OldG);
BUT the compile do not even recognize GraphicsState ??
What is my mistake ?
Thank for your help
private void DrawCityList(DataSet cityList,SolidBrush AskBrush,int size)
{
cityImage = new Bitmap(this.pb_cont.Image);
Graphics graphics = Graphics.FromImage(cityImage);
Graphics graphicsT = pb_cont.CreateGraphics();
foreach (AddrList cAdr in AddrLst)
{
graphics.DrawEllipse(Pens.Blue, cAdr.X - 1, cAdr.Y - 1, 2, 2);
if (cAdr.active)
{
if (AskBrush != null)
{
graphicsT.FillEllipse(AskBrush, tX - size/2, tY - size/2, size, size);
}
}
}
this.pb_cont.Image
|
|
|
|
|
Hi everyone.
I'm trying to build a session enumeration for a asp.net site, meaning that i can see all live session and their objects of the session, at start i built a IList of httpsession that i add to it the session every time its created, the problem is that when the session has changed(like adding a new object to the session) the list is not updated with the changes it just stays like the same point when it was added. i need a linked collection that a can add objects to it but when the object change it should be seen in the collection too.
can anyone help please?
thanks.
|
|
|
|
|
Ok say you have a column Firstname... I know how to list the column firstname in the list box and it list all the data from that column in every row in the list box.
What I am wanting to do is for ONE Row.. have up to five phone numbers that you can list in the listbox. This is not in any of my books and having problems finding out how to do it.. I would have to probably have columns for phone numbers one through five then use a foreach items in listbox to store the numbers in there.. Can someone direct me on how to do this?
Basically instead of having five textboxes for phone numbers I have just a listbox. Using the display member and value lets you choose a column and list everything in that column for every row. That isn't what I want to do.. thanks in advance.
|
|
|
|