374 Posted Topics

Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
143
Member Avatar for Diamonddrake

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 …

2
453
Member Avatar for ashishkumar008

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 …

Member Avatar for kvprajapati
-1
161
Member Avatar for pradeepsimhanp

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 …

Member Avatar for Diamonddrake
0
138
Member Avatar for michaelsd

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 …

Member Avatar for Diamonddrake
0
892
Member Avatar for angele18

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

Member Avatar for CrappyCoder
0
1K
Member Avatar for cthoes

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 …

Member Avatar for Mitja Bonca
0
152
Member Avatar for tanco

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, …

Member Avatar for tanco
0
101
Member Avatar for jpaterson2525

[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.

Member Avatar for jpaterson2525
0
87
Member Avatar for Diamonddrake

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 …

Member Avatar for Diamonddrake
1
197
Member Avatar for adiiz

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.

Member Avatar for Diamonddrake
0
348
Member Avatar for Gabrielsoroush

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 …

Member Avatar for Diamonddrake
0
126
Member Avatar for trippinz

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 …

Member Avatar for Diamonddrake
0
159
Member Avatar for by_gabrielos

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]

Member Avatar for Diamonddrake
0
154
Member Avatar for Diamonddrake

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 …

Member Avatar for shelen
0
179
Member Avatar for Diamonddrake

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. …

Member Avatar for crishjeny
0
432
Member Avatar for Purushottamkr

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 …

Member Avatar for Diamonddrake
0
1K
Member Avatar for Xeros606

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 …

Member Avatar for ddanbe
0
209
Member Avatar for metalstorm

that's the idea, for every different piece of information you need to send simultaneously. you need a new connection on a different port.

Member Avatar for Diamonddrake
0
313
Member Avatar for Wheen

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 …

Member Avatar for Diamonddrake
0
210
Member Avatar for jlininger

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 …

Member Avatar for Diamonddrake
0
101
Member Avatar for shoeson

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.

Member Avatar for Diamonddrake
0
118
Member Avatar for Diamonddrake

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 …

0
71
Member Avatar for Diamonddrake

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 …

Member Avatar for Diamonddrake
0
105
Member Avatar for Chatterbox721

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]

Member Avatar for WASDted
0
65
Member Avatar for yellowbelly

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

Member Avatar for Diamonddrake
0
170
Member Avatar for Diamonddrake

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 …

Member Avatar for Diamonddrake
0
395
Member Avatar for taylby

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.

Member Avatar for Diamonddrake
0
290
Member Avatar for DioRani

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 …

Member Avatar for Ketsuekiame
0
1K
Member Avatar for gameon

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 …

Member Avatar for kvprajapati
0
404
Member Avatar for mallyonline

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 …

Member Avatar for Diamonddrake
0
360
Member Avatar for krosty4782

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]

Member Avatar for krosty4782
0
163
Member Avatar for nssltd

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 …

Member Avatar for nssltd
0
293
Member Avatar for funfullson

why do you need names for your columns? why not just place the value in the table and have an auto increment id?

Member Avatar for nsdoshi
0
104
Member Avatar for Nivass

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? …

Member Avatar for Nivass
0
157
Member Avatar for Tewhano

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, …

Member Avatar for Momerath
1
113
Member Avatar for Diamonddrake

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 …

Member Avatar for Diamonddrake
0
162
Member Avatar for liamzebedee

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 …

Member Avatar for Diamonddrake
0
122
Member Avatar for liamzebedee

Although it is partially possible, its not a good idea for a thousand reasons. Find another way to accomplish your goal.

Member Avatar for Diamonddrake
0
117
Member Avatar for zachattack05

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 …

Member Avatar for edepperson
0
581
Member Avatar for zachattack05

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 …

Member Avatar for Diamonddrake
0
108
Member Avatar for shelly1234

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 …

Member Avatar for Yamachi
0
146
Member Avatar for buster2209

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 …

Member Avatar for Diamonddrake
0
685
Member Avatar for Toulinwoek

[URL="http://www.codeproject.com/KB/toolbars/WinFormsRibbon.aspx"]Here it is[/URL] This is a fully working free example.

Member Avatar for Diamonddrake
0
260
Member Avatar for tomprice0189

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 …

Member Avatar for Diamonddrake
0
984
Member Avatar for judithSampathwa

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+.

Member Avatar for Diamonddrake
0
149
Member Avatar for Toulinwoek

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, …

Member Avatar for slider212
0
147
Member Avatar for nssltd

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 …

Member Avatar for Diamonddrake
0
253
Member Avatar for jamesonh20

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.

Member Avatar for freewayy
-1
397
Member Avatar for octavia

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 …

Member Avatar for octavia
0
3K

The End.