|
Xmen wrote: Color tmp_newColor = ??; // how to get new color ? Multiply, Add ?
Color tmp_newColor = Color.Green;
or Color.FromArgb(....)
or Color.FromName(...)
or Color.FromKnownName(...)
choose whatever...
HTH
[Modified]
one more thing, you are using GetPixel and SetPixel which are extremely slow. try using LockBits() and UnlockBits() for speed.
[/Modified]
regards
|
|
|
|
|
PandemoniumPasha wrote: Color tmp_newColor = Color.Green;or Color.FromArgb(....)or Color.FromName(...)or Color.FromKnownName(...)choose whatever...
this is not that simple, i have to calculate the RGB values for new color.
PandemoniumPasha wrote: one more thing, you are using GetPixel and SetPixel which are extremely slow. try using LockBits() and UnlockBits() for speed.
thanks for the info
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hello all.
I'm working on a portion of a program I'm writing that involves creating new rows in a table that has no primary key and two foreign keys. The rows in the datatable are invoice details for rented items. I want to be able to get this new row and place it's contents in a listbox, followed up by a number of similar new rows in the same listbox.
I'm not sure how (if it's possible,) to retrieve the new row since it has no primary key. I'm also not sure then how to associate the datarow with it's respective item in the listbox.
My hope is to be able to, when necessary, select the item in the listbox and use it to delete the row it's associated with from the datatable.
I'm going out on a limb here hoping someone might have some advice or can point me in the right direction. Any help would be hugely appreciated. Thanks in advance!
|
|
|
|
|
Lodeclaw wrote: I'm writing that involves creating new rows in a table that has no primary key and two foreign keys
Isn't there any natural key present? Also could you create a key column in your datatable and let the datatable to generate a unique value to it?
Lodeclaw wrote: followed up by a number of similar new rows in the same listbox
How do you recognize similarity?
Lodeclaw wrote: I'm also not sure then how to associate the datarow with it's respective item in the listbox
If I understood correctly your problem in this, you would use ValueMember[^] definition in your binding.
Lodeclaw wrote: use it to delete the row it's associated with from the datatable
When the listbox is binded to the datatable, you would actually delete the row from the datatable. The listbox reflects the changes in your datatable.
|
|
|
|
|
Hi friends
How switch on computer in C# codes with any key which ı set key. ı am sorry about I speak a bit English
|
|
|
|
|
Wow, that's a fantastic question
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Because .NET needs to be on and running in the Windows environment BEFORE any program can be run. It is not possible to turn on computer based on any key. It is, however, possible (don't ask me how) to remotely turn on a computer with some BIOS "Wake on LAN" setting. I have no clue how this would be set through C# programming though.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Thomas Stockwell wrote: I have no clue how this would be set through C# programming though.
FYI : UDP broadcast apparently does it - with the 'magic packet' as described in the link to my reply to him, so that's doable from C#. You're correct of course, in that you need to turn the computer in question on from another computer, already running
'g'
|
|
|
|
|
eMOx wrote: with any key which ı set key
not sure what you mean there .. the best option I know of is 'WakeOnLAN' in which particular 'Magic' Packet is sent to the network card, targeted by its MAC Address - this presumes the network card, hardware etc support it.. more info here http://en.wikipedia.org/wiki/Wake-on-LAN[^]
'g'
|
|
|
|
|
Most BIOSes seem to let you pick a key which works for power-on (or even a power-on password in some cases). Setting this from C# is likely horrible. Chances are this question would be best asked in the MFC forum for some lower level dudes to answer (and by lower level I mean closer to metal ).
Odd on you'll be raising some strange interrupt with a pointer to a block of custom crud somewhere, and it'll be all motherboard specific. Would be about as much fun as writing your own BIOS flashing utility for fun :P
|
|
|
|
|
Are you sure you mean switch on? Off would make a bit more sense.
Cheers,
Drew.
|
|
|
|
|
I assumed the post was a joke response to the earlier power off question.
|
|
|
|
|
Ah, didn't see that. Thought I'd spend a few minutes forum cruising.
Cheers,
Drew.
|
|
|
|
|
Hi all,
First of all, thanks to everybody who offered much needed advice for getting the server set up on my home machine. My program can interface with the server and do some basic operations, which is exactly what was needed.
Second, sorry if this is considered a repost--I posted earlier today about this but didn't get a response. Didn't know if CP sends notifications to everybody in the thread if anything at all is added to the thread, hence why I'm posting here.
My question is pretty simple. I'm trying to log onto the server with a laptop using a username/password combo. What I end up with is, "Login failed for user (this computer)/Guest", where "this computer" is the computer hosting the server.
I've read articles about how to fix this, and most focus on creating a login the server knows about, and using Mixed mode for remote access. But everything I've tried results in that same error message.
How do I make this work? Server machine is WinXP Pro, remote machine is Vista.
Thanks for any advice,
Michael Fritzius
P.S. Actually the next part after this will be to log into the server via the internet, using an IP address. Any tips on that would be appreciated too, so I don't have to make yet another post
|
|
|
|
|
Michael Fritzius wrote: I posted earlier today about this but didn't get a response. Didn't know if CP sends notifications to everybody in the thread if anything at all is added to the thread, hence why I'm posting here.
If you post a reply to yourself, the others who have replied won't get a notice, but if you reply to someone elses post, he/she will get an email.
To your question.
If you want to use SQL Server authentication, you must create a login for yourself (or use an existing one). When you installed the SQL Server instance you were prompted if you want to use Mixed mode authentication. If you selected it, the installation prompted for the password for user SA. You can use that login to connect to the SQL Server. SA is like Administrator in Windows. It has all the privileges in SQL Server. After logging into the SQL Server, you can create additional logins and grant rights to them.
The easiest way to create a login is to use Management Studio. Select from the Object explorer Security/Logins, right click and select New Login. This opens a dialog where you can specify what kind of login you want to create and then grant privileges to the login.
Addition:
Michael Fritzius wrote: the next part after this will be to log into the server via the internet, using an IP address
Basically this is exactly the same as you would connect to your local server. You can define server as ip-address and port, like: 127.0.0.1,1433. You just need to check the port SQL Server is listening using for example Configuration Manager and make sure that you have secure connection over the internet so that the port can be opened for you.
modified on Monday, January 26, 2009 5:53 PM
|
|
|
|
|
Mika,
Thanks for the advice. I didn't know it, but no permissions were set up AT ALL for that user. I knew something was weird at the server side, but couldn't figure it out.
The laptop can now talk with the server, and retrieve info. I'll work on table manipulation next.
Unfortunately, I can't test to see if IP login will work because it's a small network here. So I may be posting for you again soon.
Thanks again,
Michael Fritzius
|
|
|
|
|
Michael Fritzius wrote: no permissions were set up AT ALL for that user
Could it be that you haven't chosen Mixed mode during the setup.
Michael Fritzius wrote: Thanks again
You're welcome
|
|
|
|
|
It was working and I wasn't getting that error mentioned in the subject.
Today I was testing it and logging on from a networked machine doesn't work anymore. I don't remember changing any of the connection strings--my goal was to work with data entry and leave connection strings alone once they were established as working properly.
Is there any reason why this would have worked before and not now?
Thanks,
Michael Fritzius
|
|
|
|
|
If you haven't changed the connection string the most likely reason is that something has changed in Active Directory (if you use integrated security) or in the database privileges.
Open the management studio and check the login you use. Does it still have the privilege to use the database you're interested in (is there a checkbox before your database in the user mapping page)?
|
|
|
|
|
The proper checkboxes were there, yes.
But for whatever reason it now works and I don't think I changed anything.
No idea what caused it to not work before.
But, you were a huge help before and it's likely I did something you suggested without realizing it. So I'll give you credit anyway
|
|
|
|
|
Dear CodeProject Team.
I'had an application maked in C# using MessengerAPI, the app it's terminated and everything works good but I need know How can I launch my app when the microsoft messenger it's started and how can I kill my app when the microsoft messenger it's closed?
Thanks in advanced.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Make another application that will keep check msn messenger in processes, if found run your app, if not found kill your app. Thats it.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi there ..
i looked up in the MSDN about this class
"applicationsecurityinfo"
and couldn't find enough information about it .
And not even in any blog .
Can anyone help me to understand what it is ?
|
|
|
|
|
|
First , i am sorry about my terrible english.
i have a problem to impersonate User account which Exist in the domain ,using md5 hash.
i am using the api's :LogonUser and DuplicateToken.
i had succeed impersonate in default way.
but, when i using the LogonUser i supplying username, password, domain etc..
and i want to use MD5 Hash instead of password parameter.
is there someone who know or have and idea impersonating using md5 hash?, i really appreciate .
|
|
|
|