I've created an application that uses panels with images as background having a pretty good looking application at the place of the normal windows xp style...
But when i resize it, or i wait to see it ended to load on start, or in all the other time that it is called on paint event, i see flicker the panels that uses images as background.
Sometime i see it all black before fully end to draw the image or i see just the border.
Why? How can i avoid it? (i use double buffer too)
Ok, I have the following problem. A function is called asyncronously in the program, and someone told me that is done in a new Thread. Inside the function I want to open a new form but it crashes when I try. So i decided I have to open the form in the main thread. Can anyone please tell me how can I do just that? Thank you.
If you include the reference to Word in the project, all your project will generate is an interop file for Word. You won't need a license for that. To be able to use Word on a target installation machine, the machine must have Word already installed. So I don't think you will have any licencing issue. Also, I don't think your operations on Word (in the application) will work if the target machine does not have MS Word already installed.
After 2 hard week of work, finally i accomplished an reliable server and client classes which look like the VB Winsock, those 2 classes are reliable, also server enable multiple connections, as i test it accept 5000 connection and Handel them,
When i try to create an demo app. on these 2 powerful classes, all goes fine, i faced an problem in sending files, as I'm using one channel only between server and client, i.e. each client have only one channel, this channel Handel both data and commands, we can distinguished between them, that command will always contain [#<cmd>#] tag before the command itself, so in the OnDataReceived event, we convert the byte array to ASCII string to search inside it, if we find the prev. tag then this a command else we just use that array to put on file or something, the logic is tested before on my prev. vb6 app.
Here an scenario of connection,
1- Client connected to server, server add its info to listview,
2- Server request from client to capture desktop screen
3- Client receive the command and capture the image convert it to JPEG, and then add to that array the following tag at the end of array [#<eof>#], which help us to detect the end of file.
4- Client tell the server that it ready to send, given to server the length of image array without the length of tag,
5- When server receive readytosend, it the client socket info to helper class which contain the socket id, image size, and memory stream, which contain image chunks,
6- then Server send the client an message ready to receive, in this moment client start sending data chunks in order of 1024 Byte per time,
7- Every time server receive data it check if its EOF or not, if its, remove the EOF tag, and all nulls, and write the last chunk to the image,
The problem is the image in coming deformed, also some times length of incoming data become greater than length saved from client in early steps, i.e. an **** on line collected while getting data,
After hard work, i try to put an execution delayer, using Thread.Sleep(0), and the surprise that its finally work, and the image size is correctly, and image is nice, But all this in LAN, when test app on Wan all goes bad again, i think the problem not the delay, but delay here prevent some bad thing to happen, i want to know why server put extra data on the image stream, from where these extra data come, Am I Missing Something.?!?!?!??!?!?!?
All i need, Any one test this code, its amazing, very exciting and commented, will learn you a lot, all i need is to detect the reason of that bugs,
To know what I'm talking about, In the server side in the OnDataReceived even, try to comment the Thread.Sleep(0); and try to get an image, you will got ****, if you put that line again all goes fine, and if you put it, and test it on Wan it will cause problems again, So there is something wrong, and i don't know it
Please any body help me finding that error.
Here is the link of the code, its written using C# 2005, Right click and choose Save Target As...
Ok, trying to loop through a treeview and create connection to each node(pc).
Am running a new thread to do this loop as it is taxing on the application.
PcTree = new Thread(new ThreadStart(enumThread));
PcTree.Name = "PollPCList";
When I look at the output of my node looping I consitently find 3 connections to each node. After trying to step thru the debugger i find that sometimes it does keep this pattern(3 connections), other times i only see one loop for each node. (how odd is that?) -- why is this happening? is it due to the fact that i'm running this on a dual-proc pc?
now, that obviously is the problem, here is my question:
if i haven't done something wrong with my code and i'm stuck with this 'triple threat thread' then is it possible that i increment the foreach loop so that i process 3 different nodes instead of just one node 3 times?
I have a number of custom forms and controls that rely on runtime information to do their job. In cases where these items do their setup in the constructor, bad things happen when one of these is displayed in the designer.
Currently, I use the following code to determine if my item is running in the designer:
One of my dialogs is behaving as though the alt key is always pressed. Typing the letter of any of the shortcuts for a button triggers the button regardless of which control currently has focus. None of the other dialogs in my app behave this way, and flicking back and forth between the affected dialog and the remainder's property pages I'm not seeing any relavant seeming differences.
Im having a problem where i need to show a dialog box(save open cancel dialog box) from a pop up aspx page. on link button click i have opened this dialog box, I have register the script to close tat pop up aspx page which is loaded with the user control.
Is it posible to close the popup window after the dialog box appears.
OK. I assume there's a way to interop out and get a list of all the processes on the machine so I can kill the other 3 processes associated with the app. They've all got constant names, and there can only be a single instance of each which should make things easier, or less difficult at anyrate.
Last Visit: 31-Dec-99 18:00 Last Update: 6-Oct-22 14:08