|
Hello
I've already been sending images across LAN networks using sockets, but strangely I didn't face your problem!!
Your post raises some points:
1- Try checking your method of sending data. Do you send other data than images? Are there any problems in any of the other types?
2-Are you sure you are reading the bytes of the image corectly? Try after reading the data, and just before sending it using the NetworkStream, try to convert it back to Image, see if it works.
3- I have been converting my data from Bytes to strings using Encoding.Default.GetString() method before sending them across the NetworkStream, maybe you would like to try this
4- If you still having problems try to use the Socket.Send() and Socket.Reveive() methods instead?? perhaps??
I hope this was helpful.
|
|
|
|
|
CREATE PROCEDURE MasterProc
@className nchar , --Class Name to load.
@pList nchar
AS
EXTERNAL NAME MasterClassAssembly.MasterClass.CallClassSP
EXEC MasterProc 'PInfo','1'
CallClassSP is a method in MasterClass(regitered as SQL Server assembly) which dynamically loads a class based upon the parameter passed in the Stored Procedure.
When trying to run a CLR Stored Procedure, I am gettting the following error.
Msg 6522, Level 16, State 1, Procedure MasterProc, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'MasterProc':
System.Security.SecurityException: Stack walk modifier must be reverted before another modification of the same type can be performed.
System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Assert()
at MasterClass.CallClassSP(String className, String sList)
Thanks for the help
Anurag Jain
|
|
|
|
|
I am using a DataGrid control (from SyncFusion) and want to allow users to
(1) copy cells from one part of the grid and paste it to another part of grid
(2) copy cells from an Excel and paste it on the grid
I am kinda new to gui development and have to maintain this code. I'll appreciate your help.
Thanks
Dinesh
|
|
|
|
|
I have made an application in C# that uses a lot of PInvokes to the Win32 that create shared memory using VirtualAllocEx and more. I have a pretty bad memory leak now. Surprise! I have no experience dealing with this problem. What is the best way to find memory leaks in NET? Or do i simply try random things and cross my fingers?
|
|
|
|
|
If you're using native calls to allocate memory, you need to use the same to deallocate it as well.
|
|
|
|
|
Hallo,
I saw that ddraw was removed in dx9, so we must use d3d to create 2d-games/graph.
Ok, I read about textures and sprite.draw2d etc.
The problem is:
I use, for test, mspaint to draw the sprite (bitmap 256 colors) with white as a background color.
I didn't understand how telle to d3d to remove the background and draw only the sprite, say a red man on white background: how can I draw only the man without the white background??? Using alpha color for black: Color.FromArgb(0xff,Color.White).ToArgb(); d3d draw the white color as a black opaque and no trnasparent, so the sprite background cover the scene-color.
In simpler words when I draw the sprite in a device cleared with color blue the result is: the device totally blue and in the middle a black rectangle with the red man inside.
Hope I explained right
Thank you
CometKeeper... A Dreams Guardian... (Italy)
|
|
|
|
|
is there any way to send a file from one program to another program each running on different PCs of lan.........i have done it using sockets but its a byte reading procedure....and i have to write it to a file ....i want to send file which the other program should reccieve as a whole in some file object
jadoo
|
|
|
|
|
Map the network drive. Add the code to copy the file from a local drive to the mapped network drive.
Best,
Jun
|
|
|
|
|
can i get some code for it
jaadoo
|
|
|
|
|
|
how can i make my project(csharp) a service on window....which automatically starts running as the system sarts
jadoo
|
|
|
|
|
Follow these steps:
1) Create a Windows Service project.
2) Installe the service you build. The code generated will tell you which command line to install/uninstall the service.
3) Configure it to automatical start using MMC or any other control tool.
Best,
Jun
|
|
|
|
|
File/New -> Project. Find the Windows Service project...
You'll probably have to start converting your code to run on a seperate thread. Windows Services normally create a seperate thread to run their code on. Do NOT just put your code in the OnStart event. You'll get some interesting errors and behaviors if you do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I needed a little help with running a embedded resource i have a embedded .exe file that i want to execute during the form1_load but i looked everywhere on how to run a embedded resource but all i found was info on loading pictures that are embedded resources. Could anyone help me out please all info is appreciated.
|
|
|
|
|
The last post from Steve Hansen at the bottom of this article[^] shows how to extract and run an embedded exe.
josh
|
|
|
|
|
Thanks for the info i was reading that and it said that it only worked for other .net applications. Is there any other methods i can use to execute a app that is not .net??
|
|
|
|
|
Hi all,
I have a form (we'll call form A) which I need to hide because it takes 4 seconds to load. I have created another splash screen form (Form B) to cover form A and hide it while it is taking it's sweet time being created. I have to create Form B modeless so Form A can continue to initialize. Once Form A is finished I cannot figure out a way to return focus back to Form B which is covering Form A.
Any suggestions???
BTW: This is a continuation of the OPACITY nightmare from yesterday!
|
|
|
|
|
Try to clarify a couple of things:
Cubzfan wrote: I have to create Form B modeless so Form A can continue to initialize.
Have you checked if Form B modeless is necessary for Form A to continue?
Cubzfan wrote: Once Form A is finished I cannot figure out a way to return focus back to Form B which is covering Form A.
Do you mean "Once Form A is finished I cannot figure out a way to return focus back to Form A which is covered by Form B"?
Best,
Jun
|
|
|
|
|
Jun,
Thanks for the reply. Answer to the first question is yes. As I stated, if form B is Modal form A will not be created. Answer to question 2... what I wrote is correct. Form B covers Form A, I've set Form B to "Topmost" so it will reamin on top of form A.
Form B splash is only there to cover Form A while it is being created.
1. Form B comes up first (modeless to allow Form A to continue being created)
2. Form A is initialized and starts to appear behind Form B.
3. Form B has a "Next" button when clicked causes Form B to be destroyed.
4. Form A is the only thing left looking good and ready to go.
Problem is since Form A is created after Form B it has focus and will not give up focus so user can click "Next" button on Form B.
Who's on first???
|
|
|
|
|
It looks good, but I think the Next button is something that causes unnecessary complexity. For example, if Form A is not done initialization, the button has to be disabled. I would just get rid of the button and do the following:
When Form A is created (by Form B or any third party), pass the instance of Form B to Form A. When Form A is done initialization, it closes Form B using its instance.
A slightly different approach is starting Form A first. Let Form A create Form B to cover itself. Then Form A can close Form B whenever it needs to. This would further simplify your design.
This way, there is on focus transfer issue.
Best,
Jun
|
|
|
|
|
Search the articles for "splash screen" and you'll find a bunch of examples of this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
try this:
void InitMethod()
{
Form B = new FormB();
A.Hide();
B.Show();
//Initialization code...
B.Close();
//Carry on with FormA
}
|
|
|
|
|
i have made a program that works as follows
1->i browse some csharp project and open the main .cs file
2->the program compiles that project and reports errors as we compile in .net compiler
i want to make my program work in this order
1)select a project of csharp
2)the program should divide the project into independently compileable parts
3)then it should display a list of those parts
4)on selecting one part it should compile that part
5)then after compiling all parts on selecting one by one it should link all the seperately compiled parts to generate exe and show the output
jadoo
|
|
|
|
|
Why not wait for a reply to your original posting before asking again!!
|
|
|
|
|
Hi:
I am programming in C# and wondering if there is a simple way to have direct communications between 2 programs on the same PC.
Here's the scenario I am thinking of:
1. Program a and program b are installed in a machine
2. progA is launched
3. progA needs some information and launches progB if needed. If progB is already launched, progA does not relaunch progB, but uses the active instance of it.
4. progB provides the information to progA.
5. progB is available for any other program progC etc. that want to call it for information
6. progB terminates only when the machine is rebooted.
I hope my weak terminology is still comprehensible. Please could you give me tips on how to launch progB from other programs and how to leave it on (not be a child of the lauuncher), and how to initate communication with progB if an instance is already running.
Regards, smurfy
|
|
|
|