|
|
Hi everyone! I have this strange problem: I have the main form and the main in which I invoke Application.EnableVisualStyles(). When I run the program almost everything works fine. Hovewer, I have a seccond window which inherits from System.Windows.Forms.Form. It's just an information window with a ListBox and an OK button. This button just calls Dispose() and it's has the System FlatStyle. When I click the button the program crashes. When I comment out the EnableVisualStyles() call, everything works fine, I dont't even have to change the buttons visual style to Standard. What should I do to make it all work?
|
|
|
|
|
And what it says when it crashes?
btw Be sure you call Application.DoEvents() after you call Application.EnableVisualSyules . Probably it's not this problem but sure it's not bad idea
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Well, it doesn't say anything, just crashes and gives me the possibility to choose a debugger. However, when I do choose one it just displays empty screen inside te Visual Studio editor.
|
|
|
|
|
|
Well, yes, that's true , I get an System.Runtime.InteropServices.SEHException, but I can't get any more info than that. Pls help.
|
|
|
|
|
|
Thanks dnh! That's exaxtly the problem I am having right now. But the DoEvents() method doesn't work in my case, I don't know why. I think I'll turn to the manifest instead. Is this true that I have to have an Appname.exe.manifest file in the same direcotry where my exe file is? It doesn't seem very appealing to me.
|
|
|
|
|
|
Hey!
I am using:
<br />
rtIncomeLogg.HideSelection = false;<br />
rtIncomeLogg.SelectionStart = rtIncomeLogg.TextLength;<br />
rtIncomeLogg.ScrollToCaret();<br />
To scroll my RichTextBox.
The problem with this is that the area that the RichTextBox i showing is blank, not until i move the scroolbar i can se the data.
My fist thougt whas tat it was alot of \n that was appendet to the text, but is isent?
When i scrool(manual) up a bit then down again i can see that the text is reaching all the way down(the blank have disapared)?
I have also tryed this Code:
<br />
rtIncomeLogg.Focus();<br />
rtIncomeLogg.Select(rtIncomeLogg.TextLength, 1);<br />
rtIncomeLogg.Select();<br />
This works fine, BUT i need to be able to type in other controls while data is added to my richTextBox, and by using Focus on this richTextBox i can use any of the other text boxes to write in.
Do you know how to solve this problem?
Best Regards
SnowJim
|
|
|
|
|
if i use the first code i posted above:
and efter the data have been added and i only see the blank Rich text box with the vertical scroll bar at value MAX.
If i press the ^(Arrow up) on the vertical scoll bar once, then it shows the data in the text box and the scroll value is still set to value MAX.
Maby my problem could be fixed by fire the ^(arraow up) event on the scrollbar right after the scroll ToCaret is done?
But how do i fire this event?
Best Regards
SnowJim
|
|
|
|
|
Is there nowone that have any ides?
i cant use any APIs eather.
BestRegards
SnowJim
|
|
|
|
|
Is this a problem i will have to live with? or is there any solution to it? Maby its just me that haves this problem?
BestRegards
SnowJim
|
|
|
|
|
I tried the first code posted by you, it works fine in my sample program. I wonder what is the problem in your case, perhaps there is some other cause / code for the problem.
As for the second code, your problem is because you are selecting something (at least one character), which is preventing you to work in some other program while data is added to your richtextbox. In the second code, please try to use the following code (by selecting 0 character) and see whether it works (it works on my machine in my sample program):
rtIncomeLogg.HideSelection = false;
rtIncomeLogg.Select(rtIncomeLogg.TextLength, 0);
|
|
|
|
|
Thanks alot!
That code workt great!
But there is a smal problem! i want to switch the aouto scroll off, i have tested to do this
<br />
if (AUTOSCROLL)<br />
{<br />
rtIncomeLogg.HideSelection = false;<br />
rtIncomeLogg.Select(rtIncomeLogg.TextLength, 0);<br />
}<br />
else<br />
rtIncomeLogg.HideSelection = true;<br />
But the info in the text box becomes wary strange when data is still pasted in to it(from clipboard) in constant data flow?
Best Regards
SnowJim
|
|
|
|
|
Hello,
I want to pass a custom data type to a webmethod and get a custom data from a webmethod. The custom classes are on serverside. How can i include these classes to the client.
What should i do?
|
|
|
|
|
i there ,
i have a datagrid an he is bind to dataset
in the form load i all get all my customer table into the grid
i have also a dataview filter
when i filter i all geeting the desiers rows into the grid an every thing is o.k
but when i sending the dataset to crystal report i still geeting all of the rows that load in the formload
how can i make that just the filterd row will be in the dataset ?
thanks ....
|
|
|
|
|
Well, I would follow these steps:
1. Construct a new dataTable with the same structure of your customer's table (there's method allowing you to do this -that I can't remember from the top of my head right now- and also gives you the option to select if you want to copy the data or not. Don't).
2. Copy only the data that you filtered from your customer's table into the new table. To do this, use the same condition that you used for filtering the data in the customer's table.
3. Bound this new table (that contains only your filtered data) to the report instead.
Hope this helps.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
This is my code:
this.oracleConnection1.ConnectionString = "user id=HMS;data source=HMS2005;password=HMS";
da = new System.Data.OracleClient.OracleDataAdapter();
cmd = new System.Data.OracleClient.OracleCommand("select A1,A2 from TEST",oracleConnection1);
da.SelectCommand = cmd;
cb = new System.Data.OracleClient.OracleCommandBuilder(da);
daset =new DataSet();
da.Fill(daset);
daset.Tables[0].Rows[0][0]= "123";
da.Update(daset);
So When My program was run . it throw one error and error message is
"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."
Help me!!!!!!!!!!
|
|
|
|
|
|
Hello,
I'm looking for a mail api written in c# like there is from sun for java.
I found CSMail, but is there an other one which is open source and perhaps better?
|
|
|
|
|
i'm create a window form for searching, but i don't know how to do that. There are so many condidions of searching on the form. Users usually don't enter all the fields on the form. So i create a sql query and in where clause condition i use 'AND' operator to combine all conditions of searching and the result will show nothing because some conditions of searching have been blank.
So do i create a sql query or many sql queries for searching
Any suggestion
Thanks
It may be a stupid question because i'm too
|
|
|
|
|
vuthaianh wrote:
It may be a stupid question because i'm too
There's no such thing as a stupid question. I think that you would stupid if u never asked. So don't worry about that.
Dynamically constructing an SQL statement is a quite good way to do it actually. To solve the problem you are facing I would either:
(1) Force the users to fill in all the fields (which is not what you are after as u said)
(2) Check for the blank fields and just avoid inserting an "AND" operator for them into your SQL statement. Only handle the fields that were filled by the user.
Hope this helps.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Thanks for answering my question
Actually i intended to write a stored procedure to serve for searching, and in the stored procedure i must pass as many parameters as the the stored procedure requires
So if users left one of these fields on the form blank, the stored procedure will be useless. it will show nothing
Once again thanks so much
|
|
|
|
|
Thanks for answering my question
Actually i intended to write a stored procedure to serve for searching, and in the stored procedure i must pass as many parameters as the the stored procedure requires
So if users left one of these fields on the form blank, the stored procedure will be useless. it will show nothing
Once again thanks so much
|
|
|
|