|
Thank you it was a very good hint!
|
|
|
|
|
Hello,
In my application (net2.0) I have a few threads. I want to stop the threads when the main form is closed. Now I'm not sure what I have to do.
Normally I would implement a IDisposable interface. In the form exists this function already and it is not virtual.
What is the best way to implement this? Which event I should use?
Regards
|
|
|
|
|
Hello,
Try to use FormClosing event (.net 2.0) of the form.
HTH. Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
hi,
i am creating a class that inherits LinkLabel. I am trying to override the method OnPaintBackground to make it transparent but it seems it is not fired.
any idea why or how can i make my LinkLabel transparent?
regards,
rnv
|
|
|
|
|
Not sure, but add this to your constructor.
SetStyles(ControlStyles.Opaque, false);
|
|
|
|
|
thanks but i should have mentioned that i am doing this for my Smart phone application (using Compact Framework 2.0). and it does not have SetStyle method.
|
|
|
|
|
I have a datagrid, user can choose which cols will printed. Ex : User choose 5 cols, the report will have 5 cols. How to do that in crystal report.
Regards.
|
|
|
|
|
If I'm not mistaken you have two ways of using Crystal Reports, Push and Pull, One of them can attach Datasets, making the reports more or less dynamic. Crystal Reports isn't really 'dynamic' as anyone would want it yet. Let's hope in the next version they will integrate it a little more with .net ways .
What you can do, with a little meddling is doing it via passing parameters to the report. I'm not sure what you'd like to do, but to make the reports dynamic we used to ask the parameters in our application. The application would than pass them to the report.
hope this helps
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Crystal Reports is not very useful when it comes to these things. It is an absolutely terrible tool when it comes to doing normal things. I have several times had to create my own reports using print objects/GDI+ etc because CR wouldnt do what I wanted it to, or it was just easier and quicker to do it myself. Setting parameters may be an answer.... Just let the users enter what coulumns they want, then use function fields to match their input up to actual columns. Unfortunately, you still dont have a way to layout the page dynamically. It may turn out to be quicker to do your own reports lol. Hopefully CR will be completely redone in its next release.
Aaron
|
|
|
|
|
I just upgraded some components and well the inherited "details" forms lost their design mode in visual studio 2003.net and compling the base dll has not solved it.Any idea.
|
|
|
|
|
Hello,
For importing function i use
[DllImport(DLLNAME)]<br />
public static extern int function(Type Args);<br />
into my class. and it's working fine.
But for import variable which is exported by dll this method doesn't work.
It will get error that "DllImport is not use for this item only use for method import". And for extern keyword say that this will not use for this item.
Plz help me.
regards,
Divyang Mithaiwala
|
|
|
|
|
Create a function that will expose that variable's address, then you can write to it.
|
|
|
|
|
dll is not my one it is made by someone else. I just downloaded it from internet & import methods using definition givin in doccument.
Divyang Mithaiwala
|
|
|
|
|
I created a local web proxy server running on my PDA in order to browsing web pages locally without network connection.
I must tick "This Network uses a proxy server to connect to the Internet" and set up the "Proxy Server" in Settings/My Work Network on the PDA. after that, My local web proxy server can receive the request from Pocket IE.
However, after that, the Web Services Request (HTTP+SOAP) sent by calling the web services from my local web server (I created) will be directed into my local proxy server but not go to the requested remote server.
I have tried to use some methods such as GetEmptyWebProxy.. but they didn't work..
Does anyone know HOW to solve this problem
thanks
|
|
|
|
|
This might not be relevant, but I have never been able to get WebServices working via my local proxy (FreeProxy).
DarrenHuang2005 wrote: I have tried to use some methods such as GetEmptyWebProxy.. but they didn't work..
Did you properly assign that to the generated webservice class?
|
|
|
|
|
I'm using DataView to sort my dataset. Once a user sorts the data I want to reset it back to show all records. Whats the right way to do this? I'm using the RowFilter property to sort the dataview.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hello,
You can set DataView.RowFilter property to string.Empty to view all records in the table.
RowFilter property is used to filter the records. You can using Sort property of DataView to sort the data.
HTH. Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Im having problems getting my binding navigation to scroll throu the results of my data set. I have already confirmed that the dataset is being populated properly but cannot assoicate it properly.
----------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
//General Declarations
string dctsConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\dctsDB.mdb;Persist Security Info=True";
string sqlSelectString = "SELECT * FROM DCTs";
private void Form1_Load(object sender, EventArgs e)
{
//create connection to access database
OleDbConnection myConnection = new OleDbConnection(dctsConnectionString);
//create adapter to perform select
OleDbDataAdapter myAdapter = new OleDbDataAdapter(sqlSelectString, myConnection);
//create dataset from existing dataset object
dctsDBDataSet myDataSet = new dctsDBDataSet();
//fill the data set with informaion from the dct's table
myAdapter.Fill(myDataSet, "DCTs");
bindingSource1.DataSource = myDataSet;
bindingNavigator1.BindingSource = bindingSource1;
}
James M
Network Analyst
Shaw Cable
|
|
|
|
|
If your talking about navigating thru your records in the dataset, then take a look at the currencymanager.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
In .NET manual, AutoResetEvent.WaitOne() is
[C#]
public virtual bool WaitOne();
My question are :
1.In what case will "false" be returned?
2.Is it necessary to look at the return value of WaitOne?
Thnak you!
|
|
|
|
|
bool WaitOne() is true if the current instance receives a signal. It will never be false since it won't return if it is unsignaled.
|
|
|
|
|
Thank you for your reply.
I have also checked a lot these days, and come to the same conclusion
Would tell me if there are some difference between using AutoResetEvent' WaitOne/Set in forground-thread (started by Thread.Start() )and background thread(started by BeginInvoke()).
I have a problem that WaitOne() returned before it is Set() at another thread. As it happens not so frequently, I still don't know the reason.
I my app, except for the main thread, all threads are started by BeginInvoke.
Thnak you!
-- modified at 2:07 Thursday 30th March, 2006
|
|
|
|
|
Bob_Sun wrote: Would tell me if there are some difference between using AutoResetEvent' WaitOne/Set in forground-thread (started by Thread.Start() )and background thread(started by BeginInvoke()).
I believe there is no difference.
Anyway, you need to initialize the AutoResetEvent as unsignaled before using it:
AutoResetEvent are = new AutoResetEvent(false);
It also needs to be in the same scope as the thread waiting for the signal.
|
|
|
|
|
I am trying to access a dynamically created control ( a tabpage ) with the following code:
((ListView)this.tabControl1.TabPages[1].Controls[1]).Items.Add("HELLO");
I am getting an error:
Specified cast is not valid.
What am I doing wrong?
Thanks,
Jon
|
|
|
|
|
I guess that control is not a listview. You should really iterate through the controls collection for hte tab page and find the list view you want rather than relying on indexes that can change.
Christian Graus - Microsoft MVP - C++
|
|
|
|