|
Have a look at the parameters that you are passing. You might try putting quotes around them: "
This will not parse as part of the parameters; but be sure to escape any existing "s appropriately.
By the way, its extremely bad practice passing passwords as command-line parameters: I'd suggest trying to have the password checked by your web app against the domain, and then just passing the user's name itself to your separate application to do whatever it does with it.
|
|
|
|
|
Hi guyz.
I am trying to lock the bits of a gif image which is 32-bit. However, I am getting an invalid parameter on this code :
BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), <br />
ImageLockMode.ReadWrite, PixelFormat.Format32BppArgb);
where b is the bitmap variable in which I load the image in!
Can any body help out on this? because I really have no idea now...since in 24-bit withPixelFormat24BppRgb(bmp + jpg) worked correctly!
To Dare Is To Do
|
|
|
|
|
|
Hello
Why do you think your GIF image is 32-bit ? You can check the PixelFormat property and you will see, that it's Format8bppIndexed .
You can try to use ImageLockMode.ReadOnly mode or lock your image with PixelFormat.Format8bppIndexed or convert your image to 32-bit before (which will be useful if you are planning some image processing routines).
With best regards,
Andrew
|
|
|
|
|
Yep that's actually what I'm trying to do!
To convert to 32-bit from 8 bit index....how?? bcos I really do not know!
Thanks guys
To Dare Is To Do
|
|
|
|
|
Hello.
You can use the next code:
Bitmap bmp = new Bitmap(width, height, PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bmp);
g.DrawImage(src, 0, 0, width, height);
g.Dispose();
With best regards,
Andrew
|
|
|
|
|
Hi all
I met this problem several times. There are a combobox and a userdefined control in a form. First I select an item from a comboboxlist, then I focus the cursor into the user defined control. When I leave the user defined control, the combobox selected item will be changed automatically, it generally be set to blank. I met this problem every time I want to integrate a user control into a form with a combobox. I don't understand this. Does anybody meet this problem before???
Thanks in advance!
Asura
|
|
|
|
|
Hello Everybody!!!
I build a Machine class with its properties. Then I try to bind a textbox.Text to one of the machine properties. It works fine. But when I change the property in code, the textbox.Text doesn't change synchronisely. I try to use the CurrencyManager to refresh the databinding. But because the binding is not an array or datatable, I can't get the CurrencyManager from the BindingContext. I want to use the BindingManager to achieve the synchronisation. But I don't know if there is a way to do it. Could somebody tell me how to make the textbox.Text synchronisely display the result as the machine property please???
Thanks in advance
Asura
|
|
|
|
|
Hi!
I have a problem and i spend long time to solve it, but I couldn't.
I have one mdi form and a child form, i want to change one of mdi forms controls properties by pressing a button in child form. i did this :
mdiForm copymdiForm = New mdiForm() ;
and when I type "copymdiForm." i cant see mdi forms controls!
it workes in Vb.Net but not in C#.
Can anybody help me about this ?
So Thanks for your attends to my request.
-- modified at 5:53 Monday 3rd October, 2005
|
|
|
|
|
Are the forms controls marked as private? If they are you won't be able to see them outside of the form's class. Mark them as public or provide a public method to set them.
|
|
|
|
|
Hello Dear Wjousts and so Thanks about your advice.
I changed Second forms controls modifiers property from Private to Public, and, and, it worked!!! Ok i did this before but this time it worked. If i can do something for you please mail me. I'm working Database programming (Ado.Net & SQLServer2000).
Bye Bye
|
|
|
|
|
Hello Everybody!
I have a VS 2003 application where I have a Form (Formx.Show();).
I tried to make an fading style by changing the "Opacity" Property.
This works so far, but the transparent color (Property "TransparencyKey") is then painted on the screen.
If I do not change the Opacity, the Trancparent Color is not painted.
I hope somebody has an workaround for my problem.
Thank you for your time.
Martin
|
|
|
|
|
i have function in code behind,i want how to call the that function in html page
m mohamad rafi
-- modified at 4:30 Monday 3rd October, 2005
|
|
|
|
|
Hi!
I want to define a structure that has 2 pointers to the same type as itself. For example, think of a Huffman tree node. In C++ we did it like this:
typedef struct
{
unsigned int code;
unsigned int count;
HUFFTREENODE *l;
HUFFTREENODE *r;
} HUFFTREENODE;
Now, how can we do the same in C#? I tried this:
public struct HuffTreeNode
{
uint code;
uint count;
HuffTreeNode l;
HuffTreeNode r;
}
But it gives me an error that this would create a loop in the struct...
Thanks in advance and best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
You'd probably want to do something like:
[StructLayout(LayoutKind.Sequential)]
public struct HuffTreeNode
{
uint code;
uint count;
IntPtr leftNode;
IntPtr rightNode;
}
and then use Marshal.StructureToPtr[^] and Marshal.PtrToStructure[^] to convert the struct to/from a pointer
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|
|
Thanks! Interestingly, when I replace 'struct' by 'class', the code I posted first compiles nicely (why??)...
What do you think is more efficient? Making the thingy a class or leaving it as struct and using Marshal.etc? I won't have that many nodes, only about 66000...
Thanks again and best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Dominik Reichl wrote:
What do you think is more efficient? Making the thingy a class or leaving it as struct and using Marshal.etc? I won't have that many nodes, only about 66000...
Structs should (mostly) only used for Interop calls. As it seems you're designing a Huffman class library, with no interop calls, I'd create it as a class.
I don't see dead pixels anymore...
Yes, even I am blogging now!
|
|
|
|
|
Structs are value types, classes are reference types, that's why it compiles when you use class but not when you use struct.
In a class you can easily have a reference to another class (even to itself), but in a struct the compiler would have to allocate space for the contents of the struct. That's why a struct must not contain itself.
Regards,
mav
|
|
|
|
|
I need to make the form transparent so that the bitmap appears to be floating on the screen (ie without a border). I managed to do this using TransparencyKey for Windows 2000. But this is not supported in Windows XP. Please inform me on how to accomplish this in XP. Thanks
-- modified at 2:43 Monday 3rd October, 2005
|
|
|
|
|
can u just dock fill a picturebox in a borderless form and set the image in the picturebox?
regs,
g00fy
|
|
|
|
|
Hi everybody,
This is Joydip. I have a problem to share with you all. I want a C#.net code to facilitate my web-application with the functionality of grouping the email-ids stored in the backend, based on the user selection. User should be able to create the group, delete and modify the group also. Can anyone provide me the code. It's urgent. Thanks in advance ,
Joydip
-- modified at 0:12 Tuesday 4th October, 2005
|
|
|
|
|
when i use localhost in connection string dose not connect to the server i got SQL Server does not exist or access denied but when i use computer name it work the problem that programs use localhost dose not work how to resolve this
My Configrations1-WinXP SP2 -Firewall OFF
2-SqlServer 2000 SP4
thanks for your help
|
|
|
|
|
Use (local) . It is recgonized by the SQL Server provider as the local computer, while localhost must be resolved, and it dependes on your local network configuration.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Yes, you can either try local or you can even use a . in the place of Server name as SQL will resolve it to your local SQL Server. In can use have more than one instance of SQL server installed, then pls use local\<InstanceName> . For example, I have two instances of SQL Server one SQL Server 2000 which is installed with out any specific instance and and hence local and two SQL Server 2005 Beta named as SQL2K5. When I need to connect to SQL Server 2000, I use . or local and when I need to connect to SQL Server 2005, I use local\SQL2K5 .
Hope this helps you.
Regards
Mahesh
|
|
|
|
|
Guys,
I need help, this program using windows application
1. I don't know how to add multiple difficulty levels to the soccer game..
2. how the user choose a difficulty
with this question do i just add buttons so the user can choose?? or else??
3.adjust the opponen'ts likelihood of scoring based on the difficulty factor..
However, i paste my code for likelihood..
//primary game variables
private int playerScore = 0;
private int oppScore = 0;
private int timeLeft = 600;
private int currentPlayer = 1;
private int nextPlayer = 2;
//data structure for likelihood of shot
private double[,] shotChance =
{{-1, .8, .6, .4, .1, .01},
{.8, -1, .8, .6, .4, .02},
{.8, .8, -1, .8, .6, .03},
{.8, .8, .8, -1, .8, .04},
{.8, .8, .8, .8, -1, .2},
{.8, .8, .8, .8, .8, -1}};
or i just set up the opponent likelihood from belows code?
private void setupOpp(){
//set up opponents
int x;
int y;
for (int i= 1; i < 5; i++){
picOpp[i] = new PictureBox();
picOpp[i].Size = new Size(25,25);
x = (int)((this.Width - picOpp[i].Width)/2);
y = (int)(pnlField.Height/i - 30);
picOpp[i].Location = new Point(x, y);
picOpp[i].Image = myPics.Images[0];
picOpp[i].SizeMode = PictureBoxSizeMode.StretchImage;
picOpp[i].Tag = i.ToString();
pnlField.Controls.Add(picOpp[i]);
} // end for loop
} // end setupOpp
or by set up from the badshot?so the opponent team have better when the rate is higher??
public void badShot(){
Random roller = new Random();
double toSucceed;
int playerNumber;
lblAnnounce.Text = "Opponent gets ball...";
//check for opponent goal
toSucceed = roller.NextDouble();
//change the following value to alter game difficulty
if (toSucceed < .05){
oppScore++;
updateScore();
MessageBox.Show("Opponent Scores!!");
setPlayer(HALFBACK);
} else {
playerNumber = roller.Next(5);
lblAnnounce.Text += "recovered by " + playerName[playerNumber];
setPlayer(playerNumber);
} // end opponent scores if
any idea??please help me...thanks
-- modified at 0:16 Monday 3rd October, 2005
|
|
|
|
|