374 Posted Topics
Re: Seems you have almost answered your own question really. you obviously understand the difference. There is no right or wrong way to choose. Static methods shorten code, typically a static method creates an object does some thing with it and returns a value, requiring a simple interface for a complicated … | |
I am trying to read data from a bloodpressure meter that has a usb interface that windows recognizes as a HID device. The BloodPressure meter comes with no documentation or software for its USB port. but other meters similar to this one allow you to download data from it about … | |
Re: you are asking your application to do a lot of changing, but you aren't telling i that it needs to repaint. after you change the opacity you should call either this.Invalidate(true); which will cause the form to repaint when but only as seen fit by the system. this is typically … | |
Re: could possibly be managed via usb via serial data messages like an old video game controller. a good place to start would be looking through the device manager and see if you can find the device that manages them in the list of devices, possibly as a HID compatible input … | |
Re: sounds like your child forms don't have the MdiParent property set to the instance of the mdi form. when you create your child forms you should set the MdiParent property on the form, and be sure that the mdi paretn form has the isMDIContainer property set to true. [CODE] Form2 … | |
Re: Everything useful springs from necessity. The first hunter was hungry! I would suggest you fill the void of things you need. when in the course of your daily life something seems difficult, find a way to make is simpler. having trouble remembering bills, write a bill reminder application. Having trouble … | |
Re: assuming prj means project as prj is the file extention of a Visual Basic project file. the name "web file" is a typical distinction meaning a group of browse-able files on a network, "window application" generally refers to a desktop application. Using the terms "import" and "add files" could mean … | |
I recently started messing with tcp socket programming. I hacked up a little instant messaging application that seems to work has some little problems but the world isn't in need of more IM clients. but I wanted to know a good practice for sending large files over tcp sockets. i … | |
I have been working with desktop server/client applications today, making pretty good progress when I came across a problem. the webserver I use for my website is shared and doesn't allow me access to start programs so I must use my desktop as a server. The problem with this is … | |
Re: well I can tell you Google didn't write it. they based their entire empire on something they paid for with petty pocket change. Its a great system, they have evolved the original algorithm a bit. It is unclear to me why you would post this question in the C# forum. … | |
Re: that's really neat danny. Idk when i might ever need it. But I'll add it to my private code snippet library just in case. right next to that numbers only with 1 decimal point only textbox class. | |
Re: [URL="http://blog.voidnish.com/?p=17"]http://blog.voidnish.com/?p=17[/URL] have fun! | |
Re: You have some foggy spots, lets clarify. is it 2 separate applications, or 2 different forms in the same application? If it is 2 separate apps, are they both written by you and are editable? | |
Re: if you are creating a snake game you might want to create the snake as instances of a custom drawn square, so that you can place instances on the game board as positions on a grid. as this is how the game snake was originally written. ( I did one … | |
Re: ITS A GREAT LANGUAGE FOR INDEPENDENT GAMES!!! nah really it is. infact you can easily develop managed direct X games or use the XNA framework which is a C# exclusive development framework that allows you to easily make 2d and 3d games for windows, XBox360 and the Microsoft Zune. and … | |
Re: you simply download the source and open the project file, the standard for C# is a Visual Studio solution. but whatever editor the source code project is written in is the best to use. Not likely its written with eclipse, but it might be. | |
I have been working on a custom Hue Slider, when you drag the knob the color of it changes to its hue value. (ex 0 is red). I added a little gloss to the knob, I feel its not done, I Just don't have any Ideas as to how to … | |
Re: If a program is written in any .net language it can be decompiled via reflecton, most commonly the free tool from reg gate the dotnet reflector. but, I don't think anyone here is interesting in helping rip off the work of a fellow programmer, also, I checked. that program is … | |
Re: ok, first thing you need to do is set all the controls you need access to from the outside as properties. example [CODE] public Panel thepanel { get { return mypanel; } set { mypanel = value; } } [/CODE] this will let objects see your controls and access them … | |
Re: very simple solution, just use GDI+ to draw a new arrow :) at the end just throw in [CODE] //e.Graphics.FillPolygon(Brushes.Black, new Point[]{new Point([I]x, y[/I]), new Point([I]x, y[/I]), new Point([I]x,y[/I])}); [/CODE] specify the points as needed. since you only pass 3 points you get a triangle, if two points have the … | |
Re: You aren't technically posting in the right place, that appears to be a asp.net question written in C#, there is an asp.net forum here at daniweb for that. you might get better help there. the error states your code should have the <%runat="server"%> tag. but it could also be that … | |
Re: As less of a discussion answer, and more of a poke at a simple explanation. header files are a type of include. so when you need some functionality in your program you don't have to start from scratch. Some code is available to start with, and when you program is … | |
Re: [B]Sorry papanyquiL, apparently I should reload my tabs more often, I had this tab open an hour before I got around to answering, lol, I guess I am over multitasking... Below is the almost identical answer as above lol, and daniweb doesn't have a delete button, just an edit.[/B] You … | |
Re: create a lineargradientbrush and on the forms paint event fill the clientrectangle spluah! [CODE] protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); using (LinearGradientBrush lgb = new LinearGradientBrush(this.ClientRectangle, Color.Blue, Color.Black, 90f)) { e.Graphics.FillRectangle(lgb, this.ClientRectangle); } } [/CODE] don't forget to add the namespaces: [CODE] using System.Drawing.Drawing2D; using System.Drawing; [/CODE] have fun! | |
Re: Ok, the simple solution is to have your program save the embedded resource swf movie to disk if it doesn't' already exist. then pass the path to your load movie function. more importantly, instead of using the loadMovie function, the appropriate way to load a flash movie is using the … | |
Re: the image returned will be the same size as the rectangle it was cropped from, not the original image, as for any other problem. you might want to look at how the cropping rectangle is created. The code you have posted looks sound, there is no reason why it shouldn't … | |
Re: [CODE]Button B = this.Controls[buttonname];[/CODE] That should work for what you are looking for. or you could add each control to a list and access it that way, I can think of a lot of ways, but this is the simplest. | |
Re: ok lets jump off this dock. the X and Y properties of a location type cannot be set directly. so no you can't set them that way. the "anchor" property should do what you want, but only if the position of your controls is set prior to the setting of … | |
I am writing a custom slider control, All its functionality is accounted for but now the aesthetics (which was the reason for writing it in the first place) has become problematic. It starts with a custom class that converts true hls and rgb, thats 360 stops not 255. then I … | |
Re: Its not in a class, the method has to be interloped from shell32.dll here's an example on codeproject [URL="http://www.codeproject.com/KB/cs/iconhandler.aspx"]http://www.codeproject.com/KB/cs/iconhandler.aspx[/URL] Please try and search google for answers before posting questions in our forums. they tend to get crowded with links to codeproject or dream in code. | |
Re: Creating a web browser from scratch is an amazing feat, its hardly ever done by one programmer and a simple tutorial wouldn't cut it. but if you really want to, a good place to start would be learning to parse HTML. this could be done several ways, but the problem … | |
Re: do you need to worry with the order of the numbers? if not you could easily work with the numbers as strings. split them into an array by the space, create a destination and list and loop through them, if the dest list doesn't already contain the value, then add … | |
Re: That's interesting sknake, I never would have thought of catching the close method like that. But as far as all these answers go, the Simple response is the X button does only call the form to close. and however you catch that close call, either by wndproc or by a … | |
Re: if you can keep formatting when you paste into your text box, its a richtext box. inorder to save and open ritch text formatting to a ritchtext box you must you richtextbox.SaveFile(). and richtextbox.LoadFile() receptively. not just read and set its text property. | |
Re: I would also like to point out that the code sknake posted is a "per machine" list of installed programs, some programs are installed on a "user" level and would not appear in this list. also most MSI installed applications won't appear in this list either. I am not sure … | |
In my project I had been using a set of arrays to hold some data, realized it was a bad design, so then I decided to create an object that holds all the relevant data, and add them to an arraylist, this work great except all the data was information … | |
Re: idk about authentication, but I have done much heavy scripting in flash, as far as I know, if a flash application is not scripted to accept external modifications of its variables. then you won't be able to. but I could be wrong. if the variables are on the root of … | |
Re: To answer the OP's question, Keyloggers could be written in any language, although it will require some simple calls to the windows API. If you have any experience in programming I don't see how you could have any problem with such a simple thing. any of the guys here could … | |
Re: If you are asking if Visual Studio will do if for you no. It won't and doesn't support a "circular" reference. you can alternatively achieve this through reflection. But you won't have all the neat perks visual studio would normally give you with a design time reference. I would suggest … | |
Re: I know this has been handled... but after reading through, why go so complicated? why not just use a timer control? seems odd to create a new thread for the sole purpose of sleeping it. | |
Re: depends on what you consider a reference, a temporary one using reflection is the one only way without using a reference at design time. here's an example [URL="http://mahiways.spaces.live.com/Blog/cns!6A1F270FEA8CDD8C!338.entry"]http://mahiways.spaces.live.com/Blog/cns!6A1F270FEA8CDD8C!338.entry[/URL] | |
Re: you could instantiate it in a static class with a static property that refers to a static variable as mentioned above. but another method would be just to instantiated it in the first form you need it in then expose it as a property of that form. then you could … | |
Re: There is an EASY way. all cell phone companies provide a EMAIL to TXT gateway. So if you look it up, example ATT's is the 10 digit phone number followed by @txt.att.net. Then you just send an email to that address and it sends a text message. Very handy. I … | |
Re: That's great code scott, but if you just want to know all the time the condition of the mouse buttons. even when the form is not focused, you will need to implement a low level Mouse hook. here is a link [url]http://www.codeproject.com/KB/cs/globalhook.aspx[/url] I recommend version 1, not 2. if you … | |
I have been part time working on the same application for a year. its a very self serving, on day freeware application for easily accessing applications ect. I need a container for dynamically create rows of buttons, I am currently using some transparent panels, and changing their visibility when I … | |
| |
Re: search for drawing in C# using GDI+ The idea is usually just to create a custom user control, what has a user paint property set to true. override its paint event then using the graphics object supplied by the event to draw what you need. just simple circles and such … | |
I have created a custom drawn search bar for an app i am working on. see picture: [URL="http://www.diamonddrake.com/test/imgs/mySearch.JPG"]http://www.diamonddrake.com/test/imgs/mySearch.JPG[/URL] when the user clicks on the google icon to the left. a little borderless form opens with custom drawn buttons that have icons for other search engines, you get the drift. only … | |
Re: [QUOTE=serkan sendur;952040]go fa ya app and ma it a roole and pu it in ya a...[/QUOTE] ROFL!!! to the OP. there is a million ways, easiest would be to create 2 user settings that is of string type, and on successful log in, save them, then load then with the … | |
Re: if you wanted to create an application that launches the others, and allows you to switch around between the windows, yes you can. But integrate them directly into the same application... no sir, sorry you cannot. you could create the illusion of it. by storing the applications inside of a … |
The End.