|
Is it possible to write a win2000 driver to control a usb ir remote in C#?
|
|
|
|
|
Yes, it is possible, but will just be alot of work.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
Would it be simpler doing it in C then?
|
|
|
|
|
Hi i'm having a bit of trouble implenting a program with associated file types.
Implenting the the association is working right, and when i double click on a file with my extension the program starts and open the double clicked document. However, a new instance of my program is started for each document, and this is not the correct function i'm looking for.
So in short what i want is to only run one instance of my program and any files double clicked after an instance is started should open in the allready open instance of my program (get it ? sorry for my bad english
I've seen an article on preventing several instances of a program, but i'm lackin some knowlege on how to pass the arguments to the allready running program..
Any help would be great
|
|
|
|
|
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hey all,
I'm writing an RPG loosely based on Wizardry in C#. I was wondering what y'all thought the best way to transfer a map into the code was. As of now, I'm just writing it in a text file then using a StreamReader to put it into the code. However, the StreamReader seems to format the text when it puts it into the code. Here's a sample map:
eeeeeeeeeeeeeeeeeeeeeeee
e wwwwwwwwwwwwwwwwwwww e
e wwwwwwwwwwwwwwwwwwww e
e wwwwwwwwwwwwwwwwwwww e
exwwwwwwwwwwwwwwwwwwww e
e e
eeeeeeeeeeeeeeeeeeeeeeee
In this simplest of maps w is the wall e is the edge and x is the character location. How should I read this into the code?
Thanks,
...Zack...
GCS\P\SS d- s-:- a-- C++ U--- P--- L- E- W++ N o K- W+++ O++ M-- V PS+ PE Y+ PGP t+ 5+ X+ R++ tv++ b++ DI++ D+++ G+ e* h- r++ y+
|
|
|
|
|
Just read it into a 2d array?
Sounds simple enough to me.
Wrap it all up into a class that gives you all the basic moveForward, moveBackward, MoveLeft, moveRight, turn, lookUp, etc... methods...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I got a ImageList on my form and trying to attach this to a toolbar control, but the toolbar buttons show garbled image. Ex: Toolbarbutton1 should show the imagelist index 0 button, but it shows shrinked image of bitmap strip.
Already did this:
1.Added imageList1 to the form and added a couple of members via Collections property of imageList. (Question 1)
2.Added imageList1 to the Toolbar's imagelist property.
3.Set the ImageIndex(toolbar->Buttons->Collection->toolbarButton1) to the imagelist index.
4.I have added the bitmap (Add -> Add Existing Item). The bitmap strip contain 7 images. (as a Embedded resource)
Question 1. Do I need to add the bitmap strip only once for the all the images? or Do I have add it once for every image on the bitmap strip?
What settings did I miss?
Don't and drive.
|
|
|
|
|
I thought that you were supposed to add each image to the imageList as a separate image. That's what I have done before.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
I thought that you were supposed to add each image to the imageList as a separate image. That's what I have done before.
Yes, and this is the best way to do things, IMHO. But in the .NET imagelist control, there is also the option of adding a bitmap strip and having it divided up into seperate icons.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
there is also the option of adding a bitmap strip and having it divided up into seperate icons.
How? You mean in the code?
Don't and drive.
|
|
|
|
|
Yes, using the ImageList.AddStrip method. As James T Johnson said below, the ImageList designer may not support this - i.e. you'll probably have to add it by code, not through the designer.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
You should only have to add it once, but make sure you call AddStrip instead of Add. To my knowledge the ImageList designer does not support this usage.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
if my C# application have a webbrowser to open/operate an excel file. When I deliver the application to the user, must the user's computer has excel installled?
It seems that all the office object are COM based not within the .NetFramework.
any idea?
thanks.
|
|
|
|
|
The .NET classes for Office are just wrappers around the COM automation interface. That means if you want your users to have Excel functionality, then they'll need Excel. There is no way around this.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
If you create a setup routine with .net it will see that there is a reference to excel and add a own excel.exe into the needed files for the installation!
|
|
|
|
|
Here's the scenario:
We're migrating an existing java Windows application to .NET over the next several months and were thinking of using our new app to open the older one as a way to minimize the user's confusion.
Is there a way to open an existing java app as an MDI child inside a .NET MDI parent form?
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (my first abstract photo)
|
|
|
|
|
SimonS wrote:
Is there a way to open an existing java app as an MDI child inside a .NET MDI parent form?
Read this: Embedding .NET Controls in Java[^], it's a little different but check it out.
-Nick Parker
|
|
|
|
|
Is there an object I can use to stop/start a website hosted on the local machine programmatically?
For example, perform the same actions that occur when you click the STOP button on the Default Website in the IIS Console.
Thanks in advance.
Cody
|
|
|
|
|
Just kill/start the process! Look under services for WWW's commandline.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
hi ,
how can i add a gripper to a toolbar ?
thanks
|
|
|
|
|
hey there.. i have a problem working with an older data type that i dont know how to handle..
i have a byte (8 bits) which tells me if 8 different options are turned on or off.. so when i read in a value of 36 i know that bit 6 and bit 3 are on (32 + 4 = 36).. im trying to figure out an easy way to get if a bit is on or off without having to write some sort of code to parse the byte value..
so if i have:
byte bByte = GetByte(); i want to be able to write a function (or use one that exists) to call something like:
if (IsOption1On(bByte))
...
can someone help me understand how this works?
thanks in advance!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
You can use & operator to get what 'flags' options are set.
if ((bByte&0x01)!=0) {}
if ((bByte&0x02)!=0) {}
if ((bByte&0x04)!=0) {}
You can use this function to get whether is option set (nOpt is value from 0 to 7)
bool IsOptionOn(byte bByte,byte nOpt)
{
return ((bByte&(1<<nOpt))!=0)
}
Hope this helps
i'm only pointer to myself
|
|
|
|
|
this helped a bunch.. but im doing something wrong.. i dunno what it is..
it seems to work fine until i get into higher numbers.. here is whats happening:
byte myByte = 45;
bool bOn = (myByte&0x64)!=0;
b0n should be false since 64 is bigger than 45, so bit 7 should be off.. but its returning true ..
what am i doing wrong?
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Problem is that number 0x64 (this is 16*6+4*1 = 100 ) is in hexadecimal and 64 is decimal.
To learn more about this I recomend you this article[^].
i'm only pointer to myself
|
|
|
|