|
hi what tutorial did you use for your application as i'm also
trying to have plugin support on my application.
thanks dennis
|
|
|
|
|
Hi everyone,
I'm trying to figure out how to determine the DoubleClick interval that's set in MouseSettings. Does anyone know where this is kept? Is there a .NET API for it, or should I grap it from the registry?
Thanks for your help,
Tom Clement
Apptero, Inc.
|
|
|
|
|
Hi again,
A search of the Registry answered my question for me. It is stored in HKCU\Control Panel\Mouse in the value named DoubleClickSpeed. It appears to be in Milliseconds.
Tom Clement
Apptero, Inc.
|
|
|
|
|
Is it a sign of insanity to talk to yourself?
SystemInformation.DoubleClickTime
Tom Clement
Apptero, Inc.
|
|
|
|
|
Tom Clement wrote:
Is it a sign of insanity to talk to yourself?
Nope, just when you argue with yourself.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Sometimes is best to try put a problem on 'paper'. That way you know the problem is correctly formulated, and when you get good at programming a different look at things is sometimes all that is needed to grasp the solution.
top secret
|
|
|
|
|
leppie wrote:
when you get good at programming
Geez, I hope that some day (soon, before I die) I'll get good at programming....
Tom
|
|
|
|
|
I got a text file that i exported from SQL Wizard and i named bank.txt.
i want to write out a program that allow to import bank.txt file to SQL Server but i do not know how to do it.
So can anyone help me or show me where to get the source code.
Thank a lots.
quoc
|
|
|
|
|
Hi,
Try reading your textfile using the "streamreader" and save it one at a time using the INSERT statement into your SQL server.
IF your text file is big or you often do it, might as well use the DTS in #C. I haven't tried it but I know it will work.
/dabuskol
|
|
|
|
|
I have a program that works perfectly fine but i want to change one thing.
my database data.mdb is on the root of my c drive.
I want to put it in my project directory. I would assume i could move the database anywhere i want and just reconfigure the oleadapters accordingly. Well for some reason its not working as i thought it should.
Here is what i do.
I right click on the Adapter1 and hit configuration.
I hit new connection and select the connection for access.
i then select my database and test the connection. It works fine.
so i know have ACCESS..\data.mdb.Admin
I then hit Query builder and select my columns Help and Information.
I then hit finish.
I then go back to the configuration adapter and want to add
WHERE (Help = ?)
so query looks like this
SELECT Help, Information FROM Csharp WHERE (Help = ?)
i hit next and get the following error.
OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.
I don't understand the problem cause if i reload my program from my backup files. putting it back to the state of where the database was in the c:
it works perfectly.
Any Idea would be great
Win32newb
"Making windows programs worse than they already are"
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
I have seen this before, it appears VS.NET keeps the references in the DataAdapters, my remedy was to recreate them all. Easy when u have stored procedures, bad with select statements
top secret
|
|
|
|
|
I couldn't figure it out. Maybe Heath or one of the other MVPS can explain this. Here is what I ended up doing to fix it which basically relates to what you stated.
I said heck with the adapter query.
I left it as the default of
SELECT Help, Information, ID FROM Csharp
i then in my code instead of using my old parm method i do this instead.
string strSQL = "SELECT * FROM Csharp WHERE Help = '" +
comboBox1.Text.ToString() + "'";
oleDbSelectCommand1.CommandText = strSQL;
dataset.Csharp.Clear();
oleDbDataAdapter1.Fill( dataset );
works perfectly
thanks for your reply by the way
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
I'm trying to display 2 text boxes side by side and have them scroll together, for something similar to a file comparison utility.
I have them controled with a scrollbar by sending WM_VSCROLL messages to them with P/Invoke. I'm having trouble capturing the EN_VSCROLL messages from the textboxes. I've tried Application.AddMessageFilter and overriding Form.DefWindowProc, neither of these seem to get the message. I can see the message in Spy++, but I can't seem to capture it with any CLR method.
What is the best way to get these messages using C#?
|
|
|
|
|
Extend the TextBox class and override WndProc . For a good design, add a property to this class that takes a reference to another TextBox that it should send messages to.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
That didn't work either. I'm still only getting Keydown messages, but no WM_COMMAND/EN_VSCROLL messages. I wasn't sure that would work either since the text box is sending the message to the parent window.
|
|
|
|
|
I've had success with catching the WM_VSCROLL message. There is also an article or two on this here on CodeProject, and one on MSDN[^] that I was reading not too long ago.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
WM_VSCROLL works great, I used the technique from this article Controlling scrolling with the API. I was able to get the two boxes to scroll from a scroll bar just fine. The problem is getting the notification messages from the textBox back to the main window.
It seems like .net doesn't expose the dialog notification messages to any of the form code.
|
|
|
|
|
andy brummer wrote:
The problem is getting the notification messages from the textBox back to the main window.
You should try watching for OCM_VSCROLL , this is the corresponding reflected message.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks for the help. I had to override WndProc on the Form.
|
|
|
|
|
Thanks, I figured it out. I had to override WndProc on the form. DefWndProc was catching the message at the wrong place. Thanks for pointing me in the right direction.
|
|
|
|
|
I have a list Box that will display a music playlist. What i want to do is when i double click an item on the list i want that song to play (not select it then press play). Think of media player 9, with the playlist on the side, double click a song and it plays. Also i want to color of the text that i double clicked to change. Does anyone know a way to do this or can point me out to an article?
Im using WMP9 sdk to play the song so the list box will be reference to the WMP Playlist object, I dont know if i can just add the wmp 9 playlist to my program without using a list box (if there is a way that would help).
modified 16-May-21 21:01pm.
|
|
|
|
|
So handle the DoubleClick event on the ListBox , inheritted by Control .
FYI, in Windows Media Player, that's a ListView , not a ListBox . There's a big difference and a ListView implicitly supports the kind of object selection and activation changes you want.
For example, simply set ListView.Activation to ItemActivation.TwoClick and you've got what you requested. You can either handle the DoubleClick event as before, or the ItemActivate event that is fired when the user activates an item based on the Activation property setting.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks ill try ListView instead. Does it support color change of a selected (double click) item?
modified 16-May-21 21:01pm.
|
|
|
|
|
It encapsulates the same List-View common control that's ubiquitous in Windows Explorer. So yes, of course it supports changing the color of the selected item, along with much, much more. Read the class documentation for the ListView control and give it a try.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
ok i got the double clicking an item thing down. I just need help on getting the selected items text to change color.
modified 16-May-21 21:01pm.
|
|
|
|