|
can you write macros in c# ? if so how to begin ? can you reference a link or example plz.
tia
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Yes you can, however, the ms docs have tons of examples all in VB.NET
I am going towards writing an add-in instead. The add-in wizard get's you started.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
I have the following situtation
In my program i want to do request an dns lookup for several servers. How many servers are variable and are listed in a string array. Now i want to request the dns lookup not after each other but i want to do them in threads. So that not one dns lookup is waiting before the other is ready.
From each dns lookup thread i want the IPaddress as return value. And after all i want my program to continue after all threads are stopt.
So a quick summary
- Program start
- List of servers is in array list (for example 10)
- Starts 10 threads with the server to check as parameter
- Get response of the threads (and keep them in memory)
- Continue with program after all threads are done
I hope someone can help me with this. I search a lot about Threads but havend found a clear solutions for this problem. And if you think you had an other/better solution without threads, please reply also.
Thanx
|
|
|
|
|
If your using threads I highly recommend using the ThreadPool class. Caution, there is an error with the ThreadPool with WebRequests, but I am not sure if it applies to Dns class.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Can I map key combinations (like Alt-2) to form methods in C#.
I should mention, Windows Forms apps...
|
|
|
|
|
Hello people,
I have a quick question for you. I am currently importing data into an access database and i need to check each field and make sure that it does not exceed the maximum lenth of the fields in our database. So.... I create a DataSet, the a DataTable, and then use the column collection to try and find the max length of the field, something like this:
oDataTable.Columns[k].MaxLength
All I ever seem to get is a -1 for the maxlength, although all the other data shows up great. I was wondering if anyone had a suggestion as to what Im doing wrong.
Thanks so much!
Ryan
|
|
|
|
|
I was wondering if there is a C# equivalent to the 'with' stmt in vb.net ..
I have some code that sure needs it!
thks in advance .
|
|
|
|
|
Dato wrote:
I was wondering if there is a C# equivalent to the 'with' stmt in vb.net ..
No, there isn't, and some people think that there should not be, I'll explain why below.
Dato wrote:
I have some code that sure needs it!
So, put this code in a method in this object.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
I came up against this problem, too, and no, you can't always put the code in a method of the object. I don't see any reason not to have a with block statement, except that C++ didn't have one, which is a very poor excuse!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
so what is the problem?
if you are going to set props on a something down a hirarchy like:
MyBlah.SomeBluh.LastWow.Gnu.BackColor=color.red;<br />
MyBlah.SomeBluh.LastWow.Gnu.ForeColor=color.green;<br />
MyBlah.SomeBluh.LastWow.Gnu.Text="hello you!"
it would be very simple to just make a temp holder for gnu:
GnuType g=MyBlah.SomeBluh.LastWow.Gnu;<br />
g.BackColor=color.red;<br />
g.ForeColor=color.green;<br />
g.Text="hello you!"
that would do the exact same thing . ok . you would have to type "g" infront of every prop , but thats about it...
//Roger
|
|
|
|
|
I think that using a temporary holder (many times) floods the memory untill the garbage collector comes. And how would you release the resources used by g ?
|
|
|
|
|
take a good long reading about reference types...
that will sort things out for you..
//Roger
|
|
|
|
|
I'm developing a software which is similar to PCAnywhere and would like to know how to send / simulate a mouse click (with co-ordinates and stuff) that is not form dependant meaning that i can send / simulate the mouse click anywhere i want, be it the taskbar, tray icon, etc. How do i go about doing it? Are there any samples for this sort of thing?
|
|
|
|
|
In Win98 or higher, there is a function called SendInput which you can use to send input as if it is coming from the keyboard, the mouse, or even another device. For any OS below that, you have to simulate it by using windows messages.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
After some searching yes that's the only way i guess but it seems to require me to define the structs, do you happen to know the full definitions and probably show me a sample syntax on how to call it?
|
|
|
|
|
|
Nuf said.
|
|
|
|
|
Nope, not sharp enuf
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hi,
How can I find the names and/or IPs of the computers on my LAN (the ones that I see in Explorer)? Please help, I really don't have a clue...
Thanks a lot!
Andrei Matei
andreimatei@home.ro
|
|
|
|
|
|
Thanks a lot, just what I needed.
Andrei Matei
andreimatei@home.ro
|
|
|
|
|
Hi,
We can use an arraylist of objects as a datasource for a datagrid. We need to have public properties in that object to shown as columns. My question is if we are exposing another type as a public properties how can we show that.
It can be a master detail relation ship.
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
|
|
|
|
|
What's the equivalent of the Win32 API keybd_event (or SendInput ) for .NET?
Thanks,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|
|
I don't know, but there is no rule that you can't use API's in .NET!
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I know, but why reinvent the wheel? You'd think that something like this would already be there, somewhere...
Thanks,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|