374 Posted Topics

Member Avatar for tanha

when you use taskmanager to "kill" the appliction, it doesn't fire any events, It simply stops the execution, This is how you close an application that has frozen. if you waited for it to handle any events, then it would still be frozen. as for when you restart the computer …

Member Avatar for tanha
0
304
Member Avatar for kplcjl

public variables are not thread safe, the get and set properties make sure that a variable isn't in use by locking it temporarily an if is locked, causing a pause to occur until it is free. Its just the preferred way the framework handles variable access. with a simple bool …

Member Avatar for kplcjl
0
87
Member Avatar for Evil Genius

Just add a trackbar with a min of 1 and a max of 4 then add a event handler for onchanged and update a label by dividing its max value by its current value you will get a percentage as a decimal, then multiply by 100 and add a % …

Member Avatar for Evil Genius
0
115
Member Avatar for vivek4020

create a event handler for KeyDown for the textbox. then in the method add [CODE] if (e.KeyCode == Keys.Enter) { listbox1.Items.Add(textBox1.text); }[/CODE] substitute the listbox1 for the correct name, and textbox1 for the appropriate name as well.

Member Avatar for sknake
0
2K
Member Avatar for Diamonddrake

If you drop a picturebox control onto a form and set its SizeMode to zoom you will notice that no matter what you change the padding property to, it won't change the output. The code for drawing the image in zoomed mode doesn't take in account the deflated rectangle it …

0
201
Member Avatar for moroshko

an idea would be to create a list of shapeobjects, and in the paint event loop through them and paint them to the panel, to determine if you are on the line of the rectangle create a smaller and larger rectangle, check if you are inside the larger but not …

Member Avatar for pauldani
0
259
Member Avatar for Diamonddrake

I have been working on an Picture adjusting/cropping/resizing/emailing app. Its concept is pushed toward looking similar to Adobe Lightroom, in that none of the adjustments affect the original images, and all the adjustments are reversible and appear on the main screen as a sidebar. The goal of the app it …

Member Avatar for Diamonddrake
0
121
Member Avatar for moroshko

1) When does Form1_Paint(..) called ? Its called when the form needs to be repainted, see 2 2) When does the Paint event of the form is raised ? The paint of a control, or form is called when a portion of that object is invalidated or refreshed, which simply …

Member Avatar for moroshko
1
432
Member Avatar for Krstevski

Instead of reading the bytes and doing the calculation, or by directory, why now go half way, just count all the files to be scanned, then increment it as it finishes files... DdoubleD's way would be the most accurate, and Ryshad's way would be the fastest, Just counting all the …

Member Avatar for Krstevski
0
654
Member Avatar for Diamonddrake

I would like to create a overridden picturebox control that accepts a colormatrix as a property, and when the picturebox is drawn it uses that colormatrix. This is to cut down on drawimage GDI calls that are slowing down my app. I would love to turn 2 into 1, and …

Member Avatar for Diamonddrake
0
514
Member Avatar for apease11

you can add commands in the shell using the registry simply open up the HKEY_CLASSES_ROOT keyset to access all the file types registered with the system, then open that file type, then open its Shell, or ShellEX folder and add a Key, name it whatever you want, Give it the …

Member Avatar for sknake
0
142
Member Avatar for naren7

as per the original question. Windows Media Player cannot stream videos from youtube because windows don't have a FLV codec. and they won't make on because Microsoft and Adobe and a falling out a few years back, and since Adobe acquired the flash platform and refused to give Microsoft the …

Member Avatar for Diamonddrake
-2
847
Member Avatar for Diamonddrake

if you have ever used adobe lightroom you would have noticed that there is an awesome sidebar with 15 or so sliders on it. they can all be adjusted from the same screen and you watch as they edit the image in real time. This is what I am trying …

Member Avatar for Diamonddrake
0
146
Member Avatar for TotoTitus

if the image is a different size, its probably the compression level. when you save your bitmap, if you save it as a jpeg file, you can alter its compression methods, changing its filesize, if you just call save, it uses the default. which might be different from the source …

Member Avatar for TotoTitus
0
10K
Member Avatar for Diamonddrake

I am working on a little image program aimed at having a simple interface but a strong backend. Its mostly just for basic bulk settings and looping through files. but will allow for all the images to be loaded in a thumbnail strip and be able to be edited before …

Member Avatar for Diamonddrake
0
111
Member Avatar for Diamonddrake

I am able to post data to a form so long as its strings. by creating a dictinary of keys and values, then creating a string in the style of key+ "=" + value "+ & repeat. then passing it to a method kinda like [CODE] private string PostData(string url, …

