|
leckey wrote: DataTable dt = ds.Tables["Rest"];
DataRow row;
row = dt.NewRow();
strPartNumberInputReference = txtPartNumberInput.Text;
row["PartNumber"] = strPartNumberInputReference;
Just shows blank. Any ideas?
After the call to dt.Rows.Add(row), is the information in the DataTable?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Let me try to explain what is happening.
In the text box enter '123' and click the Search button.
Nothing for '123' so grid comes back empty. Just the headers.
Click the second button 'add part' and that's where I want it to add a new line, with the column part number filled with that '123' entry.
I'm not sure what I did now. When I click the 'add part' a row does show up, but it is returning data that has nothing to do with the entry.
|
|
|
|
|
leckey wrote: I'm not sure what I did now. When I click the 'add part' a row does show up, but it is returning data that has nothing to do with the entry.
What data is it returning? Data that is in the table or some other.
I use similar techniques to what you are trying a lot and haven't had this problem. Is this an ASP.NET or WinForms app?
Is it the display that is wrong or is it the actual datatable? When you put a watch on the DataTable, does it get the correct data in the new row.?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
I'm having problems with creating a process to show a webpage, and the object returned not having a valid handle. The page loads fine in all instances, but without a working handle I'm stuck on some activities to perform on the open window. I'm stumped as to the pattern involved. This seems to not work at boot, and at some point spontainiously begin providing a handle and then continue to do so for the remainder of the session. Once it started working hte only time it stopped again was after I un/redocked my laptop to attend a meeting. Any thoughts on what's going on here?
m_helpBrowser = new Process();
m_helpBrowser.StartInfo.FileName = "IExplore.exe";
m_helpBrowser.StartInfo.Arguments = indexPath;
m_helpBrowser.Start();
if (this.m_helpBrowser.MainWindowHandle.ToInt32() == 0)
MessageBox.Show("browser opened with no handle");
|
|
|
|
|
Hi!
Seems to be a timing problem.
Immediately after the process has been started, IE sometimes doesn't seem to have had enough time to create the main window, so you'll get IntPtr.Zero .
The documentation for Process.MainWindowHandles suggests calling Process.WaitForInputIdle to make sure the process had enough time to start up completely.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Adding the WaitForInputIdle call's removed the null handle problem, instead I'm occasionally getting an "invalid window handle" error when using the win32 api call GetWindowThreadProcessId and passing the process handle. The handle number my error catcher displays appears to be a random int. Eventually it spontainiously starts working again.
-- modified at 16:24 Monday 26th June, 2006
|
|
|
|
|
Based on about a dozen reboot cycles, the garbage value for the handle is only occuring in the first instance of my app launched, and is present for multiple close the browser/open a new one cycles. A 2nd copy started and running concurrent to the first will be able to successfully use the Process's handle each time even while the 1st is still creating new garbage values. Delay in starting the app, delay between starting the app and opening the browser, and delay between opening the browser and trying to use the handle all have no apparent effect.
If this is a timing issue, could it be that IE's taking longer to startup than WaitForInputIdle's maximum timeout? I'm using an old p3-550 for my reboot testing, so a timeout intended for a faster machine might be inadequate here.
|
|
|
|
|
2nd followup it's the 1st instance of IE that's the problem regardless of how it's started. starting IE before my app and I never see this.
|
|
|
|
|
I'm developing a Windows App in C#. I've been researching ways to pull my tooltip text and HelpString text (from a helpProvider control) from an external file (such as .html) instead of hardcoding it into my controls. So far I haven't found any documentation. Has anyone had experience doing this, and if so, can you enlighten me?
Jennifer Budenz
|
|
|
|
|
|
I'm familiar with HelpProvider.SetHelpString, but that requires you to type the help text that you want to be displayed directly into your code:
this.helpProvider1.SetShowHelp(this.zipTextBox, true);<br />
this.helpProvider1.SetHelpString(this.zipTextBox, "Enter the zip code here.");
What I want to do is create a file (not sure what kind of file - .txt, .html, .chm?) that contains all of my help text associated with each control. The code in my windows app project would then pull the help text from this external file, instead of having to type the help text directly into my code. I want to do this so that I have one file with all of the help text, so I don't have to go through each form in my project in order to update the text.
Any suggestions?
Thanks!
-- modified at 10:59 Tuesday 27th June, 2006
|
|
|
|
|
jbudenz wrote: I'm familiar with HelpProvider.SetHelpString, but that requires you to type the help text that you want to be displayed directly into your code:
No it does not.
jbudenz wrote: Any suggestions?
A simple Proof of Concept would be to use a XML file for the data. System.Data.DataSet to load and process the file into the HelpProvider using SetHelpString(). Later you could optimize it using a different Xml reading mechanism that is faster than DataSet.
|
|
|
|
|
Hi,
So I'm using WMI in .net with C# to start up a set of processes on a large number of remote machines. All is working well in my code to start up the processes and they are showing up fine both in WMI queries as well as in the taskmanagers of the target machines. However, as per the default for process invocation in WMI I cannot see the apps' windows on the desktop of the target machines. I've been searching around all morning to help find an answer to allow the windows to show up on the desktop so i can watch their progress, but the best I could find was some VB/WSH examples like the following...
Const SW_NORMAL = 1<br />
strComputer = "."<br />
strCommand = "Notepad.exe" <br />
Set objWMIService = GetObject("winmgmts:" _<br />
& "{impersonationLevel=impersonate}!\\" _<br />
& strComputer & "\root\cimv2")<br />
<br />
' Configure the Notepad process to show a window<br />
Set objStartup = objWMIService.Get("Win32_ProcessStartup")<br />
Set objConfig = objStartup.SpawnInstance_<br />
objConfig.ShowWindow = SW_NORMAL<br />
<br />
' Create Notepad process<br />
Set objProcess = objWMIService.Get("Win32_Process")<br />
intReturn = objProcess.Create _<br />
(strCommand, Null, objConfig, intProcessID)<br />
If intReturn <> 0 Then<br />
Wscript.Echo "Process could not be created." & _<br />
vbNewLine & "Command line: " & strCommand & _<br />
vbNewLine & "Return value: " & intReturn<br />
Else<br />
Wscript.Echo "Process created." & _<br />
vbNewLine & "Command line: " & strCommand & _<br />
vbNewLine & "Process ID: " & intProcessID<br />
End If
Anyone know how to allow desktop interaction for the processes?
|
|
|
|
|
Hi. I am developing a DRM software, and I need to hide my application from the Windows Task Manager application list. How can I do that? I think it involves "NtQuerySystemInformation" but I am not sure. I would appreciate any help. Thanks!
SUMMARY
* Need to hide application from Windows Proccess List
* Probably uses some rare windows function
Thanks!
code -> MakeBest(forever);
|
|
|
|
|
Hiding the process from Task Manager sounds like Spyware to me.
|
|
|
|
|
|
Be nice. Tons of the friendly software on your computer uses undetectable programs. If you can't help, why post?
code -> MakeBest(forever);
|
|
|
|
|
Not much that I can think of that doesn't have "Microsoft Corporation" in the company field...
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Microsoft's not all that bad... I use Microsoft Office (esp Outlook), WIndows, Windows MP, MSN Messenger, Encarta, Visual Studio, and Wireless Laser Desktop 6000. I really like some of their products.
code -> MakeBest(forever);
|
|
|
|
|
You missed my point. What I meant was that Microsoft has the vast majority of credible hidden applications running on Windows that I'm aware of. I'm not a Microsoft hater.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I don't know how the rest of this community feels about DRM software but I personally hate it. It seems unethical and the companies that promote such software should be sued and fined..
----
www.digitalGetto.com
|
|
|
|
|
Yeah, the only legitimate use for something like that would be for use by system admin teams monitoring internal machines. For any other use, you should burn in hell. But, beyond the ethical question, I have no idea. Have a nice day and thanks for calling.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Basically, you can't hide from the Task Manager.
As for DRM, I'm with everyone else. It's an idea that looks great on paper in the Corporate Boardroom, but in all usability and actual security, it sucks. Take a look at Sony's attempt at DRM and tell me that it won't come back to smack you in the face...
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 14:58 Monday 26th June, 2006
|
|
|
|
|
Sounds suspecious; we can't help
Best,
Jun
|
|
|
|
|