|
dgap wrote:
the question is mainly how to access an elementID from a serverside datagrid
Like I said, look at the resultant HTML. You can catch events like onitemdatabound to set the IDs if they aren't being set for you as you would like.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI All, I want to write a "Send To" menu class using C#(it's function just like the "Send To" Menu in the windows OS,send files to a specified target,such as desktop,MyDocument,Mail Recipient etc.), and I've finished it ,but there is still some problems .I use COM code (use IShellFolder,IDropTarget etc.) to do this work, this is too complex I think, so I want to know are there any simple ways to do it?
There is another problem , I add the "Send To" menu items in the System's Send To folder , in win2000 ,all the "Send To" menu items are in this folder ,but in win_xp there are some items not in the system's Send To folder (such as floppy disk,DVD RW Drive),but they appears in system's send to menu. I just want to know does Windows puts “Removeable Drives” in the Send To menu automatically?
some one told me that:"While trying to fiddle around with the various places where SendTo entries can come from I guess it'd be faster to learn about the COM interfaces that should give you all SendTo targets, regardless of whether they are links in certain directories, registry entries or anything else."
But,which COM interface should I use to get all Send To targets?Please give me some useful information .Many Thanks!
|
|
|
|
|
I have a device using M-Jpeg,i can catch jpeg data at client,
but it's jpge cannot Decoder ,it like that:Bmp bmp = new (JpegData)
there will throw a GDIPlus Error ,I dont know why ,but these jpeg files
can renderred by GDI,so i think if it's a bug of GDIPlus.Could somebody
met these kind problem?Jpeg can decoder by GDI but cannot decode
by GDIPlust.It's confused me for a long time.
|
|
|
|
|
1. GDI has no method of handling a JPEG. Not one.
2. If you tell us what the error is, it would help us to help you
3. What is JpegData ? That is, what is the type of this variable ?
4. Always assume the library has a bug only when you are totally certain your code is calling it correctly, and even then, take care. It's always best to assume the bug is yours, otherwise, it will go unfixed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, thanks for your words,and i know your meaning
maybe my description is not in detail.
Our company using m-jpeg tech to transform jpeg data from Remote device to
client.When i access a standard uri i will get the stream like that:
socket.connect,then i get the stream,
/*
--MYBOUNDARY Content-Type: image/jpeg Content_Length: 3926 Trigger_Flag: 0 ÿØÿçÿÛC ,6') ,@9DC?9>=GPfWGKaM=>YyZaimrsrEU}|ofprnÿÛC4
*/
I use socket to connect the device then get the stream,get the JPEG data
from stream(using jpeg label :ffd8 ffd9),next using Image.FromStream(MemoryStream) method to render the jpeg to screen.
First tiem it worked well,but later, we have many types of devices, some device
I cannot using this method to render JPEG stream.I want to know what happend,
i save Jpeg data to my disk,I fond strange thing happend,all application
using GDIPlus (using Image.FromFile methond cannot open these jpeg files),
,But application ,example IE can open these jpeg file well,
I create a new application(.net1.1) drag a PictureBox to winform using Image property,
when i browse local file and selected the Jpeg file ,click OK,it tell me :
GDI+ general error,but in VB6.0 I drag a PictureBox to the form using the same method to select the Jpeg file it works ok .We have a activex component
writter by Vc++ 6.0 it work ok too.Last i fond all application using GDIPlus
when call Image.FromStream or Image.FromFile will throw GDI+ genner error.
So i cannot using pure C# to completed my work,but by ActiveX(written by vc++
6.0)'s help compled my work.but the Jpeg data producted by hardware( we buy from other company,may be CPU is ARM ) so I cannot do some thing to check
hardware.
Thanks again.
|
|
|
|
|
BlueLoveCyn wrote:
First tiem it worked well,but later, we have many types of devices, some device
I cannot using this method to render JPEG stream.I want to know what happend,
If it stopped working, then the data must have changed. If it still works using IE, then perhaps IE is a bit looser in the jpeg format it accepts ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can anybody show me how to get the file version using C#
|
|
|
|
|
try this link
click me
deals with the fileversioninfo class
|
|
|
|
|
Can Visual Studio.net create applications that will run on different computers that do not have the visual studio.net compiler?
|
|
|
|
|
Yes, it can. .NET applications only need the the .NET runtime, it's not necessary to have VS .NET.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
If you're asking because you've tried, you can only build applications as you have done, they are reliant on the .NET framework ( as someone said ) and there's nothing you can do about that. The framework is a seperate download, it comes with the compiler.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a stituation where a method is accessed over remoting which takes a reference to an object as a parameter. But running the client chucks an exception.
The object that I am trying to pass by reference does extend MarshalByRefObject
And below is the exceptions I get:
Unhandled Exception: System.Runtime.Serialization.SerializationException: Because of security restriction
s, the type System.Runtime.Remoting.ObjRef cannot be accessed. ---> System.Security.SecurityException: Re
quest failed.
at System.Security.SecurityRuntime.FrameDescSetHelper(FrameSecurityDescriptor secDesc, PermissionSet d
emandSet, PermissionSet& alteredDemandSet)
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
--- End of inner exception stack trace ---
I don't know if what I am trying to do is even possible. So any advice would be much appreciated.
Cheers
Naren
|
|
|
|
|
Can somebody help me with a regex expressiion that will match all regex keywords (\w, \s, \d, ., ^, |, ?, (), etc...) and escape them?
So, i have a string like this, "\w\s\d.|" and I want it to be like this "\\\\w\\\\s\\\\d\\.\\|". Any ideas?
/\ |_ E X E GG
|
|
|
|
|
Do you really need to replace one slash with four ?
string.replace will probably do this just as easily, I'd have thought.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Java does. For example, "\w" already has one slash, I need another to escape it from the regex engine and two more to escape it from javac. Hence, \\\\w==\\w
/\ |_ E X E GG
|
|
|
|
|
You only have to escape the special characters. A pattern like this should do:
"\^$*+?.()[]"
---
b { font-weight: normal; }
|
|
|
|
|
I need \w\s\d {}'s etc... too!
/\ |_ E X E GG
|
|
|
|
|
Hello, my problem is how do draw an grind with GDI+, i need a grid for my furst game so the
object will be able to move in cells. that was my way:
private void GrindPaint(object sender, PaintEventArgs pea)<br />
<br />
{<br />
<br />
Graphics gfx = pea.Graphics;<br />
<br />
int space = 2,cwidth = 10, cheight =10, amount =30;<br />
<br />
Pen pen = new Pen(Color.Black);<br />
<br />
int cx=1,cy=1;<br />
<br />
<br />
for(int j = 0; j<amount; j++)<br />
<br />
{<br />
<br />
cx = 1;<br />
<br />
for(int i =0; i<amount; i++)<br />
<br />
{<br />
<br />
gfx.DrawRectangle(pen,cx,cy,cwidth ,cheight);<br />
<br />
cx = (cx+cwidth+space);<br />
<br />
}<br />
<br />
cy =(cy+cheight+space);<br />
<br />
}<br />
<br />
}<br />
<br />
My question: confused: is , is there another, better way or easier
tnx for help!!
i'm learning
|
|
|
|
|
Personally, I'd just draw lines, not rectangles.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to have cellspace , so i draw rectangels with distance 2px,...
is my way ok?
i know stupid questions,... but i started c# and GDI+ 1 weag ago
tnx for all replies
i'm learning
|
|
|
|
|
Your way is fine, if you see a grid, then you got what you want. If it's not drawn over and over, it doesn't matter, but unless you're making less API calls ( you didn't check the box to show <, so I couldn't read all you code ) because of the size of the boxes you draw, I thought lines may be quicker.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How can I convert a datatable in MS Access into a comma delimited text file.
thanks.
|
|
|
|
|
If you have Microsoft Access, you can open the database and do an export and choose the save as "text file" option. If you do not have Microsoft Access, then you could write a simple routine to loop the data and write each field value out to a text file.
|
|
|
|
|
|
Ok, I am trying to retrieve a list of names from the database and based upon the number of rows retrieved from the DB, I am trying to do the following:
1. Instantiate a array of command buttons.
2. Add those command buttons to the list view.
I am assuming step 2 is possible since the item property is a collection of objects, I can add anything I want to add to it. Well it works fine except instead of actual command buttons, I am seeing the following , "System.windows.forms.Buttons, Text="rwqr""
What am i doing wrong.
|
|
|
|
|