|
The line weight is kinda of too thick. I prefer hairline esp for printing.
|
|
|
|
|
now that I've got it!
I inserted a new statment line (see 2nd line)
cellRange = oSheet.get_Range(oSheet.Cells[excelRow + 2, excelColumn + 3], oSheet.Cells[excelRow + 6, excelColumn + 7]);
cellRange.Borders.Weight = Excel.XlBorderWeight.xlHairline;
cellRange.Borders[Excel.XlBordersIndex.xlInsideVertical].LineStyle = Excel.XlLineStyle.xlContinuous;
cellRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;
|
|
|
|
|
Ok. Thanks for posting the solution.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
using process.start() i opened a .cs file.but i want to set the cursor to a specified line no, is there any way to do this.
thanx in advance.!
|
|
|
|
|
What are you trying to accomplish?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
through my application i want to open the *.cs file in vs2005 and set the cursor to the specified line.
in my application i search a specified text in the given cs file and show the filename and the line no,so i want to allow the user to goto the location of that file opened in vs2005.
|
|
|
|
|
There is already Find functionality in Visual Studio. I don't understand what you are trying to gain or accomplish outside of VS. In any case you would need to use automation and to my knowledge it is not available for execution outside of VS. It sounds like you need to create a Visual Studio Addin rather than an external application.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Interactively, in Visual Studio:
- use menu Edit/GoTo... (or CTRL/G) and type the line number
- when you have an error message in the output pane, double-click it
Programmatically, I don't think there is a way.
[ADDED]
i.e. I am unaware of an API that would support this. You could always try a little automation stuff. I'm not going to elaborate on it, IMO it isn't worth it; however Google knows all about it.
[/ADDED]
|
|
|
|
|
i found a way to open the cs file and navigate to the line i need , it can be done using switches in vs2005.
but there is a limitation , means when the ide is open when you open a file it won't navigate,it can only navigate to the line when the ide is starting up, so need to know if there is any one who knows a solution.
i don't want to open separate ide s for each file.
|
|
|
|
|
You can do it via a Visual Studio Addin. If you'd care to download MoXAML Power Toys (follow the link in my sig), and you can download the source code for an add in that works with source files. There are plenty of samples in there where the code is manipulated via Visual Studio (Note, it's a VS2008 solution, but the code works in VS2005 as well).
|
|
|
|
|
It's built-in, RTFM:
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv" template.vb /command "edit.goto 10"
http://msdn.microsoft.com/en-us/library/xee0c8y7(VS.80).aspx
(Don't use the /edit switch.)
|
|
|
|
|
Hello!
I want to pass an array of double values into unmanaged C code.
Example:
<code>
[DllImport("DummyDll.DLL")]
public static extern int nCalcAll(double* dpData, int Nx, int Ny);
static void Main(string[] args)
{
Console.WriteLine("Call native dll...");
double[] array = {32 * 32};
int result = nCalcAll(array, 32, 32);
Console.WriteLine("...calc all from c dll");
}
</code>
At the line "int result = nCalcAll(array, 32, 32);" it throws a runtime error.
How can I solve this problem?
I've never dealt with Interop before, so any help would be greatly appreciated.
Thanks!
|
|
|
|
|
What kind of error, exactly?
You may need to specify the calling convention as cdecl, the default is stdcall.
|
|
|
|
|
Thanks for all your help!
It was indeed the Calling Convention. When I set it to CallingConvention.Cdecl, everything runs fine
|
|
|
|
|
Blackwurst wrote: it throws a runtime error
I don't think so, I expect it does not even compile as your function invocation (with array) doesn't match the prototype (with pointer).
Here[^] is all you probably need to know, with array examples and all.
|
|
|
|
|
I assumed the code he posted was not his actual code - there is more in there that just doesn't make sense. That array containing only 1024.0 is definitely suspicious, if the second and third arguments to that function are supposed to be about the width and height of the array.
So, I think he just typed an example here
|
|
|
|
|
So I guess I was wrong. Ok, then his code just sucks.
|
|
|
|
|
Did you downvote your own message? That is not supposed to be possible.
|
|
|
|
|
Well, I thought that was Blackwurst..?
I haven't found a good way to vote my own posts, it's impossible from all open proxies I've tried so far
|
|
|
|
|
harold aptroot wrote: Well, I thought that was Blackwurst..?
Possibly one of his mates too, by the vote count. From their combined vote weighting it may have been Rookyworst.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Lol Rookyworst, I actually laughed, not just "the internet lol"
Thanks for testing that for me
|
|
|
|
|
Hi Everyone, Sorry for long code below. I thought it was the best way to express my problem. I would be glad if you could forward me to an article or could just answer the below questions. (in spite of reading many articles.I'm confused about the below issues)
- On click of a button, server/client will want server/client to do something(in addition to what's below) but I couldn't implement it.Errors and Errors
- Is it good practice to use CanRead and DataAvailable properties of NetworkStream not to face with exceptions?
- When server or client want each other to do something(two way job request) Is this implementation capable of handling it?
- On each loop at client side, I open and close connection. Is it good practice?
- Can I determine the size of the byte buffer according to the incoming stream? I currently put a random size
Thanks in advance for your patience and help.
Regards
private void AnaForm_Load(object sender, EventArgs e)
{
thdListener = new Thread(new ThreadStart(listenerThread));
thdListener.Start();
}
public void listenerThread()
{
try
{
string ipAdress = GetIP();
IPAddress IPadres = IPAddress.Parse(ipAdress);
IPEndPoint ipEndPoint = new IPEndPoint(IPadres, 8000);
TcpListener tcpListener = new TcpListener(ipEndPoint);
tcpListener.Start();
while (true)
{
listenerSocket = tcpListener.AcceptSocket();
ntrStream = new NetworkStream(listenerSocket);
if (listenerSocket.Connected)
{
if (ntrStream.CanRead)
{
byte[] byt = new byte[500];
ntrStream.Read(byt, 0, byt.Length);
MemoryStream ms = new MemoryStream(byt);
BinaryFormatter bf = new BinaryFormatter();
hashTableInfo.Clear();
hashTableInfo = (Hashtable)bf.Deserialize(ms);
}
if (msc.Name.Remove(0, 4) == hashTableInfo["MasaNo"].ToString())
{
thdHandler = new Thread(new ThreadStart(handlerThread));
thdHandler.Start();
}
}
}
}
catch (Exception)
{
}
}
public void handlerThread()
{
ntrStream = new NetworkStream(listenerSocket);
try
{
if (ntrStream.CanWrite)
{
MemoryStream msTime = new MemoryStream();
msTime = new MemoryStream();
BinaryFormatter bfTime = new BinaryFormatter();
bfTime.Serialize(msTime, hashTimes);
byte[] bellekSure = new byte[msTime.Length];
bellekSure = msTime.ToArray();
ntrStream.Write(bellekSure, 0, bellekSure.Length);
}
if (ntrStream.CanWrite)
{
MemoryStream msDrinks = new MemoryStream();
BinaryFormatter bfDrinks = new BinaryFormatter();
bfDrinks.Serialize(msDrinks, hashDrinks);
byte[] bellekKafe = new byte[msDrinks.Length];
bellekKafe = msDrinks.ToArray();
ntrStream.Write(bellekKafe, 0, bellekKafe.Length);
urunlerGuncellendi = false;
}
}
catch (Exception)
{
}
}
//Client
private void Client_Load(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
while(true)
{
try
{
tcpClient = new TcpClient("serverName", 8000);
if (tcpClient.Connected)
{
ntrStream = tcpClient.GetStream();
MemoryStream msSip = new MemoryStream();
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(msSip, htTableInfo);
byte[] byt = new byte[msSip.Length];
byt = msSip.ToArray();
if (ntrStream.CanWrite) ntrStream.Write(byt, 0, byt.Length);
if (ntrStream.CanRead)
{
byte[] bytTimes = new byte[500]; ntrStream.Read(bytTimes, 0, bytTimes.Length);
MemoryStream msTimes = new MemoryStream(bytTimes);
BinaryFormatter bfSure = new BinaryFormatter();
hashTimes.Clear();
hashTimes = (Hashtable)bfSure.Deserialize(msTimes);
if (InvokeRequired) this.Invoke(new dlgApplyTimes(applyTimes));
else applyTimes();
}
if (ntrStream.DataAvailable)
{
byte[] bellekKafe = new byte[500];
ntrStream.Read(bellekKafe, 0, bellekKafe.Length);
MemoryStream msKafe = new MemoryStream(bellekKafe);
BinaryFormatter bfKafe = new BinaryFormatter();
hashDrinks.Clear();
hashDrinks = (Hashtable)bfKafe.Deserialize(msKafe);
if (InvokeRequired) this.Invoke(new dlgApplyDrinks(applyDrinks));
else appyDrinks();
}
ntrStream.Close();
tcpClient.Close();
tcpClient = null;
}
}
catch (Exception)
{
}
Thread.Sleep(3000);
}
}
modified on Tuesday, October 5, 2010 8:42 AM
|
|
|
|
|
Message Closed
modified 23-Nov-14 5:54am.
|
|
|
|
|
So can I find the answers to all of my questions with WCF?
|
|
|
|