374 Posted Topics
Re: the substring is an instance method of type string that takes an indexed start int and returns that character in the string to the end. so, if string line = "size=2699309"; then line.SubString(5) would count to the index of 5 or the the 6th character in the string and return … | |
I needed a very simple multi-line label control for a project I was working on, It had very simple requirements. It needed to draw text in any font, in any color, on multiple lines with vertical and horizontal alignment control. So I hacked up this little class. Just as easy … | |
Re: either decompile it and add its classes to the exe project, or extract it and late bind it. It is possible to late bind to it from memory but it requires that you use a windows api to register a filepath to a memory location. Its not a good idea … | |
Re: Take a look at the dataset class. It has load/save xml methods that will automatically create a datatable containing the data in your XML document. you can then use standard databinding if you are they type to use it, or you could navigate the datatable and select all the rows(sub … | |
Re: if all you need is a simple hotkey combination, why even go the route of a low level keyboard hook? Windows has a HotKey api for this very situation. Here is a simple but usable rewrite of some code I hacked up for one of my projects [CODE] //API Imports … | |
Re: Firstly, this is an asp.net question, it should be in the asp.net forum. But since the code here is in C# I can understand why you posted it here. There should be some img1.ImageUrl = dr[6]; ect ect | |
Re: Ok, The Main method must be static because it needs to exist without first being instantiated. Static member functions shouldn't use objects in a class that need to be instantiated because they may or may not exist yet when the static function is called. "but we can access static functions … | |
Re: If app A is not running prior to clicking the button in app B, then simply create a command line argument that is of type int, and set up the app to check for it, and select the menu item based on that command line argument. Then in app B, … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/781fwaz8.aspx"]http://msdn.microsoft.com/en-us/library/781fwaz8.aspx[/URL] According to the 2 little lines you posted. it looks fine, this link is the usage, and that works fine on my machine. Must be something else. feel free to post more code. | |
I am working on an application that lets you play drum sounds using a rockband drum kit. Current version available [URL="http://www.diamonddrake.com/software.aspx?title=RockBand%20Drum-Kit"]here[/URL] I am wanting to add a recording function but all I can think of is loop back recording. That's manageable but in Vista and Windows 7 by default the … | |
Re: Have you tried DataSet.ReadXml(); ? It will automatically create a dataset with a datable that you can use to databind to a control, or just enumerate, search, edit, and of course it has a matching SaveXml() method that creates an XML. | |
Re: You can get the type of an object by passing that object to they typeof method. [CODE] Type t = typeof(MyClass); [/CODE] but if the type is not available to the namespace you are in, then it won't work. you need to expose that type to your other dll, and … | |
Re: That last post was about Internet Explorer, That's not what you want. There are 2 ways to do what you are talking about. The best and most difficult way is to create a com object that catches Windows Explorer.exe's request to create the shell context menu and insert your item … | |
Re: try this snippet of mine from a few months ago. [URL="http://www.daniweb.com/code/snippet231466.html"]http://www.daniweb.com/code/snippet231466.html[/URL] | |
I'm new to ASP.net I am a decent C# programmer, but I usually write windows programs, not web stuff, I did my website in plain html and recently I have started working in asp.net. I've read a few tutorials, but I'm stuck on what to search for, and how to … | |
I am kinda new to asp.net. I used asp backing flash for most of the site work i have done, but I have shied away from flash and I am having some issues understanding asp.net membership. I am currently using the web.config file to set the credentials for forms authentication. … | |
Re: The simplest solution would be to just call sort on the array, and if necessary reverse it as posted above, but there becomes a sorting issues between logical and natural order. if the decimals are not padded with zeros, it could get out of order. as in 10,1,2,3...9 instead of … | |
Re: There is no reason why you can't, but it depends on the accessibility you need for the enum. If the namespace directly contains the enum than any object in that namespace has access to the enum. When its contained in a class, depending on its access modifier it may or … | |
Re: that's the idea, for every different piece of information you need to send simultaneously. you need a new connection on a different port. | |
Re: That low level input hook is some tasty stuff, But if you are new to writing applications outside of forms and want simple, that example is far from simple. The hardest part of writing a good gui free application is that the .net framework won't manually create an event loop … | |
Re: I learned C# with a free online copy of sams teach yourself C# in 24 hours. That got me the knowledge of the syntax and practice of starting a project. Then to really get down and dirty with it you have to decided on a program that you want to … | |
Re: It should work, assuming that your array is of type TextBox or Control. you could try something like [CODE]Control tb_tofocus = myTextBox[3] as Control; tb_tofocus.Focus();[/CODE] But not seeing the code is hard to tell whats going on, because in theory it should work as is. | |
I have been working closely with libvlc the core library that plays videos in VLC player. I wrote my own wrapper because its actually a well written library and all the wrappers I have found are more complicated than libvlc itsself. So 5 little classes give me all the power … | |
I have written a couple applications that Work great on 32-bit but crash on open in 64-bit. They are all compiled against "any CPU" but even when I compile them for 64-bit they still crash on 64-bit windows. both of these applications rely on 3rd party Dlls, some native dlls … | |
Re: I'm Rickey, I'm 23, and I'm a Windows Programmer. Check out some of my apps at [URL="http://www.DiamondDrake.com"]http://www.DiamondDrake.com[/URL] | |
![]() | Re: That's cool, I still prefer an emulator, But now I can play when I'm not on my own computer. Thanks for the find |
I have written a Rockband Drum kit app that lets you use the Rockband Drum kit with your PC as a drum synthesizer. It has 30 Drum wav sounds and can also be used to play sound through MIDI as well, working on MIDI recording and a loopback driver to … | |
Re: This is an interesting solution, I hacked up something to do this one time example here [url]http://www.daniweb.com/forums/thread194234.html[/url]. But I like your way of handling it a bit better. | |
Re: I never use windows media player active x controls, so im not 100% certain. course if you are starting the next song, why do you enable the play button? What is the PlayList2 ? does changing its node set the mediaplayer currentmedia? if not, then you need to set the … | |
Re: what depends on the video type. but the idea would be to create a page that contains the activex control you want to play the video with, or a much better idea a flash video player. and pass to that page the video url. Write a javascript that gets tells … | |
Re: If you look closely. Console1 is a custom control that derives from textbox. The redirect standard output needs a stream. The Console class redirects text from the stream to a textbox, and vise versa. The console control code from that project is as follows. [CODE] using System; using System.Collections.Generic; using … | |
Re: you could also call the .net C# compiler from your application details here [URL="http://msdn.microsoft.com/en-us/library/78f4aasd%28VS.80%29.aspx"]http://msdn.microsoft.com/en-us/library/78f4aasd%28VS.80%29.aspx[/URL] | |
![]() | Re: Are you trying to save an image from a webpage, like Internet Explorer or firefox does? This is untested and incomplete, But this should easily set you on your way to getting this to work [CODE] // somewhere attach the event handler webBrowser1.Document.MouseDown += new HtmlElementEventHandler(doc_MouseUp); //handle the event void … ![]() |
Re: why do you need names for your columns? why not just place the value in the table and have an auto increment id? | |
Re: I argue that, no its not the only way. There is NEVER an "only way". As a programmer, finding ways to get around limitations is only the first step of reaching a goal. But first, why do you need to change the font color and properties to show a selection? … | |
Re: a wrapper is just an object that acts as a middle ground to communicate with a library, program, or api to simplify its use, they are all different. The .net framework is a big wrapper for windows core functions. All programming involves the abstraction, whether its a layer you created, … | |
I am working on a couple projects where I need to upload files from a client using my software to my webserver and then do some other things. But I would like the software to handles this automatically so the user doesn't have to worry with it. I am currently … | |
Re: This is dirt simple, Please google your questions before you waste space on daniweb. The webclient's downloadstring method gets the "HTML Source" of any webpage. [CODE] using System; using System.Net; class Program { static void Main() { // Create web client. WebClient client = new WebClient(); // Download string. string … | |
Re: Although it is partially possible, its not a good idea for a thousand reasons. Find another way to accomplish your goal. | |
Re: Its not a great idea to just spinning off threads like that, if you have some lengthy processes that needs to be done on a separate thread it might be best to do them in the same worker thread one after another, especially if the main program isn't going to … | |
Re: This is a very valid question, But this is more complicated then it seems. First ask your self this: "Who will be using my application?". If a large company that will have many clients connecting to the database you are creating, and top speed and reliability is the most important … | |
Re: I don't understand why you would do this, but here's the dig. Form 1's "load" event fires before it is shown, if you want to show form 2 after form 1, then put the obj.show() code in the form's "shown" event, not its "load" event. But first, evaluate why you … | |
Re: Honestly your solution is totally backwoods. If you create a new process you can redirect its standard output to a stream, then do whatever you want with it. ex. [CODE] CurrentProcess = new Process(); CurrentProcess.StartInfo.FileName = exepath; CurrentProcess.StartInfo.UseShellExecute = false; CurrentProcess.StartInfo.CreateNoWindow = true; CurrentProcess.StartInfo.RedirectStandardOutput = true; CurrentProcess.StartInfo.RedirectStandardInput = true; CurrentProcess.StartInfo.RedirectStandardError … | |
Re: [URL="http://www.codeproject.com/KB/toolbars/WinFormsRibbon.aspx"]Here it is[/URL] This is a fully working free example. | |
Re: The problem is the other thread is still running when you are exiting the GUI thread. Try using the "formclosing" event instead of the "formclosed" event to stop the other thread. Although the invoke code you are using appears odd out of context. Its hard to tell exactly why its … | |
Re: That was my solution :) I still prefer GDI+ and win forms. WPF's drawing technique has much better performance, But on a todays machines its typically not a big deal. I have done some pretty amazing custom controls in GDI+. | |
Re: Instead of creating the file separate, you could just add an empty database as a resource into either your exe or a dll and have a method that extracts the stream to the new location. The user will have no idea that your program isn't creating the file from scratch, … | |
![]() | Re: I personally never got into WPF, I like my old winform applications. in C# you can't do true gradient transparency but you can achieve that look a multitude of ways. If you set the formborderstyle to none and set an image as a background you can use a color key … |
Re: an easier way it to use the Microsoft.directX.audiovideoplayback.audio class It provides a current position property and a length property that makes it very easy. | |
Re: I hear that quicktime has a COM api that allows for automatic parsing of file headers. But it's unconfirmed. Its just an idea. there is a Mpeg 1/2 class floating around. [URL="http://mpeg.chiariglione.org/standards/mpeg-4/mpeg-4.htm"]This link might help[/URL] It has a good amount of information about the mpeg-4 file format. Parsing a header … |
The End.