|
Heath Stewart wrote:
It's best you don't claim bugs, especially when you've only been programming C# for 1 week. Check out the documentation, search the 'net for similar findings, and ask someone to verify (like on this forum), then declare you've found a bug and report it to the proper ch
First. Thank you very much.
Second. I was using the example code from Microsoft on their implemenatation of the correct code (which is still obviously wrong according to the RFC). I did check the net for this very topic (very thin and obscure task). I did ask somebody to verify but they were looking at the entire code and easily missed the problem.
Third. It was an obvious small error on my part that I should have caught. I just never figured that Microsoft would provide a sample of an RFC that wasn't compliant. That is exactly why I thought to ask the kind folks here at Code Project for help.
Fourth I wasn't claiming a bug and was looking for the exact validation you provided in that the Microsoft code as supplied was wrong and not something deeper. They should change that one item to make it RFC compliant.
Fifth. Thanks again. Sorry if you thought I was calling your baby ugly. Haven't you ever beat your head on the keyboard looking at the obvious to somebody else while completely missing the EASY! answer?
Again thank you very much for the help.... Now to finish the project. And, I think C# is pretty darn nifty......Thanks again, and again.... Really...
--------------------
Sam
|
|
|
|
|
The samples in the documentation is riddled with bugs. Look at it - hopefully it helps you to understand if the class documentation doesn't - but never copy it.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
selil wrote:
static private void PrintByteArray(Byte[] arr)
{
int i;
Console.WriteLine("Length: " + arr.Length);
for (i=0; i {
Console.Write("{0:X}", arr[i]);
Console.Write(" ");
if ( (i+9)%8 == 0 ) Console.WriteLine();
}
if (i%8 != 0) Console.WriteLine();
}
This is happening because the format specifier in {0:X} is dropping the leading zero. The value is represented with the leading zero (obviously, since the value is 2), but the leading zero is just not printed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
THANK YOU! Too!
I'm working on a coding project for a class (500 level course) to implement a secure email (schema) login procedure. I was looking to learn C# since I had heard about how easy it is to utilize for fast development. The hardest thing to learn has been where certain libraries are located. Doing the windows programming was a breeze, but I beat my head trying to figure out where this particular issue was (I implicitly trusted the MS code). I used to do a lot of programming in VC++, and Java and everybody seems to think C# is the wave of the future (RFC 2095 and RFC 2104) so to increase the level of difficulty I switched. So I'm writing an IMAP server and IMAP mail client for my first C# project. I have three days to complete the assignment in a new language, against sketchy RFC's, and it must be fully functional by tomorrow morning... Yee haw.
Thanks again!
--------------------
Sam
|
|
|
|
|
We know we can use propertyGrid to configure object,but how can we use it to configure html component's property such 's property.This condition is like ASP.NET'S develop entironment??
ok
|
|
|
|
|
You mind elaborating a little? Are you trying to assign or change HTML for a control? Why not just switch to HTML view?
If this question is specific to ASP.NET, please post it in the ASP.NET forum. If you're asking about design-time support, read Enhancing Design Time Support[^] in the .NET Framework and ask about any specific questions you have here.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
can anybody give me some idea how to write code for file transfer using xmodem protocol.
|
|
|
|
|
If you want to write a client, then you'll need to study the XMODEM protocol. A quick search[^] on google turned up many references to the specifications.
If you just want to use XMODEM, then you'll need to search for a library. A quick google search[^] turned up several possibilities.
See how handy google is when you need to find things? A search engine is a much better way of finding resources for what you already know.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Does ANYONE know of a way to access the drag image created by the drag source (in this case Windows Explorer) so the same image can be displayed when dragging over the target control? It's easy enough to drag files from Explorer to another app since the FileDrop flag allows you to access a string array of file names. However, I'm trying to display the same drag image created by Explorer in order to give the user more meaningful feedback while dragging.
All I've seen so far is that the IDragTargetHelper and IDragSourceHelper interfaces are helpful for shell drag operations. Of course, those interfaces are as well documented as everything on MSDN....
I'm desperate for an answer at this point, so anything helps, even if it seems elementary!
Thanks!
|
|
|
|
|
I find them and everything else on MSDN well documented enough.
There is no functionality in the .NET BCL to help you - you will have to interop those interfaces (or find a library that does) and use the COM implementation of drag-n-drop. The IDataObject interface is similar to COM's interface and is eventually marshaled as COM's IDataObject , and Control.DoDragDrop uses the shell's DoDragDrop function.
The interoperability between drag-n-drop/clipboard formats and structures in .NET and COM has been discussed extensively in the past. I have accomplished this and made use of COM's implementation to use other storage mediums and have directed another person in it as well.
If you want to know more, click "Search comments" directly above the the message board and search for various keywords, like "STGMEDIUM" and/or "FORMATETC".
Otherwise, read the MSDN documentation and related links and try to figure it out. I didn't have any problems when I learned many, many years ago when MSDN wasn't nearly as helpful as it is now - and it certainly beats reading *nix man pages!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You’re making the assumption that assumption that I’m proficient in C++. Frankly I’m no further now that I was before. I’ve found plenty of articles that state the COM IDataObject interface is necessary, but I’ve found nothing that discusses it in VB or C#. I searched the keywords you suggested, but there’s still little that shows or explains how one might implement this in a language other than cpp. Can you perhaps elaborate or at least point to an article that has substance to it?
|
|
|
|
|
I assumed nothing - just told you what needs to be done. If you don't understand it, you can always read about it in the Platform SDK and .NET Framework SDK available at http://msdn.microsoft.com/library[^] - that's how I learned some time ago.
I have a todo item for such an article on my list, but have little time to work on stuff like that - especially since this is a rather complicated solution.
If you don't want to research the solution, then consider that you really don't need it - it's only for glit; not having a bitmap drag image won't impeed functionality at all.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I've already spent 3 weeks trying to find a suitable solution, including every article I can find on the platform SDK... but, like I said, most every solution is in c++ and would be extremely difficult to port to c# or vb because of the MFC underworkings and abilities c++ has to do things like creating co-classes. The reason I'm pursuing it at this point is that the project itself is done (shy of marketing) and this is the last step. You're right, it won't impeed functionality, but I also wouldn't drive a car withouth a front windshield if I had a choice
|
|
|
|
|
If you can't or don't want to interop and P/Invoke all that's required in C#, you're forgetting a good alternative: write a mixed-mode Managed C++ assembly and port your drag-n-drop code to that. Using a mixed-mode (as opposed to pure; the difference being what APIs you use) assembly gives you full access to unmanaged and managed APIs.
What do you want me to tell you? As I said, it's a complex problem to solve and I'm a very busy person. I'll get around to an article when I can, and I haven't seen a decent one regarding this.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Alright - One more question then I'm putting this issue on the back burner for a while...
I scoured the net last night and finally found (after translating a site from German to English) an ATL component that provides the shell dragimage support I'm looking for. The test project is in VB6 and works fine as long as the target control has its DragMode property set to Manual (1). Then I referenced the ATL dll in a new windows forms project and ported all 3 lines in VB to c# (also tried vb.net). I'm sure you'll be shocked that it didn't work. I did set the AllowDrop property of the form (also tried other controls) to true, and I also tried setting the drageffect manually in the dragenter and dragover events, and still no dice. I'm sure there's something very basic I'm missing here, and if I can get over this hurdle I'm home free. Any thoughts on the way a VB6 control handles dragging vs a .net control?
Thanks!
|
|
|
|
|
Anything that'll work in VB6 will work in .NET (doesn't matter if you use C# or VB.NET - it all compiles to IL and you only need class library support for this, which all manages languages can access). That doesn't always mean it's as easy (since the VB VM hides the automation details).
First, make sure you've registered your ATL server you found and create an interop assembly from it (using either tlbimp.exe or have VS.NET create it - it all works the same). Make sure that is referenced by your project. This is the RCW (Runtime Callable Wrapper) that you need.
As far as how to use it, I really can't help you there, especially since I have no idea of what project you're talking about (a link would've helped).
Finally, don't assume that types in .NET translate to types used by the ATL component. For example, the DragDropEffects may not have the same values as what the ATL component is expecting, just like the IDataObject interfaces are not the same between .NET and the Shell APIs (though they are transformed internally at a point).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Here's the english version:
http://www.glimt.dk/code/clipx.zip
Register the altBind.dll and run clipx.exe. You can drag a object from Explorer to the "Clip/Drop" button. All the VB source is included.
|
|
|
|
|
does anyone know how to enable visual styles in the webbrowser control? is it even possible?
thanks,
einar
|
|
|
|
|
Is your application including a manifest to bind to version 6 of Comctl32.dll? If you are using .NET 1.1 you can call Application.EnableVisualStyles(); .
- Nick Parker My Blog | My Articles
|
|
|
|
|
i'm using 1.1 yeah, but Application.EnableVisualStyles(); doesn't seem to work for the browser control.
|
|
|
|
|
This has been a common problem, usually fixed by calling Application.DoEvents after calling Application.EnableVisualStyles , and calling both before instantiating a single Control (usually before calling Application.Run ).
For example:
public class AppForm : Form
{
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new AppFrm());
}
}
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i tried that before but didn't have any luck.
this is for EnableVisualStyles() from the msdn docs: "Note This call will have no effect for controls in the browser."
i guess i'll have to wait for whidbey :/
|
|
|
|
|
If you have control over the HTML, include the following meta element within your pages:
<meta http-equiv="MSThemeCompatible" content="yes"/>
- Nick Parker My Blog | My Articles
|
|
|
|
|
doesn't work either.
when set to "no", that meta tag doesn't seem to have any effect whatsoever even in a regular ie session
|
|
|
|
|
Read Using Windows XP Visual Styles[^] on MSDN and go to the "Using Visual Styles with HTML Content" section. See if any of the rules they specify are being broken by your HTML to improperly render the visual style.
- Nick Parker My Blog | My Articles
|
|
|
|