|
ok thx
ya, i think i tried sumthing similar to that and it didnt work. i guess i can go back and retry with this later.
cheers
------------------------
Jordan.
III
|
|
|
|
|
'Here is a color inverting code. hope this will help
'place a button and 3 textboxes
' then cut and paste this codes
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged, TextBox2.TextChanged, TextBox3.TextChanged
Try
Button1.BackColor = Color.FromArgb(TextBox1.Text, TextBox2.Text, TextBox3.Text)
Catch
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
TextBox1.Text = 255 - TextBox1.Text
TextBox2.Text = 255 - TextBox2.Text
TextBox3.Text = 255 - TextBox3.Text
Catch
End Try
End Sub
Marvin N. Guerrero
- did the chicken came first than the egg. it depends! uphill the chicken would be first, downhill the egg would simply roll.
|
|
|
|
|
Thanx to all
You Can see a code for getting R ,G ,B from a color and inverting a color in this address:
http://www.vb-helper.com/index_graphics.html#color
XstoneheartX
|
|
|
|
|
Best solution to my Question!
Public Function InvertColor(ByVal C As Color) As Color<br />
Return (Color.FromArgb(255 - C.R, 255 - C.G, 255 - C.B))<br />
End Function<br />
|
|
|
|
|
Hello,
I am writing a program and i need to catch the change clipboard msg to start a event.
The program is a ScreenDump program so you will understand this short qeustion.
I know how to put and get data in or out the clipboard. maybe you can give me a code sample on how the change clipboard msg works after pressing toe Snapshot key.
thank you in advanced.
Jordan2000
|
|
|
|
|
I'm a bit confused...
You're already putting the data on the clipboard and taking it off? If that's the case, why would you need to detect the change in the clipboard? BTW: There is no clipboard changed event...
RageInTheMachine9532
|
|
|
|
|
I am sorry the question was not clear.
ok when i pres on the snapshot key i want that the screendump to be saved.
there is a kinde of hook in the clipboard event that i can tap in but i cant find out how it works.
WMDrawClipboard i found on msdn but the explenation is not clear.
and cant find a soutable code sample fore VB.NET
|
|
|
|
|
Are you saying the when a user presses PrtScrn or Alt-PrtScrn, you want you app to be notified that there is something new on the clipboard?
If that's true, now I understand...
Ummm...OK.
Your going to have to override the WndProc function in your form to receive the WM_DRAWCLIPBOARD message and process it. You'll also need to process WM_CHANGECBCHAIN too if other applications register as clipboard viewers, you can repair the end of the chain if your suddently the last in the chain. You'll need to use the SendMessage, SetClipBoardViewer and ChangeClipboardChain functions, in user32.dll, and GetLastError, in kernel32, to handle this.
What your going to do is when your app starts, call SetClipBoardViewer with the window handle of your form. You'll have to save the return value as this is the handle of the next window in the clipboard viewer chain. Next, call GetLastError to see if what you got back was an error or a null handle.
Now, in you WndProc procedure, when you get the WM_DRAWCLIPBOARD message, you can use the standard .NET Clipboard functions to get the image from the clipboard and display it in a PictureBox if need be. You'll then need to use SendMessage to send the same message you got to the next window in the chain, (remember that return value from SetClipBoardViewer?) unless it's null.
Now, you may be wondering why you have to handle WM_CHANGECBCHAIN. This is because if the next window in the chain is the one that your supposed to send the WM_DRACLIPBOARD to, you'll need to know that it's been removed and you no longer have to send that message, or you'll need to send it to a different window now.
.
.
I've lost you, haven't I...?
Last but not least, when your app quits, you have to remove yourself from the viewer chain. This is done by calling ChangeClipboardChain with your window handle and the window handle of the window your supposed to be forwarding WM_DRAWCLIPBOARD messages to.
Simple, no?
RageInTheMachine9532
|
|
|
|
|
jordan2000 wrote:
cant find a soutable code sample fore VB.NET
That's because there really isn't any. Registering as a clipboard viewer is not a common operation at all. You'll have to piece together example, like overriding WndProc and calling into the Win32 API.
But, there is no simple way to do this. There is no event that is fired when the clipboard changes, so you have to go thru the Win32 API pain of registering for notifications yourself.
RageInTheMachine9532
|
|
|
|
|
Hi
I am designing an application in which i need to draw dynamic context Menus with Text and some Icons on the Menu Item.
i know OwnerDraw Property and Draw Item Event
BUT
I dont know how to use then with context Menus with Icons
i desperatly need it
Any one provide me code for that OR the WAY
Thanks
Eman Ali Moughal
Senior Software Engineer
Soon Soft (pvt) Ltd
www.soonsoft.com
|
|
|
|
|
i search alot about this but i can't find any positive solution about it some where i find but they want money for that. So at last i saw this site Forums i Post this post with many hopes plz help me
how can i create my own Ruler Control like Officexp or wordpad in vb.net plz plz help me complete with source code
And plz don't reply me on this forum
just email me i will again very thank ful of you
azeemgujjar@hotmail.com
azeemgujjar@yahoo.com
Hello guys i need your little help plz
|
|
|
|
|
In summary, then:
You want free source code (in VB suitable for VB.NET) to implement a ruler control like the Office one (or the one in wordpad), and you want us to provide it, but you can't even be bothered to occasionally read the discussion board.
Why does a certain two-word (in English, at least, it's two words) phrase involving sex and travel spring to my mind* ?
Steve S
* As it happens, I do have that kind of mind...
|
|
|
|
|
i want to Ruler source code a real ruler like in Office or Word pad plz help me
Hello guys i need your little help plz
|
|
|
|
|
I wonder if the words you're thinking begins with F and ends with f?
Sometimes I feel that the people posting questions in the forums should be a little bit nicer and clearer.
I personally wouldn't help people that are rude and/or imposing, even if I had to I'll do it grudgingly.
Come on people, be nice and you might get help sooner and better than you had expected.
Edbert P.
Sydney, Australia.
|
|
|
|
|
I'd like sex, lots of it, with women from all over the world, but I don't want to travel, I want them to come to me, every hour of the day, every day of the year.
Come on girlz, give my little thing, ur help!
I wonder if I post this, will any geeky women reply. No, better delete it, before I press the post button by accident and my wife kills me.
CLICK!
F*$#!
Nursey
|
|
|
|
|
hi Guys..
here is a place for discussion abaut programming problems!
|
|
|
|
|
What's the best way to trap special key combinations. For example, if I want to develop a control that responds to ALT+S, F4 etc., by setting this key combination as a property. Should these key combinations be pumped from the form to controls or should the controls listen to the key presses being sent to the form?
Nursey
|
|
|
|
|
Hello,
For some reason, I'm getting a Common Language Runtime Error when loading certain vb.net applications on my Win 98 machine. For example, I've tried to build certain sample files such as Music Trivia & Lucky Seven and tested on my Windows 98 machine. The Music Trivia application ran fine. The Lucky Seven app did not. I'm getting a Common Language Runtime Error when opening the application. I've loaded the .NET Framework and it seems to be working fine (the Music Trivia app is working). Does anyone have any ideas why I'm having this problem?
Thanks so much for your help!
Vi
|
|
|
|
|
After converting my app from MSOffice 97 to MSOffice 2002 i get an error message 3021 "No current record" when opening a report. The attached query runs fine with no errors. The report opens after a few dozen 3021 errors with a few readable records and the rest #Fout (or #Error which means the same). Anyone?
Grtz,
Guus
|
|
|
|
|
First you have to tell us whether your app is a Word Macro, Excel Macro, Access Project, VB or something else.
If they are office application (especially Access), there has been major changes on the methods from Office97 to OfficeXP and most likely you have to debug and rewrite your application.
I had to do this for many Word Macros and Access Projects. If you're lucky, you only need to make a minor modification.
Good luck!
Edbert P.
Sydney, Australia.
[EDIT]Doh! I didn't read the title. Yes, you have to debug and rewrite your Access application.[/EDIT]
|
|
|
|
|
The query runs fine but creating a report using the wizard based on the query result in #Error or #Fout in my case. Accompanied by error 3021: No current record. How can i pinpoint the problem?
|
|
|
|
|
I have a mixed VB/C# solution. I have a class in VB which inherits from a C# base class. The derived VB class has an attribute applied to it which the constructor of the C# base class reads.
However, when I build my code (I think incrementally) and run I get "Multiple custom attributes of the same type found." when I execute...
DataDatabase lDatabaseAttr = (DataDatabase)Attribute.GetCustomAttribute(GetType(), typeof(DataDatabase), false);
There is only one instance of this attribute, AFAIK.
If I do a full rebuild of the solution the problem goes away, only to return when I next do a build incrementally.
Suffice to say I have climbed the wall several times and now look to you guys for expert guidance on where I have gone wrong.
Thanks in advance.
Nursey
|
|
|
|
|
Hi All,
I would like to check if the machine is idle. If yes, then the program will trigger something.
Thank you, Wilfred;)
|
|
|
|
|
I am considering the infrastructure for the licensing of applications.
I do not want to use hardware devices such as dongles as I would like users to be able to download the software.
I am interested in using a Web Service to validate registered/paid users.
I have so far detailed the following procedure and appreciate any feedback.
All comments are welcome especially ideas on improving or circumventing similar techniques.
The procedure is as follows:
A user supplies registration details when downloading software from a server. The details are stored in a database and a registration code generated.
The user is sent a copy of the details along with a registration code to the email address supplied during the registration procedure.
The user enters the registration details including registration code into the application.
The client application gathers system specific information which could include MAC Address, Hard Disk Size/Serial Number, Windows Serial Number. This information is used known as a client profile.
The client application generates a new Public Key to be used by the server when responding to an activation request. This key is then appended to the data and encrypted using the Servers Public Key.
The application attempts to connect to the server to request an activation code and passes the encrypted data.
The server decrypts the data using its Private Key and validates the details against a database.
The validation routine checks the following conditions:
1) Has the software already been activated?
2) Has the client profile changed?
3) Are the relevant subscriptions up to date?
The server encrypts a reply using the Clients Public Key and responds to the activation request.
If a positive reply is received from the server, a licence is generated on the client PC by the client application and is encoded with the activation date/time and license number.
The client application periodically checks the validity of the licence by querying the server.
As I said, any comments apreciated.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
LearnVisualStudio.Net
|
|
|
|
|
i want to use process bar on form with timer but i can not do this plz help me with coding.
thank you.
|
|
|
|