|
I haven't.
How do you launch it? Double-clicking the exe in Explorer, double-clicking aa shortcut somewhere, through a command line, batch file, another app calling Process.Start()?
Some of these ways allow for error checking, and could give some detailed information.
My best guess would be the app does start, immediately encounters a fatal problem and exits silently. Example: it tries and opens a logfile C:\mylog.txt however that particular system doesn't have a C: partition.
Suggestion: add some logging to your app, even a couple of MessageBox.Shows could be justified here.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
It's a WinForms app. Asked user to load both through shortcut and by directly clicking the EXE, with the same result. The whole Main() method is wrapped in a try/catch and prints any exception it encounters to the screen, which is why this silent failure is really puzzling me. Not that that makes much difference since the standard behavior of a WinForms app is for Windows to display a generic message for uncaught exceptions . . . not to just do nothing.
|
|
|
|
|
I would put a MessageBox.Show() as the very first line in Main().
Are 64-bit systems involved? Is it built for "AnyCPU"? Which .NET version? Any special DLLs involved?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I thank you for your thoughtful replies. Unfortunately my question included some misinformation. It has since come to light that multiple .NET applications have begun silently failing on the user's computer, and it just happened that ours was the first one he tried after the problem appeared.
|
|
|
|
|
Sounds like the .NET installation could be faulty then. Best bet is to probably reinstall .NET on the target pc.
My best guess would be that there is a problem inside mscoree.dll, which causes your app to not even load properly.
|
|
|
|
|
You should check for unhandled exceptions.
Several articles here show how to do it.
AUS Enrique Ferreyra
(Pachu)
|
|
|
|
|
It could be that your application is throwing an error and closing.
Thus, it does not even show on the process explorer.
As an aside, make sure the right version of .Net framework is installed.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
<code> I'm using Visual C++ 2005 .NET. (I'm new to .Net programming)
How do you convert a char string to a String ^ for printing in RichTextBox? Thanks.
This is my code which does not work.
<br />
char StringToDisplay[100] = {'\0'};<br />
char StringToConcat[100] = {'\0'};<br />
char chDllVersion[80];<br />
<br />
<br />
sprintf( StringToConcat, "dll version in use = %s ",chDllVersion);<br />
strcat( StringToDisplay, StringToConcat );<br />
<br />
RichTextBox1->Text = StringToDisplay;
|
|
|
|
|
if this is about C++/CLI (i.e. the managed version of C++) you should use the string type, not char arrays; and ask in the C++/CLI forum.
If you're new to .NET I strongly suggest you choose, buy and study an introductory text on the language of your choice.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I think I found a workable solution. I would not start a new project doing it this way but I'm working with some legacy code that is unmanaged so I need to deal with char arrays as string from C.
To convert from char array to String in VS C++ .Net Managed Code use:
<br />
gcnew System::String (YourCharArrayStringToDisplay);<br />
So for example,
<br />
char ThingToShow[100]<br />
sprintf( ThingToShow, "This works!");<br />
MessageBox::Show(gcnew System::String(ThingToShow));<br />
Here is the link that I found it in:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/adcadbc1-9092-41ba-8deb-01e800f0b172[^]
|
|
|
|
|
Try this code..........
This is for c# ..........
RichTextBox1.Text = Convert.ToString(StringToDisplay);
|
|
|
|
|
I'm looking for more information on using the Web Service component of SSRS 2008 to generate a PDF from a deployed report. I would like to programmatically email the resulting PDF as an attachment.
I can find plenty of information on the Class structure of the various Reporting Services classes but no concrete examples.
I am looking for VB.Net code but C# will do as well.
Many thanks!
|
|
|
|
|
|
Hello
I am using code from below link
Extended GridView with Fixed Header and Pager[^]
to add scrolling in gridview ,i have just modified the "overflow-x:hidden' to "overflow-x:scroll" for horizantal scroll also.
Its all working fine I got both vertical and Horizantal scrolls,but the problem is that whan i do horizantal scrolling,datarows are moved but header remains fixed,so it looks wiered.
So please help how I can have header also movable with horizantal scrolling.
Pls help as its urgent.
Sonu.
|
|
|
|
|
|
Hello
I am using code from below link
Extended GridView with Fixed Header and Pager[^]
to add scrolling in gridview ,i have just modified the "overflow-x:hidden' to "overflow-x:scroll" for horizantal scroll also.
Its all working fine I got both vertical and Horizantal scrolls,but the problem is that whan i do horizantal scrolling,datarows are moved but header remains fixed,so it looks wiered.
So please help how I can have header also movable with horizantal scrolling.
Pls help as its urgent.
Sonu.
|
|
|
|
|
Sonu - when you are working off an article, your best bet is to post the question on that forum as the chances of the author happening to wander by and notice your question are slim. That's the place you are most likely to get an answer.
There's no need to double post. Please remove your other post on this issue.
|
|
|
|
|
I am now trying to get the frames from the document.
IHTMLDocument2 document=null;
int lngMsg = RegisterWindowMessage("WM_HTML_GETOBJECT");
int SMTO_ABORTIFHUNG = 0x2;
int lRes;
HWND windowhandle=functofindbrowserwindow();
SendMessageTimeout(windowhandle, lngMsg, 0, 0, SMTO_ABORTIFHUNG, 1000, out lRes);
if (!(bool)(lRes == 0))
{
int hr = ObjectFromLresult(lRes, ref IID_IHTMLDocument, 0, ref document);
if ((bool)(document == null))
{
}
else
{
FramesCollection fc=document.frames;
}
}
How do i get the frames from the document?
|
|
|
|
|
Reposting in this board as it is more .NET than C# specific
I have a problem, that is to mask data in certain format that is displayed in the browser
To solve the problem I came up with the following solution
1)Find all the browser window handles (class Internet Explorer_server)
2)Get the IHTMLDOCUMENT2 using the window handle
3)Use IHTMLDOCUMENT2::body::innerHTML to find the data I am looking for and modify it.
The code I have written below throws a COMException. [Could not set the innerHTML property. Invalid target element for this operation.]
//document is a IHTMLDOCUMENT2 obtained using the window handle and WM_HTML_GETOBJECT message
//pattern is StringBuilder initialized with a SSN pattern that I want to mask.
IHTMLElementCollection dome = document.all;
foreach (IHTMLElement dom in dome)
{
StringBuilder bf = new StringBuilder(dom.innerHTML);
if (bf.ToString().Contains(pattern.ToString()))
{
bf.Replace(pattern.ToString(), "***-**-****");
dom.innerHTML = bf.ToString(); //Exception occurs here
}
}
Why does this exception occur. How do I fix it so that the webpage contents will be altered.
I wrote another version of the code, it works, but not completely.
I found out that is because the webpage contains multiple frames and so it does not work. I does not work if the SSN number is inside a frame(or something like a frame which holds an embeded object).
StringBuilder bf = new StringBuilder(document.body.innerHTML);
if (bf.ToString().Contains(pattern.ToString()))
{
bf.Replace(pattern.ToString(), "***-**-****");
document.body.innerHTML = bf.ToString();
}
The first piece of code throws exceptions, the second one does not work if there are multiple frames.
What am I doing wrong in both the code above.
How do I go about achieving my solution. Is my approach correct, or is there a better way to do it.
Thanks and regards,
David
|
|
|
|
|
This question qualifies to be in the COM category than .NET.
Anyway, try setting the innerHTML of the frame window instead of the page body.
|
|
|
|
|
I have a C#/WPF app where all the logic is coded in the dialog boxes. Pretty much like an Access app in fact.
I'm re-architecturing it into a MVVM app.
Some of my business objects (of type Report) live in a (legacy) database and are created upon user interaction. Some others (of type ReportDefinition and ReportParameter) are from a pre-instantiated set of read-only objects. ReportDefinition objects are identified by a key.
In the Access-style app I could use XAML to create a resource dictionary indexed by the ReportDefinition key. It would be very easy to define the various ReportDefinition objects, along with their arrays of ReportParameters in XML. The objects would be readily accessible from my code.
How can I achieve a similar thing in the business layer of the new app ? I guess that I'm longing for a sort of XAML-sans-View. I can imagine options based on XmlSerializer but maybe I'm overlooking a very simple and elegant solution.
Any suggestions ?
|
|
|
|
|
According to Microsoft, "dotnetfx35.exe" (some 231 MB) is the complete installation package for .NET 3.5 SP1. However, when I start the .exe, the installer connects to the web and says to download some more 63 MB (actually, it downloaded some 30 MB according to the TaskManager). Then the installation really starts.
How can an installation of .NET 3.5 without connection to the web be achieved? Some computers of our customers do not have a connection to the web, and when a big number of computers is to be installed, such repeated downloads are quite bad.
Please note that here I started the install package of .NET directly, not an install package of our solutions. Consequently, the solution provided in http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/5fa32450-d052-4574-9cd6-b43ef9cfe269/[^] is not applicable.
|
|
|
|
|
Hey
I have the following Scenario:
<StackPanel Width="200" Height="100" Background="Yellow" Name="BigPanel">
<Canvas Width="80" Height="80" Background="Blue" Margin="10" Name="RectanglePanel" >
<Rectangle Canvas.Left="10" Canvas.Top="1" Height="50" Width="50" Fill="Black" Name="MyRectangle">
<Rectangle.Triggers>
<EventTrigger RoutedEvent="Rectangle.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="MyRectangle"
Storyboard.TargetProperty="(Canvas.Left)"
From="10" To="-30" Duration="0:0:5"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Rectangle.Triggers>
</Rectangle>
</Canvas>
</StackPanel>
The Problem is when the rectangle left the Rectanglepanel that contains him (for example in the ContainerPanel) it is still visible, how can i make the rectangle be visible only in its parentpanel=rectanglepanel? is there a property or a way for that?
|
|
|
|
|
Defender-NF wrote: is there a property or a way for that?
Yep. ClipToBounds = "True"[^] on the canvas should do the trick.
|
|
|
|
|