|
As .txt opens with notepad as default, with what program .exe opens with?
I am aware, .exe is native to operating system. However i have a packaged program which is embedded into main program and is extracted to temp folder before execution..however with .tmp extention assigned. I can rename .tmp with .exe, I am just digging into windows internals and curious how this works.
I guess somefunction of rundll.dll is capable of executing .tmp files, but i am not quite informed about it.
Also, noticed that installshield and other installers copies executables as .tmp files and later executes them
thanks well in advance.
h.
|
|
|
|
|
The EXE files are not opened by some other program, they run as is, that's why
they are called executables ! And they each can have quite different functionality.
This is different from other files (often called documents):
TXT/DOC/XLS/PPT... files always open with the same program (typ. Notepad, Word,
Excel, PowerPoint...)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
I have this string :
string number = "%123293395976?;107101637=461?";
and I want to take only this part 293395 and put it in another string.
How can I do it? if you could provide me a code for that problem.
I knew that it could be done by using StringTokenizer or taken it character by character, but I don't know how to do it?
Thank you a lot for your help.
-- modified at 11:30 Sunday 12th August, 2007
|
|
|
|
|
you seem to want to take a few digits out of a sequence of digits;
that certainly is not what a tokenizer would do naturally.
What makes you decide where the start and end of the substring are ?
fixed positions ? depending on earlier characters ?
have a look at String.Substring
if you need more help, try to be clear about what the context is, what those
numbers/digits represent, etc.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you a lot for your reply ...
|
|
|
|
|
CanadianBoy wrote:
These digits are taken from card reader and the digits I want to take from the card reader digits is product name. By this digits I want to take I can check if the product name is inside the database or not.
I tried String.Substring, but it is not provided in my C#.
if you have or implemented any code that can these digits, I would be thankfull.
That is impossible. Look again.
What happens when you try to use it ? Compiler error ? run-time error ?
If so, show the code and the details of the response.
And if you don't know how to use Substring, look it up on MSDN, on Google,
or in all the articles here on CodeProject.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello
i have requirement where i need to load fonts which is
specific to my application from a folder but not from installed font directory C:\windows\fonts. I could achive this by embeddeing
the resource file i.e fonts file *.ttf.
but this solution bolts the application's exe
so i tried using AddFontResource() and RemoveFontResource()
followed by SendMessage() with broadcast so that all the applications
at runtime can read those font resource can read the font file from
the system fonts table.
but this is not happening all the applications like wordpad , msword
are able to read the fonts which i added from my application
but i an unable to create the desired font in my application
i am getting the default font as MS Sans sarifi
pls suggest me any solution to this
so that i can understand basics better
thanking u
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
Look at the PrivateFontCollection class
|
|
|
|
|
i have some tables in pdf format that have to stored in arrays for my reference in project (c sharp)
now i have coverted those tables into excel sheet. Now my problem is how can i access the tables through c sharp (i am using studio 2003). i also converted the excel sheet into access database so that i can connect it to the project. is it possible ? if can i convert the table intries into integer arrays ?
|
|
|
|
|
You could do this two ways...either through connecting to excel file Excel on Connectionstrings.com[^] or through Office Interop...
Going the connection string route may be the easiest, but the Office Interop way is powerful but a bit too involved to post...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Like this i am now able to read the values, but i am now copying string to string. when i tried declaring s as int array and s = (int) ran.text, i am getting error
how can i convert the ran.text string to s int array
for(int row = 2; row< 12; row++) // loop through first 10 rows excel is
{
ran = (Excel.Range)Worksheet.Cells[row, 1];
s = (string) ran.Text;
MessageBox.Show(s);
}
|
|
|
|
|
s[i]= int.Parse((string)ran.Text);
this is working for me, i dont know whether it is correct type casting or not
|
|
|
|
|
How do i select which windows form opens 1st in a project?
I have a create, home, and track form and currently the home form opens first where i obviously want the create form to open 1st.
Thanks
|
|
|
|
|
You can change it in Program.cs file
|
|
|
|
|
|
You will see the code like that in Program.cs
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new Form1());<br />
}
So, change form1 to the form name you want.
eg:
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new FormThatIWantToShow());<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks
|
|
|
|
|
hello
I have a network that contains about 50 computers.then I want to connect to
one of this computers with it`s telnet . also i want to do this with c#.
please help me.
|
|
|
|
|
|
my application listens for socket connections. client can open socket connections and transmit messages. it connects to another server to get updates. each second my application get 300-400 data updates filters them and tranmits the updates to the connected clients same filterred 10 to 12 updates to each clients.
When 500 clients connected to my application its cpu use was 40-80% memory use 15 MB but after 3 hours I get windows error. some window apprears saying "This application encountered some problem needs to shut down. Sorry for the enconvience." Amazingly my app is running happyly no change in cpu and mem uses. When i close the error window it shuts my app.
This is a multithreaded application. I checked for deadlocks confident that there is none and .net 2 handles deadlock itself. Confident that there is no memory leaks. Application totally written in C#.
Can anybody help how to ger rid of this windows error?
|
|
|
|
|
shahidul.haq wrote: and .net 2 handles deadlock itself
How is .NET supposed to do that (generally)?
First thing to do is to find out the unhandled exception that's being thrown. Usually an unhandled exception is the reason for "This application encountered some problem...", but without the exception only looking into a crystal ball can help you.
Did you check the other properties of the process at runtime? GDI Handles and USER objects come to mind. When they're used and not disposed of correctly, the app will run out of handles after some time.
But once again: It's impossible to tell without seeing code.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have a winApplication which has a form.
In that form I have a sql data adapter which contains 4 command for select,update,delete,insert.
When I execute insert command, with passing 9 parameters values, by use of executenonguery function I receive "procedure or function "procedure name" has too many argument specified" error massage at line of executing.
What should I do? I don't know what's happend there cause I check every parameters by breakpoint and saw that every parameters were passed!
|
|
|
|
|
#1. maybe, the parameters that you are sending from code are more than the actual parameters of stored procedure.
OR
#2. try to call the stored procedure with fully qualified name. (eg: dbo.myStoredProcedure or mydb.dbo.myStoredProcedure )
OR
#3. check-out this article[^] if you are using Datagrid view or ObjectDataSource
Hope it helps...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
hey guys ! I have like 20 forms in my project that all are pretty much the same, so i'm looking for a way to doublicate them(Like in delphi)! I tried to add Inherite forms but when i do that I just get the controls not the code !!
plz help me out
Thanx
Mr.K
|
|
|
|