|
that's already in there:
<br />
public partial class FormAlgemeen : Form<br />
{<br />
<br />
BindingList<ActiveTable> listOfDoubleIndexTables = new BindingList<ActiveTable>();<br />
Good point about my modifiers though, i'll rewrite and add some accessor methods later.
|
|
|
|
|
Whooops! Go look at my previous post again.
|
|
|
|
|
wel, defining properties did the trick.
Thanks a lot for your time, and patience
|
|
|
|
|
Hello everyone,
I have a ComboBox with some options to select. I don't wish the user to be able to Edit the options in the ComboBox. Just simply select the options. I have checked the Windows Property of the ComboBox and I cannot find any options to disable the Text Edit of the ComboBox.
I was wondering if anyone can tell me how I can stop the user from editing the options in the ComboBox.
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Either use a ListBox or check out the DropDown[^] property of the ComboBox.
|
|
|
|
|
Set the DropDownStyle property to DropDownList
|
|
|
|
|
I have a device that is connected to our local network that I need to send data to it to preform a action. Can someone give me some advice on how to acomplish this?
|
|
|
|
|
That depends entirely on the requirements of the device. Ethernet doesn't define a transport protocol or any kind of communication protocol, which is what you need to know to talk to the device, like TCP/IP. Ethernet merely defines the standards for the physical and data link layers of the OSI model. You need to know what the device defines for everything above these two layers to talk to it.
The first place to start is the manual for the device.
|
|
|
|
|
Device is a little vague. Does this device have any interfaces you can write code to hook into it? I think we need a little more info here.
I wrote some old delphi code that used an activeX a while back to work with a device on the network, but I am pretty sure it won't help you in this case.
Ben
|
|
|
|
|
Sorry about being vague. This is for a thermal printer. They do have some docs at http://bocasystems.com/ethernet.html which more or less talk about connecting the printer to a network, printer drivers at http://bocasystems.com/driver.html which allowed me to hook up to USB to print from word, and then the manual at http://bocasystems.com/mini_manual.doc.
I dont expect you to read all of this info and help me out, but they do provide the information. I have a older version of this printer which was connected via a serial port and to make it print and to format the text I had to send code like below to the printer. So I have to be able to send this same code to my new printer.
<rc15,860><hw1,1><f2>Ticket #
<rc51,860><hw1,1><f2>SECTION
<rc74,860><hw2,2><f2>
<rc68,843><lt2><bx36,225>
<rc121,860><hw1,1><f2>ROW
<rc141,860><hw2,2><f2>
<rc136,843><lt2><bx36,225>
<rc191,860><hw1,1><f2>SEAT
<rc213,860><hw2,2><f2>
<rc206,843><lt2><bx36,225>
<rc261,860><hw1,1><f2>PRICE
<rc283,860><hw2,2><f2>$
<rc276,843><lt2><bx36,225>
Does any of this help with what I am needing to try and do?
|
|
|
|
|
|
Well if I have the drivers installed onto my system it does allow me to just print from word, but the problem is I have to send it the code on how to print and not formatted like in my previous post. This tells the printer where to draw box's, where to add a barcode etc. Would that active x you wrote send data to the system like this (raw data not formatted for printing)? I think that is what is needed but I am not 100% sure.
|
|
|
|
|
If you really have a lot of need to do custom printing, there are some things to consider. First I hope your printer accepts post script. If it does, I would just create a post script file and send it to the printer. If it has its own printer language, then you will have to abide by whatever that language is. The activeX control I used was for a device that wasn't a printer. The printers I have worked with I have either sent postscript or custom printer language. I didn't check those urls you sent, but I am sure somewhere in there it would say if the printer has a postscript print driver or if it has a custom print language that it uses.
Ben
|
|
|
|
|
Sorry I just realized the code I pasted was seen as html in one of my pervious posts. If you goto http://www.marketingwebforce.com/tix-text.txt you will see the text that I used to send to the printer so yes it has its own printer language. If the active x is not for a printer, if its just able to send data to a set IP Address then it seems like it would also work. I am trying to get something figured out in the next couple days with this and if the price is right I would even purchase the ActiveX from you if it did the job for me. The only thing that is a little different is per each computer it is used on I would like a setting to say where to send the data (USB or TCP/IP & what IP Address) so that way this same program could be used no matter when I am.
|
|
|
|
|
Just to update my last post.. this printer does have a print driver which I have installed but then I can not code to format the print correctly which is why I need to send it the printer language.
|
|
|
|
|
The activeX I used was for a custom scanner, so it would not work with this printer. I think your only option is to install the print driver where ever you think you will run the program and just the printer drive to communicate to the printer. When you send that file to the printer it should understand it and print what you are asking it to print.
If you are using a usb connection you might have some copy options so you wouldn't have to use the print driver then. I would try hooking up to the usb see how the device maps on the computer. Certainly if it shows up as a drive you could copy to it, most likely it will just try to load the printer driver for it.
Ben
|
|
|
|
|
Is there a way to get the users MyDocuments location with C#? I have a folder browser dialog that I would like to default to that location when the user opens it. Thank you
|
|
|
|
|
This should do it:
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
Ben
|
|
|
|
|
|
Thank you very much for the help!;)
|
|
|
|
|
Can anyone shed any light on the reason why when I execute the following code to set a time for 1 minute, i.e. 60000 milliseconds it takes around 3 minutes for the timer to 'tick'.
<br />
public void setCheckInterval(int i_checkInterval)<br />
{<br />
switch (i_checkInterval)<br />
{<br />
case 0:<br />
_i_checkInterval = -1; break;<br />
case 1:<br />
_i_checkInterval = 60000; break;<br />
case 2:<br />
_i_checkInterval = 60000 * 3; break;<br />
case 3:<br />
_i_checkInterval = 60000 * 5; break;<br />
case 4:<br />
_i_checkInterval = 60000 * 10; break;<br />
case 5:<br />
_i_checkInterval = 60000 * 15; break;<br />
case 6:<br />
_i_checkInterval = 60000 * 20; break;<br />
case 7:<br />
_i_checkInterval = 60000 * 25; break;<br />
case 8:<br />
_i_checkInterval = 60000 * 30; break;<br />
case 9:<br />
_i_checkInterval = 60000 * 60; break;<br />
}<br />
...<br />
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
I am not really sure how we are supose to figure out your problem from the code you have posted. Usually if you want a more accurate timer you should use the System.Timer not the standard one you get in your tool box. To get the System.timer, right click on yrou tool box, select choose item. In the .net tab look for the system.timer and select it. Now you should have the system.timer in your tool box.
Note without seeing your other code it is hard to say why the event isn't firing on time. I would guess it has to do with some other threads are keeping the CPU busy. I would guess there is something else in your code that isn't probably working they way you expect it to. If you just let the timer run by it self without anything else running and check your watch, I would guess you would see that the event would fire pretty close to 60 later.
Ben
|
|
|
|
|
Hello,
MicealG wrote: public void setCheckInterval(int i_checkInterval)
{
switch (i_checkInterval)
{
case 0:
_i_checkInterval = -1; break;
case 1:
_i_checkInterval = 60000; break;
case 2:
_i_checkInterval = 60000 * 3; break;
case 3:
_i_checkInterval = 60000 * 5; break;
case 4:
_i_checkInterval = 60000 * 10; break;
case 5:
_i_checkInterval = 60000 * 15; break;
case 6:
_i_checkInterval = 60000 * 20; break;
case 7:
_i_checkInterval = 60000 * 25; break;
case 8:
_i_checkInterval = 60000 * 30; break;
case 9:
_i_checkInterval = 60000 * 60; break;
}
...
What should this method tell us?
MicealG wrote: Can anyone shed any light on the reason why when I execute the following code to set a time for 1 minute, i.e. 60000 milliseconds it takes around 3 minutes for the timer to 'tick'.
One reason could be that you use the System.Windows.Forms.Timer (Off course you do because you said 'Tick'), which runs in the UI thread.
This can be blocked from the busy UI.
If you need it more time secure you could use System.Timers.Timer or System.Threading.Timer.
Hope it helps,
All the best,
Martin
|
|
|
|
|
I second what the other two said, but I prefer to look for the easy solutions first. Like checking the value of i_checkInteral . Seems to me that it's value is actually 2, right where you set the timer for 3 minutes, when you expect it to be 1.
|
|
|
|
|
Hello Dave,
Please tell me, what the h... is this method doing?
Is it a second timer which checks the first?
Thanks for your time
Martin
|
|
|
|