|
You can look at window.showModalDialog command, but that will only work for IE. If you also need Mozilla support you might have to use window.open and then window.opener.<mind is="" drawing="" a="" blank=""> command. Doing a google search on showmodalDialog and Mozilla and you should find code for that.
There is also the ASPPopup article on doing a popup.
http://codeproject.com/aspnet/asppopup.asp
I have been looking at this for info and adding buttons to it as well. But for just telling the user that its busy it might work.
Steve Maier, MCSD MCAD
|
|
|
|
|
Hi Steve,
Actually I was using this asppopup on my current web page but our user doesn't like this becuase it's not modal, they can still update the current page even though the popup window is visible.
I also tried the indow.showModalDialog command but again the behaviour is the same as the ALERT/PROMPT/CONFIRM from javascripts it's modal but the problem is that the current page display disappear while the modaldialog window appears.
Anyhow, Thank you for your help. Just in case you found any sites kindly inform me, the same with me if I found the solution I'll post here using this thread.
/Dabuskol
|
|
|
|
|
I put up a test page on one of my servers and I am still seeing the curent page. It is NOT disappearing. Here is the link:
Test Page
Of course if the fact is that you want it to disappear then that would explain the issue. I was talking to someone last night about changing the asppopup to be more modal. If we do this I will let you know.
Steve Maier, MCSD MCAD
|
|
|
|
|
Hi Guys,
I'm happy to inform you all that I found the solution. I missed the 3 last lines. Now I can say that it's 100 working. Hope this will help you and the other new web programmer of .net like me.
private void DisplayErrorMessage(string strMesg)<br />
{<br />
string strScript = "<script language=JavaScript>" +<br />
"alert('" + strMesg + "');" +<br />
"</script>" ;<br />
if (!Page.IsStartupScriptRegistered("clientScript"))<br />
{<br />
Page.RegisterStartupScript("clientScript", strScript) ;<br />
}<br />
}
/Dabuskol
|
|
|
|
|
Hi,
I am looking to (hopefully quite simply) populate a drop down list with a
list of the currently open windows (applications) and their respective
HWND's
I have found various snippets using GetWindow and FindWindow from user32.dll
but have been unable to get it all working.
Any help / code examples would be much appreciated. Preferably in C# but any
examples would be useful.
Thanks in advance,
Robin
|
|
|
|
|
Hi, I've done this (for getting a mirc window and sending it a message), but the code is pretty lengthy. Email me web@sloppycode.net if you need it.
|
|
|
|
|
I'd like to create a simple XML browser that displays a XML file an similar way as IE does. I'm not doing anything with the file, just want to display it in a readable way.
I have tried with xmlreader and richtextbox classes but not really been successful in formatting the XML in a nice way.
reader = new XmlTextReader(xmlfile);
reader.WhitespaceHandling = WhitespaceHandling.None;
// Parse the file and display each of the nodes.
int curr = 0;
int next = 0;
while (reader.Read()) {
curr = reader.LineNumber;
richTextBox2.AppendText(reader.Name);
richTextBox2.SelectionColor = Color.Blue;
richTextBox2.AppendText(reader.Value);
richTextBox2.SelectionColor = Color.Black;
if ( curr > next ) next = curr;
else richTextBox2.AppendText("\n");
}
Is this the right way to go, or should I start looking at other solutions?
|
|
|
|
|
If you want something really simple and quick, just embed the web browser into your application and then navigate to the xml file.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Well, I was advised to use the webbrowser COM component and that was it.
|
|
|
|
|
Hi, please how to use the ADOCE API (the ADOFILTR.DLL exports) in C# to programmatically import and export data tables between the desktop and a remote device?
Thanx
Best regards
P.
|
|
|
|
|
hi,
i have two datagrid control with binded records.i need to restrict the user from multiselection whether using mouse or keyboard.
To be consize. user can select only one record(row) from any of the datagrid. if he is trying to select a record from scond datagrid while keeping first datagrid selection.Then it need to deselect the record which is in first grid.
any idea ?
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
1. against changing the system time for delay the trial day count
2. against reinstall the software after trial period and successfully run
3. against reinstall the full version of the software to another computer or pocket pc with the same registration key
Thanks
|
|
|
|
|
ting668 wrote:
against changing the system time for delay the trial day count
You need to hide the date last run somewhere, and see if it ever goes backwards
ting668 wrote:
against reinstall the software after trial period and successfully run
Don't uninstall the information that tells you the software has already been run here.
ting668 wrote:
against reinstall the full version of the software to another computer or pocket pc with the same registration key
Generate a unique key that identifies the machine, get it from the customer, and use that in generating/validating the key you send back. That's what Microsoft does.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi guys, i am doing a proejct which needs to modify the password of a MS Access database programatically in C#. Anybody could give a hint? Other language is fine as well, cos I searched a lot website without getting a tint msg.
Thanks a lot!!!
|
|
|
|
|
check
http://support.microsoft.com/default.aspx?scid=kb;en-us;304319
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
Hi Sanjay,
thanks for your reply, that really gives me some idea of what to look at, but still, cannot really get it work, below is the code I wrote trying to change the password. The first approach didn't throw any exception, but it doesn't work, the database keeps the original password. The second approach throws an exeception "Object or provider is not capable of performing requested operation." of type 'System.Runtime.InteropServices.COMException'. Any idea how to get it work? btw, I've also looked at the JRO one, which seems to work, but haven't tried yet cos some says JRO should be replaced by ADOX, etc.
private void ChangeUserPassword(String strOld, String strNew) {
ADOX.CatalogClass cat = new ADOX.CatalogClass();
ADOX.User user = new ADOX.UserClass();
ADODB.ConnectionClass dbConn = new ADODB.ConnectionClass();
dbConn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password="+strOld+@";Data Source=C:\temp\db1.mdb;Persist Security Info=True";
dbConn.Open(dbConn.ConnectionString, "", "", -1);
cat.ActiveConnection = dbConn;
user.Name="Admin";
//First try
user.ChangePassword(strOld, strNew);
//second try
//cat.Users[user].ChangePassword(strOld, strNew);
Console.WriteLine("password changed");
dbConn.Close();
}
Many thanks.
P
|
|
|
|
|
Hi all,
I have written an app with a user level, business level and data level tier. I originally designed the app to be used across the network so that the business and data tier 'lived' on a server.
I am not sure on what is the best way to handle updates of the three parts of the app. I was thinking about having the user interface call the business level but if I update the business level will that break the connection with the business level.
The other way I have seen this handled is to run from the server in the same directory and then just create a new directory for each update.
Any thoughts would be appreciated.
Thanks
|
|
|
|
|
hi there ,
how can i put data from datareader to datagrid ?
|
|
|
|
|
You can't bind Windows Forms Controls to a DataReader object. However, you can bind it to a Web Form's Controls such as the DataGrid
Anyway,
To Bind to Web Control, check
http://www.easerve.com/developer/tutorials/asp-net-tutorials-datareader-datagrid-vbnet.aspx
To Bind to a window control, you would need to convert DataRedaet to dataset and bind dataset to dataGrid
Check getting reader from dataset at
http://www.123aspx.com/redir.aspx?res=27901
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
The print preview showed two pages with text but after clicking Print on the print preview dialog window, only one blank page printed out from the printer. Any clue?
Two methods below:
private void btnPrintPreview_Click(object sender, System.EventArgs e)
{
try
{
streamToPrint = new StreamReader("C:\\Test1.txt");
try
{
printFont = new Font("Arial", 10);
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
PrintPreviewDialog aPPDialog = new PrintPreviewDialog();
aPPDialog.Document = pd;
aPPDialog.ShowDialog(); //this shows up the print preview dialog window!
}
finally
{
//streamToPrint.Close();
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return;
}
private void pd_PrintPage(object sender, PrintPageEventArgs ev)
{
float linesPerPage = 0;
float yPos = 0;
int count = 0;
float leftMargin = ev.MarginBounds.Left;
float topMargin = ev.MarginBounds.Top;
string line = null;
linesPerPage = 75;
while(count < linesPerPage &&
((line=streamToPrint.ReadLine()) != null))
{
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
}
if(line != null)
ev.HasMorePages = true;
else
ev.HasMorePages = false;
}
Any idea what went wrong or what was missing in my code? Thanks.
|
|
|
|
|
I have a solution with 11 C# projects in it, and after importing the solution into Visual Studio, I'm getting about 800 compiler warnings saying "Load of property XYZ failed."
The MSDN documentation for this warning is found here, with a suggestion that the project has been edited by hand (not the case though). Has anyone else seen this Visual Studio problem?
Judah Himango
|
|
|
|
|
Judah Himango wrote:
Has anyone else seen this Visual Studio problem?
Not yet, but there is a reason why it is beta software.
- Nick Parker My Blog | My Articles
|
|
|
|
|
hehe true true, but even VS 2005 Express beta didn't have these problems.
I've also noticed a bug that occurs occasionally where after clicking the main menu of VS, then moving the mouse to the Project bar, VS freezes up, which also didn't happen in the Express version. However, I'm wondering if all these warnings regarding invalid project properties is what's causing the latter freeze up.
Judah Himango
|
|
|
|
|
|
The Project menu item freeze up, yes. The 800 warnings of bad project file settings, no. I have the feeling the two are related though.
Judah Himango
|
|
|
|