|
|
Hi,
I saw an MSDN web page on the subject; it waw terribly complex, checking lots of things, and
switching; I did not note the link.
And then there is the registry key
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName"
which is good enough for me.
|
|
|
|
|
Hi All,
Can someone give me some hint on how to generate web services code from C# CodeDom?
most appreciated.
Andie
|
|
|
|
|
Did you check out this?
http://www.codeplex.com/wsstudioexpress[^]
It demonstrates dynamic proxy generation and similar stuff. It is actually a tool which you can use to interact with any webservice.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
Hi Kumar,
Thanks very much for your follow up. But i am actually after by using CodeDom to generate the c# web service code dynamically by looking for the DataAdapter structure in the .dll files.
Anyway, still appreciate your follow up.
Andie
|
|
|
|
|
Hi,
I can get data from SQL to datagridview, textbox and combobox objects.
I can edit or view any data from or to database with the above objects!!!
But not to StatusStrip, at least not directly!!!
I get the data from sql to other object, and then pass it to statusstrip.
Is there a direct way? like the other object. statusstrip doesn´t has a datasource 
|
|
|
|
|
|
Spamming the whole site is a good way to convince us that you have no idea what it means to be professional, which is not a good way to get people to respond to your job ad.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Yes, you are right. I'm very sorry. I deleted both my messages in this and the lounge. My bad.
|
|
|
|
|
What was the message this person posted? Saw it all over in the Lounge?
Christian Graus wrote: job ad
Isn't that what the Job board is for?
---modified
Never mind, saw it in the Job Board. Sounds too good to be true.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, I am very new to C# but I am modifying an image buffer directly within memory, I am scanning along moving the pointer to get the RGB of each pixel, but I need away to jump around the image memory and read the pixels at random rather than just p++ or p--?
Thanks...
unsafe
{
byte* p = (byte*)(void*)pBuffer;
for(int y = 0; y < Height; y++)
{
for(int x = 0; x < Width; x++)
{
int srcB = p[0];
p++;
int srcG = p[0];
p++;
int srcR = p[0];
p++;
}
}
}
|
|
|
|
|
Hi,
inside an unsafe block you can use pointers and jump around as you wish, provided you tell
the compiler to let you do that. What is the specific problem?
|
|
|
|
|
Hi, the problem is I have only used Blitz Basic before and I could jump to a pixel, eg GetColor(129,280)"Width,Height", with pointers I have to scan along the image for the data, I dont know how to jump to the pixel data I want?
|
|
|
|
|
Hi,
you can perform calculations with pointer values: every time you add one you move to the next
element of that type (same as in C or C++).
Guffa's answer below gives you a detailed example for bitmapped images.
|
|
|
|
|
For a 24 bit bitmap, the location of a pixel can be calculated with:
scan0 + y * scan + x * 3
(Note that for a bitmap that is stored upside down, which is the common way, scan0 points to the last line, and scan is a negative value.)
Your code for looping the image is incomplete. The lines might not be stored end-to-end in memory, you have to skip any extra bytes between the lines (calculated by scan - x * 3 ). Also, if the bitmap is stored upside down, you will either get the data upside down, or only getting garbage after the first line read.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How do i explicitly free byte array?
|
|
|
|
|
Hi,
when the last reference to an object (such as a byte array) is given up, the object becomes collectable.
Examples:
{
...
byte[] myArray=new byte[1000];
...
myArray=new byte[2000];
...
myArray=null;
...
myArray=new byte[3000];
...
}
Collectable means the garbage collector, when it decides to run, would find and collect the object.
However it will only run when there is a need to run, unless you force it with one of the GC
methods. Doing so is almost always a bad idea, since a GC run is costly, and temporarily blocks all
the threads; therefore the GC should only run when necessary, i.e. when there isn't enough
free memory to satisfy a new SomeThing() request.
|
|
|
|
|
Hopefully you are asking about what Luc posted, setting the variable to null. Otherwise you are out of luck since finalization is non-deterministic in the Garbage Collected environment.
led mike
|
|
|
|
|
Hello, I am attempting to use RegisterClientScriptBlock and it is not seeming to work. Can someone take a look at my code?
Here is my C# (which I have in my PageLoad):
)
var videoLoadScript = " var so = new SWFObject('player.swf','mpl','955',' 540','9');";
videoLoadScript += "so.addParam('allowscriptaccess','always');";
videoLoadScript += "so.addParam('allowfullscreen','true');";
videoLoadScript += "so.addParam('flashvars','&file='" + path + "'&autostart=true');";
videoLoadScript += "so.write('player');";
ClientScript.RegisterClientScriptBlock(this.GetType(), "test", videoLoadScript, true);
Here is my HTML (which I have in my BODY tag):
<div id="player" oninit="test();" align="center">This text will be replaced</div>
does anyone see anything obviously wrong?
|
|
|
|
|
sarajo1981 wrote: and it is not seeming to work
What is the error you are getting ? Your code registers a script named "test", why you are writing it again in the markup manually ?
Your question is ASP.NET related. CP has a ASP.NET forum. Please consider posting in the right forum next time.
|
|
|
|
|
sarajo1981 wrote: does anyone see anything obviously wrong?
Yes, you don't seem to understood the documentation[^] correctly. You appear to think that "key" equals "function name". They are not equal. If your intention is that the script you are registering is a javascript function then the string you pass in must contain the complete code of the javascript function as the example code in the documentation clearly depicts.
- key
- Type: System..::.String
The key of the client script to register.
led mike
|
|
|
|
|
I have an application in wcf with dualHttp
Is there a way to know if the server is shutting down suddnly unexpectidly like if some one do a restart?
Is there a way for the server to knmow if the same thing for the server to know if the client shuts down unexpectedly?
|
|
|
|
|
Is there not and OnStart event in your service - oops sorry Windows Service
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I just want to display the form1.cs with a Title on the left and an close button on right(no minimize and maximize button) so i set the property like this
this.FormBorderStyle = FormBorderStyle.FixedSingle;
But I don't like is that the title bar size it's thin and I can't add an icon. I want to keep the title bar size if we were to set the this.FormBorderStyle = FormBorderStyle.FixedDialog.
I played around with all the properties but couldn't find one may be i am missing something. Please indicate me
Thanks.
|
|
|
|
|
netJP12L wrote: I played around with all the properties
That is insufficient; you must either try all combinations of all settings, or read the documentation.
The minimize and maximize buttons have a bool property controlling them. You don't have to select
a special border style for that reason.
|
|
|
|