Member Avatar for Diamonddrake
0
331
Member Avatar for mps727

there is a couple ways to do this, the way photoshop does it is drawing to the screen... not the form. here is an example of doing so [CODE] using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Runtime.InteropServices; namespace DrawToScreen { #region UnmanagedMethods internal class UnmanagedMethods { [DllImport("user32")] internal static extern …

Member Avatar for mps727
0
213
Member Avatar for johnyjj2

sending information over a network is done using a stream. you write bytes to it. these bytes can be anything. Text, audio, pictures, whatever. Its simple, just find a way to compress your audio, but once compressed, instead of writing it to a file stream, write it to your network …

Member Avatar for sknake
0
1K
Member Avatar for Diamonddrake

I need to be able to take a point on an image and convert it into a point relative to a picturebox with the pictureSizeMode set to zoom here is the code that the picturebox uses to scale and center the image [CODE] Size size = this.image.Size; float num = …

Member Avatar for Diamonddrake
0
287
Member Avatar for Diamonddrake

I have inherited from a picturebox and modified it to allow a selection rectangle to be drawn. Everything works well, except I would like for it to work in all sizeModes. center is simple, normal is simple. but I cant' seem to get "Zoom" to work. I have used reflector …

Member Avatar for Diamonddrake
0
117
Member Avatar for dima shawahneh

Short answer: No. you could write try catch bocks around all the code you write, and then create a method tha takes an exception param, and call it in all the catch blocks passing to it the exception that caused the problem. BUT its not a good idea. try catch …

Member Avatar for Geekitygeek
0
174
Member Avatar for mstrop

I don't know if it exists in the compact framework. But you could always just do it manually, Its simple. just replace certain characters in the string with its url-Encoded equivalent.

Member Avatar for mstrop
0
108
Member Avatar for kalodakilla

Depending on your settings it might not. Rightclick on the toolbox and select "choose items" browse to your library and select the controls from it you want to see in the toolbox.

Member Avatar for kalodakilla
0
181
Member Avatar for sidd.
Re: zoom

an Idea would be to draw the graph to a bitmap. Then display the bitmap, and just modify one of those 10,000 zooming picturebox controls floating around the net.

Member Avatar for Geekitygeek
0
97
Member Avatar for DdoubleD

I like it. You say its not really a control, rather that its faked. but don't you realize that if the treeview was on its own borderless form and was created and called via the button next to a textbox, and you encapsulated all the code in a usercontrol it …

Member Avatar for Diamonddrake
1
1K
Member Avatar for Jaydenn

IF you want to affect the first form, why would you create a new instance of it? What you need to do is pass THE instance of the first from to the second form. then act upon that instance, easy. [CODE] //this is form1's button click to open preference from …

Member Avatar for Jaydenn
0
97
Member Avatar for Diamonddrake

When I installed windows 7 I opted to do a fresh clean install, but the key I purchased was an upgrade key and required that I performed an upgrade. The disk itself was bootable so I performed a clean install and modified some registry keys and ran a vb script …

Member Avatar for DdoubleD
0
105
Member Avatar for MxDev

you can read the contents of any file to a text box with the string reader class [CODE] using (System.IO.StreamReader sr = new System.IO.StreamReader("TestFile.txt")) { RichTextBox1.Text = sr.ReadToEnd(); } [/CODE] but .doc files will not load as plain text because they are a special format created by Microsoft word. But …

Member Avatar for avirag
0
3K
Member Avatar for teatime

I don't recommend using wmp.dll, but I do recommend using directshow. Windows is built around directX. included in directX 10 and higher is the directX managed libraries that supply you with video and sound objects that are very simple to use. DirectShow automatically builds a filter graph for video so …

Member Avatar for teatime
0
171
Member Avatar for valter

The way you are doing it isn't bad, you just aren't using the buffer idea correctly, the paint event should just draw the buffer image, nothing else. all the other stuff including the loop should be done in a loadthumbs method, what you have accomplished is to reload the images …

Member Avatar for valter
0
121
Member Avatar for Romil797

This is the C# forum, this is an asp.net question. I advise you post your question there for best answers. But its a simple solution. just use session variables. Create a long in form that compares to a hard coded username and password, if successful, create a session variable for …

Member Avatar for Romil797
0
94
Member Avatar for sidd.

[CODE] List<string> mylines = new List<string>(); using (StreamReader sr = new StreamReader("myfile.dat")) { while (sr.ReadLine() != null) { mylines.Add(sr.ReadLine()); } } [/CODE] Yeah, That should work. assuming each line is a separate value, otherwise you will need to load it all to memory as a string and split it to …

Member Avatar for sanch01r
0
337
Member Avatar for rutaba
Member Avatar for ivicaolic
Member Avatar for VibhorG

there is no fool proof way, but you could embed the videos into the application, when you needed to play them create a memory stream from the resource and play it from there, or copy it to temp, play it then delete it afterwards. the only tactical way would be …

Member Avatar for Diamonddrake
0
820
Member Avatar for bk_bhupendra

I'm not sure what's causing the error you are receiving. But it looks like you are trying to send the length of the data, the Filename, and the data itself as one object. then trying to pull out the data before you are sure that you have actually received that …

Member Avatar for sknake
0
426
Member Avatar for adino2

the Microsoft office assistant can be loaded as a com object to achieve that effect. but then you have to assume that all users of the app are using a version of Microsoft office.

Member Avatar for Diamonddrake
0
82
Member Avatar for Dekken

if you are referring to the controls on the form, suspend and resume layout methods of the forms class tells the form not to bother painting the controls until its finished creating them, but I don't know about this scene manager you speak of, so it may not support suspendlayout …

Member Avatar for Dekken
0
239
Member Avatar for Kloukip

Its a little ambiguous. do you want to know how to set file associations? or know how to catch the arguments passed to your app after its been associated? I will assume the 2nd one, as the nature of the question looks to be of that. you must modify your …

Member Avatar for Diamonddrake
0
202
Member Avatar for VibhorG

Its a far back reference, but using DirectX is a very good practice. and all windows computers XP and up have DirectX installed. It's installed with windows and comes as an automatic update as well. The managed directX libraries have very easy to use audio and video objects that is …

Member Avatar for Diamonddrake
0
540
Member Avatar for bk_bhupendra

If you need to customize all 3 of the buttons events, the standard practice is to create a your own title bar control such as seen on AIM and Y! instant messengers. otherwise, DDoubleD has the right idea.

Member Avatar for Diamonddrake
0
3K
Member Avatar for nccsbim071

If you write an application targeting the .net framework it will work across XP, vista, and windows 7 no problem. the 32/64 bit crossover might give you trouble if you use a lot of windows interlop. but other than that This is one of the things .net was made for, …

Member Avatar for nccsbim071
0
418
Member Avatar for RunTimeError

That's really up to the programmer. If you work for a company that expects this, then its up to them, but if you are just writing software by your self it doesn't really matter. The big selling point of putting logic in classes is portability. once you have written it …

Member Avatar for mikiurban
0
315
Member Avatar for LucerinRed

Its all basic list view control stuff. the list view can be difficult to work with, I recommend a ListView control tutorial. there are many. If I were to explain to you all that your question entails inside of this reply, it wold practically be a book. here's a good …

Member Avatar for DdoubleD
0
153
Member Avatar for crazyboy

the trick is that you have to set up a forwarded port on the router to the network that will be connected to. example, if network A has an external IP (the IP that the internet sees) of 168.100.159.172 and it supplies internal IPs (lan) incremented based on 192.168.1.100 Then …

Member Avatar for crazyboy
0
142
Member Avatar for timhysniu

as far as playing MP3s go best .net solution I have found is a free library from here [url]http://www.ambiera.com/irrklang/[/url] its called irrklang and works great and is simple to use, comes with examples. That's what I use in my apps. as for capturing video you have to programmatically build a …

Member Avatar for Diamonddrake
0
191
Member Avatar for echo off

Actually. your best approach is to create a directory on the drive and encrypt that. and write a program that handles the encryption. a well written app could even have that dir appear as the drives root and allow interaction with the contents through explorer. but seriously. if you really …

Member Avatar for Diamonddrake
-1
140
Member Avatar for Diamonddrake

I have a class that in one of its methods creates a new thread that makes some http requests, serializes the results, packs them up in an event object and then it Should call broadcast an event returning its data. but I can't figure out how. the class is not …

Member Avatar for Diamonddrake
0
157
Member Avatar for ddanbe

that my friend is because you are sleeping the thread before the paint event is finished, this means windows is never told by your program that it wants be be repainted, and since nothing you are doing outside of your program is encouraging windows to repaint your program, it just …

Member Avatar for Diamonddrake
0
291
Member Avatar for NT.

Client / server is the basic concept, the only difference is, in Peer to Peer one of the Peers acts as the Server and the Other acts as a client, you simply write in the ability for each end to be able to be the server, the only real difference …

Member Avatar for mikiurban
0
2K

The End.