|
If you look at my previous post, you don't have to worry about it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Changed the code but i still cant access any user made methods in my parent form, and yes they are declared as public. All i can see is the usual methods, events and properties of a form. Sorry to be a drag but whats going on?
|
|
|
|
|
ok finally got it working, thanks for your help!
|
|
|
|
|
hi, I'm making a simple download application. How do I get information about the file before I download it such as its size and name (without all the http information and such)? Also, in many download managers there is the option to download the rest of the file later, how is this done, I'm not asking for the rediculous amount of code it would take, but could you point me in the right direction? Thanks,
Stephen
|
|
|
|
|
Well, it is all done using the HTTP headers. One tells you the Content-Length,
other tells you the Content-Type, etc. And wneh you make an HTTP request, using
another HTTP header (don't remember the exact name) you can tell the offset
from which you want to receive tha data. That's it. Just find e good HTTP reference
and you'll be OK.
Cheers
|
|
|
|
|
|
Using C#, there's FileInfo class that can be instanciated. It gives all the informaion of a file, including size and date created, ect. For the download resume, there is a code at http://www.csharphelp.com/archives/archive9.html[^] that would give some insight of how to do it.
==== Lei Ming 2004 =====
====================
|
|
|
|
|
After much travail, I've finally got my ASP.NET project referencing all of its components when they're stored in the GAC - with one exception. For some reason, the compiler cannot find the "MyApplication.DLL", into which all of the Code-Behind assemblies are compiled.
I've verified that this file is strong-named properly, and the entry into the web.config file is identical to all of the others. A couple of hours worth of research hasn't turned up any reason why this file might be different from other DLLs, but I was hoping someone might have a suggestion.
Any help is greatly appreciated.
|
|
|
|
|
I'm stuck.
I'm writing a custom drawn ListView and I need to draw the subitems
of each item. So the cleanest way to get the subitem bounds is to send
an LVM_GETSUBITEMRECT message. But it works well only for indexes greater than 0.
This is also noted in MSDN. The big trouble comes when the columns are reordered
by the user. No matter what, LVM_GETSUBITEMRECT for index 0 always returns the bounds,
as if it was the leftmost column. For all other indexes LVM_GETSUBITEMRECT always
works fine in every case. How should I get the proper bounds for subitems at index 0?
|
|
|
|
|
Hello,
I am very much new to C# programming. The problem is I am
facing 'SEHException' using ShowDialog() method of Form Class.
I am using a form as Dialog from a MDIChild Form. I don't know why
it is happenging. But there is no problem if i use 'ShowDialog()'
from a non MDIChild form. How can i use the method from a MDIChild
form ?
sorry for my english.
thanks in advance.
|
|
|
|
|
You don't! MDI Children are not meant to be used a modal dialogs! Use a normal form if your putting up a modal dialog.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
A process that I have no control over creates a file that contains multiple XML declarations. Thinking I have to open file and remove all but first declaration and save to be able to read XML.
Do I need to do this, or is there another way to deal with multiple XML declarations in same file?
If I need to open file and manually remove, please help with how I may implement this.
Thank you.
|
|
|
|
|
You can read the file as a regular text file yourself, divide the text into the different xml declarations, and feed one of them or all of them into xml documents using the LoadXml method.
---
b { font-weight: normal; }
|
|
|
|
|
This code doesn't seam to work, it opens both as planned, but the frmCreate opens for 1/4 second or so, help please.
The code:
private void mnuLogin_Click(object sender, System.EventArgs e)<br />
{<br />
Form openform = new frmCreate();<br />
this.Close();<br />
openform.Show();<br />
}
|
|
|
|
|
Of course it does! You closed the form (this) that is the only thing holding a reference to the new form you created. If Form1 creates Form2 and show it, then Form1 closes, Form2 is going to close it since nothing else is holding a reference to Form2.
You can't "transfer" control of your application from form to form to form. You have to have a "parent" form that creates your other forms to keep their references alive. Those "child" forms can have their own "child" forms, and so on down the line. It'll look like a hierarchy when your done.
Startup Form
|
+-------+-------+
| |
Form2 Form3
|
+----+----+
| |
Form4 Form5
In this example, if you Close Form2, Forms4 and 5 are going to vanish too, because Form2 created and was holding the references for 4 and 5. In your code, you did just that. Your (this) form created a new form object called frmCreate, then killed itself, taking the newly created form with it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I HIDE the form or something so frmCreate can be seen?
|
|
|
|
|
try the opacity property
its me =Þ
grim zax
|
|
|
|
|
You don't look through the Intellisense list much, do you? You just said it yourself -> this.Hide()[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I said that as I found it in the list lol.
|
|
|
|
|
What is the best way to:
1. Show a pdf
2. grab a pdf's structure (pages/chapters etc)
3. Grab text only
I've seen many libraries even the Adobe SDK, which claims support for VB C++, I'm just courious if anyone else has looked at working with PDF viewing and had a .net tool to recommend.
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
There are some open source C# tools on SourceForge. When I had to do this, I was changing fields in one PDF only, which we generated, so I created a non compressed PDF and changed the text with string replacement. The PDF specification is pretty logical and easy to get, if you need more than that, it may be worth your while to look at it, also.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I want to convert one string input in one of my function in c# to System.IO.Stream object but it gives me conversion error in 2nd line of the below function
static myFunc(string strInput)
{
Stream objStream;
objStream=(Stream)strInput;
}
would much appreciate any help
Thank you
Share knowledge to enhance your learning
|
|
|
|
|
You can't expect to convert a type to something else just like that. If you can do with a Reader, you can try the StreamReader class.
Or if you absolutely need a Stream, something like this will work
string obj = "Senthil rocks";
Stream s = new MemoryStream(Encoding.ASCII.GetBytes(obj));
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hey all...im trying to paste something as "enhanced metafile" but i dont know what parameters to set ...anyone know of what they are or where i can find documentation??
WordApp.Selection.PasteSpecial(ref what??????????????????????)
Thanks
FIXED IT:
object Placement=Word.WdOLEPlacement.wdInLine;
object DataType = Word.WdPasteDataType.wdPasteEnhancedMetafile;
WordApp.Selection.PasteSpecial(ref missing,ref missing,ref Placement,ref missing,ref DataType,ref missing,ref missing);
|
|
|
|
|
trying to create child nodes from db, i have 5 entries in the db listed in order as show:
hello1
hello2
hello5
user1
user2
when i create the child node it only shows "hello1", i can get it to change from "hello1" to "hello2" if i change my query, but they still are all the same listing.
here it the code:
treeView1.Nodes.Clear();
dataConnection.Open();
TreeNode dbnode = new TreeNode("Cashier User Names");
TreeNode dbnode1 = new TreeNode();
string dbName = dataConnection.DataSource.ToString();
treeView1.Nodes.Add(dbnode);
dataCommand.Connection = dataConnection;
dataCommand.CommandText = "SELECT id ";
dataCommand.CommandText += "FROM people WHERE access_level = 'Cashier' ORDER BY id DESC";
dataReader = dataCommand.ExecuteReader(CommandBehavior.CloseConnection);
while (dataReader.Read())
{
dbnode1.Tag = dataReader.GetValue(0).ToString();
dbnode1.Text = dataReader.GetString(0);
dbnode.Nodes.Add(dbnode1);
treeView1.ExpandAll();
}
please help as i'm struggling to learn this treeview
there isn't much written info on them that i can find
|
|
|
|