|
James T. Johnson wrote:
A link to the BASS homepage in your post would be great as well
Done
James T. Johnson wrote:
So when can we expect an article detailing what you had to do to expose BASS to .NET?
I'm just recovering from what i feel was some scary marshalling, i'm not sure if everything is even 100%. I will do some testing to see, but I really want to finish the Record part first. I have a very nice a idea for a Voice over IP app doing 2 way encoding from live sources. I would also like to included more documentation, but you know how it goes
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Hi
I have tried to insert an image into a RichTextBox component but with no result. I have tried with CreateGraphics and drawn an image into it but when I type over the image, it dissapears.
If I load a rtf file containing an image it works just fine but how can I include an image programmaticaly?
I included a Com object RichTextBox6.0 and it has an array of ole objects with the add method but I don`t know what to give it as parameters.
Add(object index,object key,object source,object objclass);
Can anyone help me?
|
|
|
|
|
You have to do it in Paint event I guess.Maybe you can subclass it and handle Paint yourself.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Yes but if I handle the Paint event then I have to do all the implementation of the text formatting and location and everything else.
|
|
|
|
|
Try this ....
//load the image
System.Drawing.Image myimage = System.Drawing.Image.FromFile("Sample.jpg");
//create a picture box
PictureBox mypb = new PictureBox();
mypb.Image = myimage;
//adjust the size
mypb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.richTextBox1.Controls.Add(mypb);
|
|
|
|
|
It works but the text I write is written under the picture.
|
|
|
|
|
I write simple web services and add this method to it:
[WebMethod]
public string ReverseString(string message)
{
char[] arr = message.ToCharArray();
Array.Reverse(arr);
message = new string(arr);
return message;
}
When I want to test it in my browser and press Invoke button in new browser his error happend:
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'E:\WINDOWS\TEMP\p3tapjny.0.cs' could not be found
error CS2008: No inputs specified
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Hey, Maz
I've just run this and it works fine.
Mazdak wrote:
error CS2001: Source file 'E:\WINDOWS\TEMP\p3tapjny.0.cs' could not be found
What's the name of your class?
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
Hi all
How does one do this. I have a component that needs a handle to a window on construction, but how can I get the Handle of my Form in design mode??
Thanx all
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
|
Hi
U mean the Open Folder Dialog? I'm sure ther is example in the article section.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
You've got an OpenFile control in the Toolbox Window waiting for you,
And I swallow a small raisin.
|
|
|
|
|
There are some component in CP.Check C# section.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
How is it done? Does anyone have any examples of a C++ app calling a C# DLL?
Can the code in the below zip be converted straight to C#?
http://girlpower2.dhs.org/downloads/shodan_plugin_sdk.zip
|
|
|
|
|
I just gave a look in MSDN to make sure there was no solution, and I have found that if your managed code exposes COM public interfaces and methods, then yes, it is possible to do it. This does not look easy, and the C# DLL must be rewritten to expose interfaces, and stuff. Just give a look here.
And I swallow a small raisin.
|
|
|
|
|
Problem:
During develpoing my application I have changed name of namespace for my main form app.
My app namespace is Analyzer my MainForm namespace is Analyzer.View
Now I am trying to add some ImageList to my MainForm. During running application MissingManifestException is thrown. I have chacked Manifest using Ildasm and there is an entry
<br />
.mresource public Analyzer.MainForm.resources<br />
In my opinion shoud be
<br />
.mresource public Analyzer.View.MainForm.resources<br />
Recompiling doesn't help. Is this mean that MainForm.resX is in wrong (old) namespace? If yes how to change this namespace?
|
|
|
|
|
Hi,
Well, I guess it's a design quesiton.
I try to write a layout engine with two classes in it. The LayoutPanel class acts as a container for either LayoutPanel or LayoutItem, where LayoutItem is simply an object that stores the width and height of a visible item. and here is my solution:
class LayoutPanel: Component, IContainer
class LayoutItem: Component
is this ok? or better to have an abstract class on top of both (because both of them have widths and heights as attributes).
Thanks
|
|
|
|
|
Hey what's up coders...
I guess my question is pretty much the subject but the software I am interested in selling includes a few of the shell32.dll icons! Is this software still sellable or is microsoft gonna get me?
If anyone knows it would be much appreciated if they could get back to me.
Thanks so much.
|
|
|
|
|
I think you should modify them by a few pixels each to be safe.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Initially, I want to fetch or get a file from another machine either through local net or network share, and "win32_find_data" seems to be a good package for this task. But if I want to use it in C# or VB.NET, how should I do it? Or is there any other package I can use? Thanks a lot!
|
|
|
|
|
Hi
You will need to define 2 structures in C# first namely, FILETIME and WIN32_FIND_DATA. As:
struct FILETIME {
int dwLowDateTime;
int dwHighDateTime;
}
struct WIN32_FIND_DATA {
int dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
int nFileSizeHigh;
int nFileSizeLow;
int dwReserved0;
int dwReserved1;
string cFileName;
string cAlternateFileName;
}
[DllImport("kernel32.dll")]
static extern IntPtr FindFirstFile( IntPtr lpfilename, ref WIN32_FIND_DATA findfiledata);
[DllImport("kernel32.dll")]
static extern IntPtr FindClose( IntPtr pff);
public static WIN32_FIND_DATA FindFile(string filename)
{
WIN32_FIND_DATA fd;
IntPtr pff = FindFirstFile(Marshal.StringToHGlobalAuto(filename), ref fd);
if (ppf == IntPtr.Zero) throw new FileNotFoundException();
FindClose(ppf);
return fd;
}
Thats should do it, didnt check. Perhaps the TCHAR in the structs, but this should set u well on your way. Obviously, you can Add the other FindFile functions as well.
Maybe there is something in .Net doing the same already???
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
HAHA
There is an example on MSDN doing exactly what you need. Pretty much the same as above.
Look here, direct MSDN link, sorry dont have weblink, but should be easy to find.
FindFile Sample [C#][^]
Enjoy
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
And finally the .NET way....jeez i'm bored today
Directory.GetFileSystemEntries Method
Returns the names of all files and subdirectories in the specified directory.
[Visual Basic] Overloads Public Shared Function GetFileSystemEntries(String) As String()
[C#] public static string[] GetFileSystemEntries(string);
Returns an array of file system entries matching the specified search criteria.
[Visual Basic] Overloads Public Shared Function GetFileSystemEntries(String, String) As String()
[C#] public static string[] GetFileSystemEntries(string, string);
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Lets say I wanted to have a GUI application go out and get multiple stock quotes from many different sites. However, I would like each process to be independent of the other, because one website might not respond well. For example, I don't want the first process to hold up the others. I also will need some kind of response (write quote to GUI) from that process
Suppose I have a method GetQuote , and I want it to return the quote.
string GetQuote(string companySymbol, Uri siteToGetTheQuoteFrom)
Note: Thread does not necessarily mean the .NET object I am trying to use it in a general generic sense.
Thread1 -> GetQuote("ABC", http://www.nasdaq.com)
Thread2 -> GetQuote("MSFT", http://msnmoney.com)
Thread3 -> GetQuote("ACN", http://fool.com)
What approach would I take, using Threads or Async calls via delegates ?
Thanks in advance
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Hi there
I saw a user code sample of a web spider on GotDotNet.com. It was written (very cleverly indeed) by one of MS's people (soz cant remember name now).
In the example he uses a managed ThreadPool and fires the requests from there. I would say this looks like your best bet.
Hope you find it, else i'll try get it
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|