|
Hi,
Change your method to return the value directly
public static void ConnectToDMV(string TranRec)
public static string ConnectToDMV(string TranRec)
Alan.
|
|
|
|
|
Tried that but it caused other problems in the code.
I fixed the problem by doing the following in form1.cs
namespace DMV_Access_App
{
public partial class Form1 : Form
{
public static string logLU;
public Form1()
{ Rest of form1.cs code ...
This took care of the problem. Seems so simple. Of course, being a newbie, I am not sure what ramifications there are but it does work. This is great forum!

|
|
|
|
|
As an example I have two categories in a property grid. One is read-only and the other is editable.
I use a timer to automatically update the properties in the read-only category, approximately every 100msec. However for the updated values in the read-only category to be displayed properly I have to do a PropertyGrid.Refresh() call. This moves the focus inside the property grid, so if I'm editing an editable property I lose my focus anytime the timer fires.
Is there a simple way to work around this?
|
|
|
|
|
Have you tried using the respective ActiveControl and SetFocus methods?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Won't the ActiveControl always return the property grid? I'm losing focus within the property grid, not from the property grid.
|
|
|
|
|
Yeah, you're right.
I'm sort of guessing here; I misunderstood your original question. How about the SelectedGridItem property?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Yeah tried that. Didn't seem to do what I want.
|
|
|
|
|
I want to know if its possible to automate the System.Windows.Forms.WebBrowser and make it running in multiple threads.
I mean I want to login to say mysite.com , using 5 different accounts, Is it possible to do that simultaneously with 5 web browsers in 5 threads maintaining seperate sessions with the server of mysite.com,
Wont the sessions overlap with each other?
|
|
|
|
|
No, it's not. The WebBrowser will only work on the UI thread.
You don't need 5 seperate threads for this. Just 5 seperate WebBrowser controls.
indianbill007 wrote: Wont the sessions overlap with each other?
No.
|
|
|
|
|
Hi,
I am executing my windows application in Windows 7.
When i change the size of text to 125% or more, Window screen dosnt display properly.
|
|
|
|
|
I'd get a monitor that's 125% bigger.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
ohhh thanks for the reply
pavan
|
|
|
|
|
|
Please forgive me if this is a simple question -- I'm pretty new to C#.
Here's a quick code snippet that tries to take advantage of the ClearQuest API:
ClearQuestOleServer.SessionClass cqSession = new ClearQuestOleServer.SessionClass();
cqSession.UserLogon(login, password, dbName, (int)ClearQuestConstants.SessionType.AD_PRIVATE_SESSION, "");
object cqEntities = cqSession.GetEntityDefNames();
Now, when I run through this in the debugger and watch cqEntities, I can see that it's an array of strings (the "Type" field even claims that it's an "object {object[]}" type, with each item within it an "object {string}" type), but C# won't let me cast cqEntities as a string[], nor will it let me use cqEntities in a foreach (since it's not enumerable). What can I do to get at the stringy contents?
Thanks for any help you can offer!
|
|
|
|
|
I am not clear on your problems and I don't know the API:
object cqEntities = cqSession.GetEntityDefNames();
change to
String[] cqEntities = cqSession.GetEntityDefNames() as String[];
foreach (String str in cqEntities)
{
Console.Out.WriteLine(str);
}
Just let me know if it works
|
|
|
|
|
No, sadly, it doesn't; it merely sets up cqEntities as an array of nulls. Thanks, though!
|
|
|
|
|
Just a guess, but if you cast it (preferably with "as" and a null check) as an object[] first, you can then cast each element as a string in a foreach.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
I'm having some luck with this one. Thanks! I should have thought of casting the function call as an array of objects myself!
modified on Thursday, December 17, 2009 10:29 AM
|
|
|
|
|
If you hover over the "GetEntityDefNames()" method in your VS editor, you should get a little popup that describes the type that the method returns. Match cqEntities with that type. Alternately the ClearQuest API docs should give you the proper return type. Even the VS class browser should be able to tell you what the type is. You'll want to avoid casting if you can, unless that's being forced on you by the ClearQuest API, in which case that's a heads up that it's not a very good API.
|
|
|
|
|
i got assignment to write a program(Server) for port listner the client program is written in java.
the client will send 69 byte that will be received by server and then processed.
i have written a simple TCP listner progam in c# but it always read upto 52 bytes and next 17 bytes are always 0
|
|
|
|
|
So, cut out the relevant bits, and post them here (within <pre>...</pre> blocks) - otherwise we can't tell what your problem might be...
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Do you have TCP no delay set ?
SetSocketOption(SocketOptionLevel.Tcp ,SocketOptionName.NoDelay, true);
It should not help in your case except if you made a mistake in your read operation.
TCP is a reliable stream delivery service that guarantees delivery of a data stream sent from one host to another without duplication or losing data but you may see your data cut in several packets. So, handling of re-assembly packets is necessary at the application level.
When the system is not loaded it's okay, but you will see when a system is at 99% of CPU usage it's not the same.
Hope it helps....
Just let me know
|
|
|
|
|
Is your recv or read function giving you back a total of 69 bytes? If so then the TCP part of the socket read is OK, and the "problem" lies on the server end in terms of what it's sending you. It's entirely possible that the server is in fact sending you 69 bytes, 52 of which are printable characters, and the remaining 17 padded out as 0's. A 0 is a perfectly valid byte value to send across a network.
|
|
|
|
|
Hi all,
I was trying and trying ...
in Visual c# .net I use a date which should besaved to the database:
DateTime TimeForTheDatabase = DateTime.Now;
... this is only an example ...
Now I will Insert "TimeForTheDatabase" to the Database:
SqlCommand dataCommand = new SqlCommand("Insert INTO table1 (Text,Datum) VALUES ("Info",TimeForTheDatabase)",dataConnection);
But I get an Error
Can somebody give me a sample how to insert my "TimeForTheDatabase" into my DB ?
Thanks
|
|
|
|
|
whats the error????? without error description how people can help you ?
Thanks,
Arindam D Tewary
|
|
|
|