
tonofsteel
Avatar/Signature-
Posts
35 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by tonofsteel
-
sendmessage and mapped files
tonofsteel replied to TheDon's topic in Interoperation / Office Integration
Anyone know about this? I am also curious about this, and this is the only post about mapping files that comes up when searched. Does anyone have any experiance on mapping files to do the functions found here? -
I am trying to communicate to mIRC using a DDE connection. I have read the basics on what it is, how and why it works, but cannot get any code to work. I only get hundreds of errors, and when i try to figure something out and change a piece of code i get thousands of errors. So any help would be appreciated. Especially code snippits on how to actually get the connection initialized and a request sent and data recieved viewed.
-
Could you use C++ .net to write a operating system. How do you go about making an operating system? I know that to write something like Windows or even old old Dos is not a easy task. How do you write some code and make it so that the computer will boot up with it. What libraries would you use? Could you start off with writing a simple 'hello world' bit of code and get the computer to boot up, and run your program that simply controls only the monitor to write that text to it? Is that a hard task to acheive. Do you have to use or write drivers to access hard drives, graphics cards and other devices? If you download say the Nvidia graphics card driver how would you know what to call or use from them? I am interested in this because slower X86 Processors are becomming very economical to use in a control type application, but windows is an excessive operating system to use for controlling a few motors, valves etc. And dos is no longered offered by microsoft is it? As well how would you write a compiler. Do you write something that recognizes "print" and then directly interpret print into some machine language that will print something to the screen?
-
Thats a very good tip. I was wondering if professional programmers that program for a living just remember everything or if they do have to keep referring back to code examples and text books. But I will keep what you said in mind, thanks.
-
Some times I forget something particular about something. Such as the step function of a for loop, and instead of hunting through 50 sites with 200 tutorials for the one line of comment that i need, so instead i just search old stuff here to see if some newbie like me asked the question before. Its not a big deal really I was only curious as to why
-
How do I set the Margins on a Page Setup Dialog?
tonofsteel replied to tonofsteel's topic in Windows Forms
Ok, there was my problem. I was thinking that .5 was .5 inches. But after I put 50 in, it shows up as .5 inches in the Page Setup Dialog. Thanks -
Ah yes, thank you Nerseus.
-
Yea just what pjv said, searching for an API function that does...... Anyways what VolteFace said makes sense so I guess gotta live with whats there. :)
-
How do i access the VBKeySpace, or VBkeyF1 and such. I cannot remember which namespace it is in. Which is another question. If i know something exists but forget the namespace it is in, how do i find it?
-
I have been trying to search many things, but the minimum length of a word to search for I find is ridiculous, especially for a programming forum. Key Codes cannot be searched because of this. API Functions, For Loops, and many more cannot be searched. Sure you can get functions, but you get too many results and most of them are not even related to API. How do you search anything API for that matter. There is probably a reason for this so someone inform me about this
-
I use the lines: PageSetupDialog.PageSettings.Margins.Top = 0.5 PageSetupDialog.ShowDialog() PrintDocument.DefaultPageSettings = PageSetupDialog.PageSettings() The PageSetupDialog only will show 0 for the margin i try to set. As well if i put this in a print button where the dialog is not called it gives some error about it cannot access this or something. Why when I TELL it to change the top margin will it always change it to zero or ignore it?
-
I open a form using the showdialog. When the form closes I need to test if the cancel button or the ok button was pushed on my form. How do i do this?
-
I thought this was possible by setting the keypreview property on the parent form to true and then using the keypress, keyup, or keydown events of the panel?
-
By making the back color transparent does that not essentially produce the desired effect. Anything underneath the label should come through and the text of the label should be visible overtop as long as it is the top control on the form.
-
Have you drawn one group box inside another, or have you dragged one group box into another? Try drawing them away from each other (same size) Then move groupbox1 where you want it Then manually enter the x and y values into group box 2 Then see if the code works
-
Thank you mutant. I also found the following method as well (after a lengthy search) for anyone else who ever comes across this problem: writeStream.WriteLine(this.BackColor.ToArgb()); Notice that we store the color as a string representation of the ARGB value. This will allow us to store any color, and successfully retrieve that color. If the color had been stored using the ToName() function, this would cause problems if the colour was anonymous as it would not be easy to read back in (try it!). Finally, we convert the string representation of the color back to a usable Color object using the FromArgb() function. this.BackColor = Color.FromArgb(System.Int32.Parse(readStream.ReadLine()));
-
I have a picture box and the user can change the background color of it. I write the color to a file and then upon trying to load the string back into the color variable it says it cannot convert it. How do i do this the cheap and dirty way?
-
I use this code in a public function in the main form, as it needs to be used in several completely different occations. It works perfect if i but it in a button, but as soon as it is inside a function I call..... trajedy: If WriteString <> Nothing Then xlSheet.Cells(yer, counter - (10 - i)) = WriteString End If And I get this error: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll Additional information: Exception from HRESULT: 0x800A03EC.
-
I am trying to set my start time in a DateTimePicker control to 00:00 with the 24 hour clock. I cannot change the time no matter what I do, it just tells me it is read only, or it could not convert the string to a datetime. So do you have to use the time NOW, or can it be selected at run time programatically??? StartTime.CustomFormat = "yyyy-M-d:HH:mm" EndTime.CustomFormat = "yyyy-M-d:HH:mm" StartTime.Value = Convert.ToDateTime(DateTime.Today & ":00:00")
-
Potentially easily solvable question-Help needed! Date/Time Picker
tonofsteel replied to nem33's topic in General
Public Sub SetMyCustomFormat() ' Set the Format type and the CustomFormat string. dateTimePicker1.Format = DateTimePickerFormat.Custom dateTimePicker1.CustomFormat = "yyyy-M-d:H:m" End Sub 'SetMyCustomFormat Note The Format property must be set to DateTimePickerFormat.Custom for this property to affect the formatting of the displayed date/time. -
To do this will require some electronics knowledge. There are basically two ways to do this: 1. Buy a kit that comes with basically everything that you need to do this. This is bad because it is heck of an expensive thing to buy. And you only get the power to do stuff that the manufacturer setup in it. Which in most in-expensive kits just allows you to turn stuff on or off. Where if you do it yourself you can also hook up temp sensors to a A/D converter and take readings, or for that matter any analog data. 2. Build your own. Using multiplexing and demultiplexing of the parallel port and some radio frequency transcievers to transmit data from your computer to the particular device you want to control. Bad because it is time consuming and can get pretty expensive. But the major plus is you have total control on how the system works and how you want to make your program. I did something similar (minus the RF stuff) to control lights using the parallel port to turn on transformers to turn on relays (The parallel port cannot sink very much current). I recommend though that if you are messing around with the ports on your computer for controlling stuff you should add an opto-isolator so if your circuit (or the one you buy) fries or surges it will not take out your port as well. Also does not have to be the parallel port, can be serial port, USB, depending on how you want to implement it. Can use your computer to communicate wirelessly to a microcontroller (or a few of them) to control different stuff around your house etc.
-
Potentially easily solvable question-Help needed! Date/Time Picker
tonofsteel replied to nem33's topic in General
Yes how do you select TIME with a DateTimePicker?????? -
If you put an empty loop, it locks up the program because it is using 100% of the processor and never leaves. With the original code you would go to click but the program would be sleeping and whenever you would want to do something with the form there would be endless little pauses and freezes. By getting rid of that it does not freeze pause or even slow the computer down. If the program was using 100% of the processor you would not be able to click buttons without any delay or type text without there being a pause between what you type and what shows up. I was thinking that too, but try it, and see what happens, you may be surprized. It almost seems like that statement is saying, while ExitLoop is false pause the program, and after that does not loop, just waits for the exit loop to change to true
-
Well I finally got it, and anyone out there that plans on processing a file with lots of data, such as a log from something, and you want to filter out data, make sure you use a temp file, its the fastest way I found to do it. The code I was using will give you a general idea of the algorithm: Public Function PFilter(ByVal FilterIndex As String, ByVal FileName As String) Try ' Create an instance of StreamReader to read from a file. Dim sw As StreamWriter = New StreamWriter("C:\Temp.log") Dim sr As StreamReader = New StreamReader(FileName) '"I:\SSP\03 dwnld\07\20030717.All_Event.log" Dim line As String Dim IsItThere As Integer Dim count As Integer ' Read and display the lines from the file until the end ' of the file is reached. Do line = sr.ReadLine() For count = 1 To FilterStruc(FilterIndex).NumberofFilterItems IsItThere = InStr(line, FilterStruc(FilterIndex).FilterItems(count), CompareMethod.Binary) If IsItThere > 0 Then Exit For Next count If IsItThere > 0 Then sw.WriteLine(line) End If Loop Until line Is Nothing sr.Close() sw.Close() Catch Ex As Exception ' Let the user know what went wrong. MessageBox.Show(Ex.Source & Ex.Message) End Try DoWhileNotDone = False End Function After this function executes, the file is then loaded by the program into a rich text box. A 1.4 MB file to filter out about 10 terms, save them to a file, and load the file in the window takes about 1 second.