|
Hi,
Now, I need to rename the application after build process.
Now, the project name is set to MY.PROJECT.UI because it's major on the UI feature.
But, I need to change the application name to MyProject.exe
How can I do?
Do you have any suggestion?
|
|
|
|
|
Project properties allows you to specify the assembly name.
|
|
|
|
|
It's so kind of you.
|
|
|
|
|
I got it out just now.
Change the Assembly name in the properties window of the project.
|
|
|
|
|
Hello. I'm using the socket class in an application and I use socket.receive
to wait for data. The problem is that the interface gets locked while the
receive method is executing.
I want to see the interface so the user knows what's happening at any time.
Is that possible?
Regards,
Diego F.
|
|
|
|
|
Hello,
Put that socket code in diffrent thread..or it will block th UI until it receives the connection..
Regards ,
Nishu
|
|
|
|
|
Thank you!
Regards,
Diego F.
|
|
|
|
|
I found a problem with that. Now, I can't access the UI controls, as they are in other thread. I get an execution exception.
How can I solve that?
Regards,
Diego F.
|
|
|
|
|
You can use the Invoke method on the control or form to run the method you are calling on the correct thread.
|
|
|
|
|
You might be getting the cross-thread exception.
try this
<br />
public void UpdateMenus()<br />
{<br />
if (this.InvokeRequired)<br />
{<br />
this.Invoke(new UpdateMenusDelegate(UpdateMenus), new object[] { sender, e });<br />
return;<br />
}<br />
}<br />
|
|
|
|
|
Youc can also use BeginReceive and EndReceive to achieve the same. This moves the thread handling to the Socket class. If you are doing lots of operations then you might want to do the thread handling yourself.
|
|
|
|
|
Hello Guys,,
I need to send a int pointer to the C dll . The c coding is as follows
extern __declspec (dllexport) void __stdcall TestIntPointer (int *uiPosition) {
char cMessage[100] = {0};
*uiPosition = 55;
*(uiPosition+1) = 80;
*(uiPosition+2) = 100;
wsprintf (cMessage, "Integer Value Received is :%d:", *uiPosition);
MessageBox (NULL, cMessage, "Hello Sweet Heart", 0);
}
My DLLImport statement is looks like this
[DllImport("TestDLLInvocation.dll", CharSet = CharSet.Ansi)]
private static extern void TestIntPointer(IntPtr s);
Now i need to access all the three int values 55, 80, 100 in my C# coding
How can i do this.. Please help..
Thanks in Adv
Sundar
|
|
|
|
|
You can actually manipulate pointers in C#, in an unsafe block.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I very happy to see your reply. Thanks a lot Christian.
Could you please give me some sample code so that i can understand better.
Thank You
Viji
VIJI
|
|
|
|
|
i need to make update for my program from the internet?
i make folder and add it to iis as virual directory
then i write into my program
string _Path = "HTTP://19.19.19.1/Updateprogram";
file.copy("HTTP://19.19.19.1/Updateprogram/sa.exe","C:\dsds.exe");
but make error : not support this format
what i can solve my probelm
123
|
|
|
|
|
Pretty simple to do, but you need to use HttpWebRequest for this.
HttpWebRequest request = HttpWebRequest.Create("http://19.19.19.1/UpdateProgram/sa.exe");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
StreamWriter writer = new StreamWriter("C:\\Temp\\sa.exe");
while (!reader.EndOfStream)
{
writer.Write(reader.Read());
}
reader.Close();
writer.Close();
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
|
|
|
|
|
Hi Everyone..
I am developing one windows application..I am designing one user control in which I have dataGridview..In gridview I need coloumns of types combobox,textbox..well rest of the things are fine but I that textbox is requrd to be bind dynamically from data base and must have scrollable(multiline) property..can anyone plz tell me how to make it multiline..bcoz in property box i didnt found any such property..
Regards,
Rahul
|
|
|
|
|
Hello,
Rahul83 wrote: in property box i didnt found any such property..
I really can't believe that!
YourTextBox.Multiline = true;
YourTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
All the best,
Martin
|
|
|
|
|
You must look at the properties again
bcz there is a property for multiline
|
|
|
|
|
Hi,
Iam currently converting a exsisting VB6 application to C#. I want include CHM help file in it. How to achieve it in C#. Are there any native methods available in C#. Plz help me out.
|
|
|
|
|
You can use the "System.Windows.Forms.Help" Class.
This class Encapsulates the HTML Help 1.0 engine.
and use this function to open ur chm file :-
Help.ShowHelp(YourParentForm , YourchmHelpFilePath , HelpNavigator)
All the Best
The CodeRider
|
|
|
|
|
Hello!
I have a project in C# ASP.NET. It is some kind of web-office for our clients. I need to forbid caching of all information and put in cache all images in order to save time and money of our clients.
Thank you.
|
|
|
|
|
I am trying to decompress a file. To do this, with my current code which you can see below, I am reading the entire file into a byte[]. But if my file is big, I believe bigger then 64 KB, then I can't declare a byte[] big enough to hold the file. How do I fix this, work around this?
---------Code---------
public void GZipDeCompressStream(Stream InStream, Stream OutStream)
{
//Decompresser
GZipStream gzDecompressed = new GZipStream(InStream, CompressionMode.Decompress, true);
//Retrieve the size of the decompressed file from the compressed footer
byte[] bufferWrite = new byte[4];
InStream.Position = (int)InStream.Length - 4;
InStream.Read(bufferWrite, 0, 4);
InStream.Position = 0;
//Convert to int for using in declaring our Byte[] size
int bufferLength = BitConverter.ToInt32(bufferWrite, 0);
//Create our Buffer: size + 100
------------//This is where my issue is. Buffer Lenght is WAY bigger then the 64 KB limit.
byte[] buffer = new byte[bufferLength + 100];
int readOffset = 0;
int totalBytes = 0;
// Loop through the compressed stream and put it into the buffer
while (true)
{
int bytesRead = gzDecompressed.Read(buffer, readOffset, 100);
// If we reached the end of the data
if (bytesRead == 0)
break;
readOffset += bytesRead;
totalBytes += bytesRead;
}
// Write the content of the buffer to the destination stream
OutStream.Write(buffer, 0, totalBytes);
// Close the streams
InStream.Close();
gzDecompressed.Close();
OutStream.Close();
}
|
|
|
|
|
is long bigger than int in C# ? I thought it was.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This post does not make sense in the context of my question, or you didn't explain yourself well enough.
|
|
|
|