|
Dear, I'm not trying to read artist/album/track info for video files. I've already mentioned that I only need to read the Video dimensions.
|
|
|
|
|
lm using a Epson u220 printer and need to print Continues paper, when ever I generate invoice Report.
Now I have a hard time on how to set my Paper Size to Width = 5 and the Length to be a dynamic.
Meaning If the Data of the Invoice Report can fill up a Lenght 25 inches then the Custom paper size will be
5 X 25. and If the Data of the Invoice Report can fill up only to the length of 10 inches then the Custom paper size will be
5 X 10.
So is there anyway possible to set the Length of the Paper Size to be Dynamic.
FYI,
i am using crystal report's
report.PrintToPrinter(1, false, 0, 3); for print the document.
|
|
|
|
|
Not sure, but I believe that the simplest way would be to select the appropriate pagesize in the properties of the printer-driver. If I'm correct, then CR (and most other report generators) base their print-preview on those settings. The printerdriver "knows" what size paper is available, per drawer (some printers feature more drawers with different papersizes)
Should be somewhere under Start-menu / Printers and Faxes / <your printername="">
Right-click on the printer, and select "properties". There should be a tabpage with information on the paper-sizes, along the lines of "Advanced Options", "Paper Size", "Continuous stationery (US)".
I are troll
|
|
|
|
|
there is no option like continuous... it have fixed length only.
i want to know how to achieve this in c#????
it is urgent.......... pls help
|
|
|
|
|
Have you find any solution.. regarding this matter...
|
|
|
|
|
tab skip the controls inside panel in winforms!!
How to set tab index so that it go through all controls in panel and then to next control on form??
|
|
|
|
|
I'm using trim function and supposed to have my string trimmed. But my string remains same. For example : " hello", the result is : " hello". But I suppose the result is : "hello". Is anyone have same problem? Anyone knows the replacement function? If using VB, I don't have problem on string operation
No one can prevent me to learn something
|
|
|
|
|
Are you assigning the result of Trim to the original string? Strings in .NET are immutable, which means that you must take the return value and assign it to a different (or the same) variable. Like that:
string s = " hello";
s = s.Trim();
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
It's impossible to definitely say what you are doing wrong without actually seeing the code.
My guess is that you think that the method changes the string that it's applied on, when it actually returns a new string with the modified value:
s.Trim() // creates a trimmed string and throws it away
s = s.Trim() // creates a trimmed string and assigns it to the variable
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thank's. Maybe that's why sometimes it work and sometimes not
No one can prevent me to learn something
|
|
|
|
|
Dear All,
how can i access my office PC in home by Using TCP/IP Port, or can we make serial link b/w them using Port Listener Program.
thanks in Advance.
|
|
|
|
|
Hi,
could you please be a bit more specific about what you want to achieve?
Generally spoken there is no reason why you can't connect to your office PC via TCP/IP.
Regards
Sebastian
P.S.: What is a serial link with a Port Listener Program?
|
|
|
|
|
Hi,
I need to build file (any files) based caching algorithm for this i'm looking for a well proven and extensible Open Source which supports C#, can you please address some good open source.
Thanks...
|
|
|
|
|
Dear All,
I am running an windows application, which is used to create a public queue and send and receive messages from it.
Environment
The application runs on my development machine which is under a AD.
The application has to create a public queue in another (destination)
machine which is in the same domain and has the message queue.
In destination machine I have the admin rights too.
Issue:
When I ran the application it checks whether the queue exists in the
destination machine or not - Working.
When the queue doesn't exists it tries to create the queue - Not Working
Error:
"Access to Message Queuing system is denied."
Kindly give me the solution to rectify the same.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
hi! everyone
I want to know what is the difference between
listbox.SelectedItem and listbox.SelectedValue.
How can I get the text of displayMember of databound listbox
and not the value member text which I can easily get by
listbox.selectedvalue ??
Thanks
|
|
|
|
|
SelectedValue is the value of the member property specified by the ValueMember property. SelectedItem is the item that's currently selected.
/ravi
|
|
|
|
|
I am creating a DLL wrapper for some old C++ libs so they can be used by C#. I have a communication structure that is allocated by the C++ functions and returned to C#, C# needs to fill in some data and pass it back into the C++ code.
I have it working but its nasty code - hoping someone will have a better idea.
C++ structure
typedef struct
{ uint32 qRequest; // set to desired operation
uint32 qStatus; // server to sets to status
uint32 qReqBufSize; // total size of buffer
uint32 qReqBufValidLen; // amount of valid data
char acReqBuf[1]; // request data buffer
// allocated for qReqBufSize bytes
} myREQUEST;
C# struct
[StructLayout(LayoutKind.Sequential, Pack=1) ]
public struct myREQUEST_CS
{
[MarshalAs(UnmanagedType.U4)] public uint Req; // set to desired operation
[MarshalAs(UnmanagedType.U4)] public uint Stat; // server to sets to status
[MarshalAs(UnmanagedType.U4)] public uint ReqBufSize; // total size of buffer
[MarshalAs(UnmanagedType.U4)] public uint ReqBufValidLen; // amount of valid data
// hardcoded for size for now
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 296)]
public char[] ReqBuf;
}
My big problem is the Buffer (ReqBuf) area in the Struct. This is allocated as contiguous memory chunk with the Struct. It is just a place holder that in C++ gets cast to another structure. I need to read and write to this area in C#.
I've been using combinations of Marshal.AllocHGlobal(), Marshal.StructureToPtr and Marshal.PtrToStructure - just hoping someone knows of a better way to access and write to the ReqBuf area of my structure
|
|
|
|
|
Hi,
if ReqBuf is actually a struct, why don't you provide its real definition? just smash it in, instead
of the char[]
BTW: making it 296 managed chars is rather odd, at best it is 592 bytes, isn't it?
Once the array is gone, all StructLayout and MarshalAs stuff looks redundant too.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Wednesday, January 28, 2009 6:40 PM
modified on Friday, June 10, 2011 11:57 AM
|
|
|
|
|
Hi
Is there a way to convert .flv to .WMV/.WMA/.MPEG file using C#? Please advise.
Thanks
Pankaj
|
|
|
|
|
It is not natively supported in .NET. You will have to use a third party utility.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I have written a Windows Form Application that updates a MS Access DB. I want to be able to install this application on a server and then allow my clients to create shortcuts to the .exe. When I try to do this I get an error:
System.Security.Permissions.FileIOPermissions, mscorlib? How do I fix this.
Thanks!
|
|
|
|
|
Google for Code Access Security (CAS) and you'll find out why and solutions.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Ok I tried to send keystrokes to msn with sendmessage but I Can't get it to work what I did:
IntPtr hwnd_Main = FindWindow(null, "name <someone@hotmail.com>");
IntPtr hwnd_imwindowclass = FindWindowEx(hwnd_Main, IntPtr.Zero, "IM Window Class", null);
IntPtr hwnd_child = FindWindowEx(hwnd_imwindowclass, IntPtr.Zero, "DirectUIHWND", null);
SendMessage(hwnd_edit, WM_KEYDOWN, Char.ConvertToUtf32("abc", 1), 1)
SendMessage(hwnd_edit, WM_CHAR, Char.ConvertToUtf32("abc", 1), 1)
SendMessage(hwnd_edit, WM_KEYUP, Char.ConvertToUtf32("abc", 1), 1)
I also tried using postmessage but all dont work.
And no I dont want to call settoforeground and use sendkeys cause the window needs to stay minimized.
btw also tried using this
string s = "hello";
for (int i = 0; i < s.Length; i++)
{
PostMessage(hwnd_child, WM_KEYDOWN, VkKeyScan(s[i]), 1);
PostMessage(hwnd_child, WM_CHAR, VkKeyScan(s[i]), 1);
PostMessage(hwnd_child, WM_KEYUP, VkKeyScan(s[i]), 1);
}
modified on Wednesday, January 28, 2009 2:53 PM
|
|
|
|
|
Schoolmelk wrote: but I Can't get it to work
You'll have to be more specific.
Are you checking the return values of any of your calls?
/ravi
|
|
|
|
|
yes I get all things I need it goes wrong with the sendmessage / postmessage part those return 0.
|
|
|
|