|
Anything is still possible: maybe some of the frames have Visible=false, maybe some are empty, maybe some have zero width or height, maybe some of your statements are incorrect.
Either you provide a full description of what your app is doing and supposed to do and you show more of the code, or you start debugging yourself, by increasing observability, adding assertions, and whatever it takes to pinpoint the problem.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: insufficient information
Its almost like you threw an exception there Luc .
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
MarkBrock wrote: Its almost like you threw an exception
that is exactly how it felt, there was nothing to work with.
It did resemble an abstract version of a NullReferenceException. And it still does.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have a word document and I want to paste an image into a cell. Both the cell and the image can be of any size. I am using Microsoft.Office.Interop.Word to do this. After getting the right cell and copying the image to the clipboard, when I call cell.Range.Paste(); the image gets pasted into the document, but it doesn't get auto resized to fit the cell dimensions. If I select the image with my mouse and then press ctrl + v, the image is re-pasted and auto resized.
Is there a way to paste the image from code and have it resize?
Thx
|
|
|
|
|
how to insert an image in word file through C# 2008....
please send me the code to insert an image in a word file through C# 2008
csetopper_bhanu
|
|
|
|
|
hello once again today -
I do have one more question and I hope that someone can help me one more time today again. I have an xml document similar to this one:
<xml>
<person id="1">
<first>John</first>
<last>Smith</last>
</person>
<person id="2">
<first>Mark</first>
<last>Smith</last>
</person>
</xml>
I want to get partial xml data, for example I want to get just the second person data, and I want to get based on the attribute, in this case the ID. Is there a way how to do that? Thanks in advance, Laziale
|
|
|
|
|
You'll have to write some code.
|
|
|
|
|
How insightful
only two letters away from being an asset
|
|
|
|
|
Yes; look into XPath queries. The correct query would be something along the lines of "//xml/person[id='2']". You simply have to plug that into and example like this; there are other examples you could use as well
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
You can use an XPath expression to retrieve the xml fragment, ./person[@id='2'] will return the second person element in this case
only two letters away from being an asset
|
|
|
|
|
ok, sorry everyone cause I didn't provide any code, but here is what I tried:
string innerXml = "";
innerXml = docCompany.Attributes[selectedItem].OuterXml;
and it give me an error NullReferenceObject
any other way?
|
|
|
|
|
|
You should look into LINQ for this, I absolutely LOVE LINQ when working with XML files.
http://www.codeproject.com/KB/linq/LinQ_To_Xml.aspx
That's a good article that shows pretty much exactly how to do what you need.
Sorry for the crappy link, all the fancy JavaScript that formats it doesn't work on my iPhone (stupid safari)
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hello ,
Virtual keyword allows us to override that method in child class.
Now when we declare a class as sealed class then we cant inherit . In That case why it allows us to decalre virtual keyword in static class when any other class inherit it ?
Pls expaln in deatils
Regards,
Jaddu
|
|
|
|
|
It will not allow you to declare a virtual method in a sealed class. You can't have instance members in a static class as well.
|
|
|
|
|
You can't, what makes you think you can?
|
|
|
|
|
You can't. Have you tried it?
In a static class, if you try to create a virtual method the compiler will spit at you with
A static member cannot be marked as override, virtual, or abstract
In a sealed class
... is a new virtual member in sealed class ...
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hey guys,
Can anyone help me in writing the simple regex. Here is the situation:
I have a text file something like:
// Contents
// Contents
MyDataBlock
{
@$
The datablock text
@$
}
// Contents
// Contents
I want to extract "The datablock text". There is single "MyDataBlock" in this text file. It means that i have to extract entire MyDataBlock {...} and then what is inside @$ into a regex group.
I've created a regex. It is successfully extracting following in regex group <b>DataBlockContents</b>:
@$
The datablock text
@$
But i don't want @$ in the regex group DataBlockContents. How can i do so ? The regex i created is:
MyDataBlock[\\w\\s]*{(?<DataBlockContents>[^}]*)}
Imtiaz
|
|
|
|
|
The same way you don't get the { and } in the group?
Do you have control over how the file is formatted? Why use @$ instead of something else?
|
|
|
|
|
Is it possible to pull from somewhere after the application has been compiled to know what it's build version number is so I can show it in a label? I am thinking I can pull if from the assembly but my attempts have failed. Please can someone point me in the right direction?
Here is what I am currently doing and it does not match the build version of the application that I am compiling.
lblAppVersion.Text = "Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + " or " + System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString();
|
|
|
|
|
Are you looking for something like this?
labelControlVersion.Text = string.Format ( "Version: {0}", Assembly.GetExecutingAssembly ( ).GetName ( ).Version ) ;
|
|
|
|
|
Not quite I want the applications build version... which would show on the project properties screen under the publish tab.
any idea where this is?
|
|
|
|
|
What do you want the text in the label to look like?
To Get This "Ver. 5.1.2 Rev. 3"
Try like this;
Dim avi As System.Version = System.Reflection.Assembly.GetExecutingAssembly.GetName.Version
lblVersion.Text = "Ver. " & Format(avi.Major, "###0").TrimEnd & "." _
& Format(avi.Minor, "###0").TrimEnd & "." & Format(avi.Build, "###0").TrimEnd _
& " Rev. " & Format(avi.Revision, "###0")
Of course this is not the publish version (just saw last post)
|
|
|
|
|
it is very easy tog et this info
This is a code for this
Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
lblVersion.Text = v.ToString();
This information is stored in the AssemblyInfo.cs under Node 'Properties' in Solution explorer!
Reg,
Deep
Happy Coding!
|
|
|
|
|
Thanks I learned that c# does not auto increment the version per each build. That was the issue I was having.
|
|
|
|