|
By using Lutz Roeder's .NET Reflector[^] I figured out how Form.ShowDialog() does it and so I created a similar function that helped me:
public void Show(
IWin32Window owner )
{
if ( owner!=null && owner.Handle!=IntPtr.Zero && Handle!=IntPtr.Zero )
{
IntPtr ptr2 = GetActiveWindow();
IntPtr ptr3 = (owner == null) ? ptr2 : owner.Handle;
const int GWL_HWNDPARENT = -8;
GetWindowLong(new HandleRef(this, base.Handle), GWL_HWNDPARENT);
SetWindowLong(new HandleRef(this, base.Handle), GWL_HWNDPARENT, new HandleRef(owner, ptr3));
}
base.Show();
} Maybe this helps someone in case you ever needed it .
--
Affordable Windows-based CMS: www.zeta-producer.com
|
|
|
|
|
Hi All,
I have a query .Please help me on this.
The query is :
We a have acquired a different domain(Domain2.com). We will want to forward this to our existing website(domain1.com), and all e-mails that come in to anyone@domain2.com will be redirected to anyone@domain1.com.
With the our existing website, it doesn’t have a unique ip address that we can give the registrar to forward to, so whichever solution we use will need to be able refer/forward to the site by url name.
Can you suggest ways in which we can achieve this.
Regards
Ashu
ashu
|
|
|
|
|
Redirecting email: you need to take two steps. I'm assuming your mail is delivered via SMTP to a server you control, rather than being collected via some other protocol.
First, you need to set up your mail servers to handle the messages. If you're running Exchange 2000 or 2003, open Exchange System Manager, expand Recipients and Recipient Policies. If there's only one policy there, double-click it and go to the E-Mail Addresses (Policy) tab. Click New and select SMTP Address, then OK. Type '@domain2.com' in the Address field. Ensure 'This Exchange Organization is responsible for all mail delivery to this address' is checked. Click OK. The Recipient Policy Update process will now process all recipients in the organization (in AD) in the background.
Secondly, you need to tell the world how to send email to domain2.com. Find out who hosts domain2.com's DNS service (the name servers). You can find out if you don't already know by running nslookup:
C:\>nslookup
Default Server: resolver2.th.eclipse.net.uk
Address: 212.104.130.65
> set type=NS
> codeproject.com
Server: resolver2.th.eclipse.net.uk
Address: 212.104.130.65
Non-authoritative answer:
codeproject.com nameserver = ns.dundas.com
codeproject.com nameserver = ns2.dundas.com although you should know this. You need to tell the name server host what MX records to use.
> set type=MX
> codeproject.com
Server: resolver2.th.eclipse.net.uk
Address: 212.104.130.65
Non-authoritative answer:
codeproject.com MX preference = 10, mail exchanger = mail.codeproject.com You probably want some redundancy in there, so that if your first-choice mail server is unavailable, messages can still be queued elsewhere (we use a queuing service provided by our ISP). Of course mail.codeproject.com may be a load-balanced front-end Exchange server...
It takes a while for changes to DNS to propogate (servers are allowed - indeed, required - to cache DNS lookup results, and they can be cached at intermediate DNS servers too) so you should consider how you're going to get messages forwarded from the existing servers in the meantime.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
How can I encapsulate my program into a software (with setup.exe file)?
My English is so bad. I hope u can understand what I mean ^_^
Thank you!
|
|
|
|
|
If you have Winrar, you can create simple exe files which can be started on all win32 computers. If you have Visual Studio 2003 .NET (Pro) you can create a Setup-file project.
And we understand your english
|
|
|
|
|
Okay.. i have a question regarding clipboard on a pocket pc running Windows CE. In the .Net framework there is plenty of functions which allows you to copy text in a textBox etc. to the clipboard, why are these functions disabled in the Pocket framework????
Thanks in advance...
|
|
|
|
|
To make it short:
Pocket PCs have far less memory then normal computers. Most functions are only missing because the framework size must be reduced for handhelds. Nevertheless there is a big chance that some other function does what your are trying to do (but as I dont know the pocket fw very well I cant help you in this case).
|
|
|
|
|
Okay.. thanks for the reply.. I was just because, i browsed the SDK for Pocket PC 2003 and the SDK for CE 4.2 and they had some API calls you can use to copy paste, etc.
I'm developing to a NeoNode, it has 32 mb of free memory, a phone which is running win CE 5.0, with .Net support. So i just figured that it is possible to do such operations, and then i couldn't understand why microsoft didn't add it to the Compact framework.
Again thanks..
|
|
|
|
|
I have made 2-3 Vb programs and I cannot start them on any other PC. I read other articles on this site and I've seen that it takes a .NET Framework package to start my application. Can somebody help my find the MSCOREE.DLL ans the .NET Framwork package to start my 2002 visual studio VB. Thanks a lot....E-Mail me the answer at alexisrock@msn.com or sent my the package if you can.
Alexis V.P.
|
|
|
|
|
You can download what you need here[^]ere
Why would anyone waste time arguing with an accountant about anything? Their sole function is to record what happenned, and any higher aspirations are mere delusions of grandeur. On the ladder of productive contributions they are the little rubber pads at the bottom that keep the thing from sliding out from under you. - Roger Wright
|
|
|
|
|
JeepManiac900 wrote:
E-Mail me the answer at alexisrock@msn.com or sent my the package if you can.
No one is likely to do this. If you want e-mail notification, register as a user and provide your email at registration. Then when you post as a logged in user, you can elect to be notified when someone replys to your post. In addition no spider is likely to discover your email address (from the plain text version in your post) and put you on a spam list.
Why would anyone waste time arguing with an accountant about anything? Their sole function is to record what happenned, and any higher aspirations are mere delusions of grandeur. On the ladder of productive contributions they are the little rubber pads at the bottom that keep the thing from sliding out from under you. - Roger Wright
|
|
|
|
|
Hi,
Just Install the .Net Framework ver(in which ur app is developed) on the m/c where u want to run ur App...........
Regards,
Ritesh
|
|
|
|
|
Hi,
I created a simple application in C# using .NET visual studio. The release build seems to work just fine on my development machine but it does NOT seem to work on my "non-development" machine (a clean W2k machine with no visual studio .net). By the way, I was using the default release build setting to create the exe.
I get error complains such as "mscoree.dll is missing". When I provide this mscoree.dll it cries about some registry key not setup to point to the install path etc. etc.
Any idea, suggestion, help?
Thanks!
|
|
|
|
|
This seems to be a common question again. If you developed your application using C#, VB.NET or Managed C++, you need the .NET Framework. You can't just redistribute parts of it - you need the whole 20MB package. Download the redistributable here[^]. Windows Server 2003 includes .NET Framework 1.1.
I don't think this download currently contains Service Pack 1. It's advised that you apply this service pack. Download here[^] (or here[^] for Windows Server 2003).
If you want to install the .NET Framework along with your application, see Microsoft's Setup Bootstrapper Sample[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
|
Greetings, I have a datagrid in a parent form that created a child form when one of the cells in the parent form is double clicked, a dataset is then passed to the child form in the constructor. With that dataset, I'm creating a new datagrid. When I try to set the column width values or capture a MouseDown event, it seems as though the Child Form is ignoring all attempts and defining events and column width values. The same code works fine for the parent form; any thoughts?
--Mike
|
|
|
|
|
Normally this should function properly. Without any further details I dont think anyone can help you. If it isnt too much you should post the relevant parts of your code.
|
|
|
|
|
Okay, I call the new form passing it a dataset. In the new form, I call a method to initialie the datagrid; here is that code. The Alternating back color, the mousedown events, and the column width seem to be ignored. Seems like I'm missing something simple here:
The steps I'm taking in the constructor of the new form are:
public ClientActivity(DataSet ds)
{
//
// Required for Windows Form Designer support
//
this.gridMouseDownTime = DateTime.Now;
this.ds = ds;
this.WSID = WSID;
InitializeComponent();
InitializeDataGrid(ds,WSID);
//
// TODO: Add any constructor code after InitializeComponent call
//
}
private void InitializeDataGrid(DataSet ds)
{
try
{
//AddCustomDataStyle(ds);
dataGrid1.DataSource = ds.Tables[0];
dataGrid1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dataGrid_MouseDown);
int rowCount = ds.Tables[0].Rows.Count;
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = "ClientActivity";
tableStyle.AlternatingBackColor = System.Drawing.Color.Gold;
//tableStyle.BackColor = System.Drawing.Color.White;
tableStyle.GridLineStyle = System.Windows.Forms.DataGridLineStyle.Solid;
tableStyle.GridLineColor = Color.Red;
tableStyle.SelectionBackColor = System.Drawing.Color.Blue;
// tableStyle.SelectionForeColor = System.Drawing.Color.Blue;
int numCols = ds.Tables[0].Columns.Count;
DataGridTextBoxColumn aColumnTextColumn ;
for(int i = 0; i < numCols; ++i)
{
aColumnTextColumn = new DataGridTextBoxColumn();
aColumnTextColumn.HeaderText = ds.Tables[0].Columns[i].ColumnName;
aColumnTextColumn.MappingName = ds.Tables[0].Columns[i].ColumnName;
//add handler
//MessageBox.Show(ds.Tables[0].Columns[i].ColumnName);
aColumnTextColumn.TextBox.MouseDown += new MouseEventHandler(TextBoxMouseDownHandler);
aColumnTextColumn.TextBox.Width = 100;
aColumnTextColumn.TextBox.DoubleClick += new EventHandler(TextBoxDoubleClickHandler);
tableStyle.GridColumnStyles.Add(aColumnTextColumn);
}
label1.Text = label1.Text + " For " + WSID;
dataGrid1.TableStyles.Add(tableStyle);
}
catch (Exception e)
{
MessageBox.Show(e.StackTrace);
}
}
|
|
|
|
|
First of all:
Happy new year!
Now to your problem:
I think you are not setting the right mapping name for the tablestyle
Instead of
<br />
tableStyle.MappingName = "ClientActivity";<br />
you should write
<br />
tableStyle.MappingName = ds.Tables[0].TableName<br />
Explanation:
A Grid can show multiple DataTables (eg. when showing a dataset). Thus you can also add multiple TableStyles (foreach DataTable). The MappingName is used to identify to which DataTable the TableStyle is bound. When the DataGrid shows a DataTable and cannot find a TableStyle (like in this case) with the appropiate MappingName it shows it with automatically generated style settings.
|
|
|
|
|
Hello all!
As I understand, static object pointers are considered root of the application and for that reason they are never removed by the Garbage collector.
Is there any way to force the GC to remove those elements?
Thanks
|
|
|
|
|
That would sort of change the static nature of static objects, no? Alot of things would break if you could do what you're asking.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Not automatically. And this is very good as it would break the underlying paradigm.
You can set static members to null. The GC will then remove the underlying object from memory.
|
|
|
|
|
Iam working with an pocket pc application in .NET Compact framework and run it the emulator. I dont know where the EXE and other application files are stored in that emulator.
Sridhar
|
|
|
|
|
Can u please tell me where can i find the emulators ??? I also need them
|
|
|
|
|
If you install .NET 2003 you can get the emulator. it has an in build emulator.
sdaf
|
|
|
|