|
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
|
|
|
|
|
this should theoretically be possible according to the docs, don't understand why it's not working.
anyway, i'll look into it some more one day. thanks for all the tips.
|
|
|
|
|
hello guys,
I was wondering if its possible to load Form into a Panel that is located on a main Form??
I am in the process of creating an application that have multiple views that for now have 20+ Panels. But its getting out of hand as its impossible to get a view of them all. Therefor i was wondering if its posible to create forms to be placed into another form - either inside a panel or some other means?
any sugestions and code examples would be welcome.
|
|
|
|
|
No, it's not possible. Use MDI instead.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey Heath,
Not sure if you check out the ASP.NET board at all, but I'd really appreciate your take on a question I threw up there, considering you've basically committed the .NET framework to memory and all...
Jeremy Kimball
I have traveled the gutters, lo these many days, with no signs of life. Well met.
-brianwelsch
|
|
|
|
|
I try to steer clear - there's far too many questions about client-side stuff, and the majority of people just don't understand what ASP.NET is. I typically spend more time explaining why you can't popup a window using pure ASP.NET than anything.
I'll check it out, though.
Microsoft MVP, Visual C#
My Articles
|
|
|
|