|
how can draw a my custom scrollbar so to draw my own button up and down, customize the central scroll button, and the back bar?
|
|
|
|
|
My guess would be to override the OnPaint method just like every other control.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
where is located windows search gifs (dog,magician Merlin or girl in car)?
|
|
|
|
|
|
When you searc a file in Windows Explorer on XP, You see an animation at left side of window (if u havent turned it off before) sometimes a dog, some times a magician named MERLIN. I need that animation files.
|
|
|
|
|
Has anyone experienced lockup issues when adding animated gifs to a typical Windows Form? I have a simple form with a picureBox panel. When I add an animated gif, the environment locks up and I have to kill it through task manager.
Is this a known bug or is there a workaround?
Thanks in advance for any info.
Ray
|
|
|
|
|
I have a table. When you select a plan from a listbox and click 'select plan', the program nicely goes out to the database, fetches the plan, and sticks it in a datagrid.
This is the code:
this.sqlSelectCommand1.CommandText += " WHERE PlanID = '" + PlanIDs[this.clstbxPlans.SelectedIndex].ToString() + "'";
this.sqlDataAdapter.Fill(dataSet2);
this.dgClaimsExperience.DataSource = this.dataSet2.tblData;
So I'm using data adapter, data connection and data set that I generated via the vs2003 GUI.
Anyway it works just fine with two problems.
If, after loading one plan, the user selects a different plan and clicks "select plan", I want the new plan to get loaded into the data grid and replace the old one. That's what the "WHERE Plan ID..." part of the code does. It uses the list box and an array of PlanIDs to specify which plan data I wanted loaded. But when I actually try to change plans this way I get an error:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
What gives?
My second (more minor) problem is that when the data is loaded into the datagrid, it's too large too fit. This is OK, the data grid has scroll bars. But the problem is that the scroll bars are disabled by default for some reason. I can navigate around easily enough by just plopping my cursor in the data table and manually moving the cursor around the arrow keys - but what do I need to do to get the scroll bars to work like they should?
I appreciate the help. This project is killing me.
-stormin
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Have you checked (by stepping through the code) what the SQL statement being generated is? Are you sure that the ToString method is actually returning a numeric string and not something else (like the type name).
Stop the code right before the DataAdapter.Fill and check that the CommandText is actually what you think it is.
theStorminMormon wrote:
Additional information: System error.
Don't you just love how helpful that additional information is?
|
|
|
|
|
Now is as good a time as any to admit my stunning ignorance of how to debug. I know you can step through code using F11, but my code is interactive. It has buttons. So when I try to step through with F11 I just get to the point where the main form pops up. Then if I hit a button, I can't get the F11-step through to start working again.
So, if you let me know how to step through code I'll be grateful and I'll try that out to see exactly what's going on.
But, just to clarify, there's theoretically nothing wrong with calling a dataadpater to fill a datatable in a dataset more than once?
Wjousts wrote:
theStorminMormon wrote:
Additional information: System error.
Don't you just love how helpful that additional information is?
Yeah - go to love those specific error messages. They're live savers.
Thanks for the help.
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Using Visual Studio the best way to debug code associated with an event is to set a breakpoint. You set a break point by clicking in the little gray bar to the left of the line of code you want to stop on, a small red circle will appear (click on it again to clear it when you no longer need it). For your situation you could put it right next to the line for the button click event. What happens is when the program reaches that line it will throw you back into debug mode and set you step through with F10 or F11 (note this only works if you're building the debug configuration and not the release one). Once you've stopped execution you can step through and use the watch windows to see the values of variables or use the command window to quickly type code to execute, for example myDataAdapter.SelectCommand.CommandText in the command window should show you what the command text actually is (assuming myDataAdapter is in scope). Hope this helps. You'll learn to love breakpoints!!
[Edit: forgot to mention]
In answer to your other question, no there is nothing theoretically wrong with using a DataAdapter twice (or more) to fill a table (even the same table). Now whether it's the most efficient way to do things is another question that depends greatly on your setup.
-- modified at 16:12 Wednesday 12th October, 2005
|
|
|
|
|
Well, your tips on debugging were good, and I'm sure they will come in handy a lot in the future, but my central question is still a mystery to me. As far as I can tell the code is idential the first time it goes through and the second time.
Here's the code again:
this.sqlDataAdapter.Fill(dataSet2.tblData);
this.dgClaimsExperience.DataSource = this.dataSet2.tblData;
this.tabctrlTabControl.Enabled = true;
It's crashing on the first line when it goes through the second time. The only other difference is that the CommandText of the sql command gets edited a little bit (so that it's drawing a different set of data from the database the second time around).
Any ideas how to work around this?
-stormin
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Hi...
I was assigned a project on C# using ASP.NET WEb Application. This project requires me to design web form like userID and password to log in as a adminstrator and retrieve data from Access. I got two question which i was unsure:
1)what is the command that we know whether the password is key in right or wrong??
2)what methods can we extract data from database??
thankz =p
|
|
|
|
|
Cheese_kid wrote:
1)what is the command that we know whether the password is key in right or wrong??
Compare it to a stored password in a database?
Cheese_kid wrote:
2)what methods can we extract data from database??
You might want to start with the basics, try these[^] sites and articles.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is this a known bug or something? I'm working on my code, I hit "run", it starts to compile, and I get an error. No biggie, I thought I may have one. It asks if I want to continue. I click "no" and I get dumped back to the standard visual studio layout.
Only problem, that friendly little task list won't come up. I hit the keyboard short cut, I try from the view menu, I try clicking on the little tab on the bottom of the screen - nothing.
It won't show up. Only happens when I work on my laptop, never have this problem on my desktop.
Ideas!?!?!
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
|
I don't think it's small. I mean... I see the tab that should expand it, but when I mouse over, nothing happens. Actually, a small percentage of the time i get a grey field to expand to the size the task list SHOULD be, but there's nothing in it.
And I'm using 2003, by the way.
Oh well... if I restart VS I can get it back, but it disappears after the first use now...
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
yeah hapened to me once. try minimizing properties and solution xplorer til u find ur task list. chances are its behind one of the other sub windows.
Aim small, miss small...
|
|
|
|
|
I've seen this with the task list and some search results when I have auto hide on the container. I hover over the name and it refuses to expand until I expand one of the other items and click the push pin icon.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
:(Recently I want to design a report forms that base on excel2003.But the primary function in Excel 2003 can not satisfies the business needs.So I have many funcations to get data from SQL Server in c# .I want to transform these function into Excel 2003 custom function.
Can you tell me how to do it?
Thanks!
|
|
|
|
|
You would have to go one of three routes.
1) Write Excel macros in VBA, using ADO to get the data out of the database and then populate the spreadsheet with the values you get back.
2) Use Visual Studio Tools for Office to write your "macro" code in C# and use ADO.NET to get your data out of the DB. This assumes that you can afford VSTO or that you have an MSDN subscription.
3) Use the Office Primary Interop Assemblies to make calls out to Excel. This is a lot more cumbersome than using VSTO, but it's free (assuming you have Office installed).
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
Hi ,
I am a little bit confused.
I have a tree view , currency manager and a datagrid
Currency manager controls item details ,
TreeView is bounded by the following structure
ItemRootTypes -> ItemTypes->Items
DataGrid has the same source as CurrencyManager.
I could navigate through records by both side, syncronizing each other, selecting the correct node/CM_Pozition with the given itemID
(TreeView -> CurrencyManager & CurrencyManager -> TreeView)
I could find the appropriate record in the TreeView and select the node by SelectedNode property of TreeView.So far everything works fine.
But if the currency manager's index changed by DataGrid ,
TreeView could find the appropriate node , but cannot select the node.(highlight)
(I check it by changing the node's text )
Btw , databinding still works , the only problem is TreeView cannot select the node.
Anybody has dealed with the same issue ?
Thanks in Advance
Teknomultimedia
|
|
|
|
|
|
Hello partners..
I've been searching the net for an RTSP C# source code to start building it myself.. but i seem to have no luck finding one and i am stuck as i have no clue how to begin!! so i would apriciate some help and if u can send me a source code on my email :
waleed.marji@google.com
thank u guys
|
|
|
|
|
There is an application that gets ran full screen, the owner doesnt want it to be minimized or closed without a password.
I know one can create a hook into this application and listen for events, but what event would be fired when a minimized gets fired? Also, given I can see this event, how can I intercept this event and handle it instead of the application?
I tried suggesting writing an application for the client that would do exactly what this app does, but to no avail.
Any help would be appreciated.
Steve Welborn
Software Architect
|
|
|
|
|
You have to create a system wide hook (WH_GETMESSAGE[^]) to see the messages being sent to the applications message pump.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|