|
Hi,
Any of those methods should work. Just make sure you are not creating a new instance of the form1 to get access to property/public method.
Ashish Iddya
|
|
|
|
|
My program runs on a sql server database. What I need to do is that when I update the program I need to update the database automatically with the sql script files, is there anyway that I can include the script files inside of the app istaller so that the database is automatically updated.
At present what I do is to install the program and then manually via command prompt update with osql. Is there a way that at the time of installation I can run a command to cmd.
Any help or ideas will be appreciated.
Thanx in advance.
|
|
|
|
|
Depends really on the installer.
MSI - use a custom action, or learn how to run commands.
NSIS - nsExec::ExecToStack '"yourapp.exe" /arg1 /arg2"'
|
|
|
|
|
Hi,
I have a COM application that sends out _bstr_t to a .NET interop.
The strings that I get for ASCII characters are fine in .NET,but I get junk values for unicode characters. Do I need to make any modifications to the string that I get in .NET to display peoper characters?
Thanks in advance,
Ashish Iddya
|
|
|
|
|
have u changed the project settings to UNICODE in ur COM application???If not then try to change the settings in the preprocessor defition and Project options to Unicode.
|
|
|
|
|
Yup, have done that. The COM application seems to pass the characters correctly.
I tried returning the unicode string back to COM from .NET, & it returned the correct string.
.NET seems to handle the string differently, if I pass 5 unicode characters, I get 10 characters(all junk but there are 5 commas in them).
Any ideas??!?
|
|
|
|
|
You have to decorate these strings in your .net interop interface/class/struct with a MarshalAs(UnmanagedType.BStr) attribute.
|
|
|
|
|
Tried adding MarshalAs attribute. It didnt make any difference.
Here is the code I am using..
public bool CreateFile([MarshalAs(UnmanagedType.BStr)]string file,string app)
{
FileStream fileStream = new FileStream(file,FileMode.OpenOrCreate);
/* write some stuff in the file here*/
}
Unfortunately, it is not creating a proper filename if the string is unicode.
The above function works correctly if I execute it directly from .NET(without MarshalAs attribut)
Any suggestion is welcome..This has me stumped for over a week now.
Thanks
Ashish Iddya
|
|
|
|
|
Dear all
I am developing a search engine by C#, and I have problem with searching for words in file content
I do not know how to code, what is the technique
Please let me know if you have any idea or suggestion
Appreciate yours co-operation
|
|
|
|
|
truongminhdao wrote: I do not know how to code, what is the technique
WHat is the problem you are having? What code do you have already?
|
|
|
|
|
How can I search for word in file content in .pdf,.doc,.xsl format??
That's my problem
I have not write any code for this application yet and still researching about that
Please let me know if you have any sugesstion or open source
Appreciate your co-operation
For my love
|
|
|
|
|
Hi everybody!
I'm using the MS web browser control to host an HTML for use as HTML Editor.
I have to make additional changes to the HTML content before saving to document, so that I want my own save function. But I dont know how to mark the document status as saved, changed...so that it wont display prompt dialog when I close or navigate to another page.
All I want is to be able to get/set the status of the document MANUALLY.
can anyone help?
many thanks!
What U PAY is what U GET!!!
|
|
|
|
|
Hi,
I am using Mnemonic with label controls. I have set UseMnemonic true. In design time underline character appears but in runtime , underline character appears only after pressing Alt key not before that. What I am missing?
Any clue?
Regards,
Rajeev
|
|
|
|
|
Isn't that the normal behaviour. With the exception of Office applications, everything else on my PC only shows the underline when the alt key is pressed. (Office applications, if you didn't already know, are developed using their own GUI toolkits separate from Windows - normally they are a little ahead of the curve, but when the Windows GUI catches up it does things a little differently)
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Its a windows setting. Look under display properties, appearance, effects, last option, untick that
|
|
|
|
|
Thanks Man,
It works...
Regards,
Rajeev
|
|
|
|
|
Hi
I am using Collection Editor in my Property Grid.When I change value of
a property in the property grid, the PropertyValueChanged event is
raised and and I am able to execute certain lines of code over
there.But in case of Collection Editor, this event is not raised and so
I am not able to reflect the changes into my code Can anyone suggest me
the reason and a possible workaround for this problem ???
|
|
|
|
|
Hi Shrivastava,
Guess the following site will help you.
http://www.codeproject.com/vb/net/CollectionEditorVB.asp
Thanks and Regards
Kodandapani.M
|
|
|
|
|
hi,
I have an application developed in MFC( VC++ 6.0 ) where the information all the parameters of CreateFont function of CFont is stored in a file. Now I am rewriting the whole application in c#. But I am not able to map all the paramters of CreateFont to the Font class of c# and to provide backward compatibility it is important. Can anyone suggest me a possible workaround for this problem ????
|
|
|
|
|
Tulika Shrivastava wrote: Can anyone suggest me a possible workaround for this problem
It would be helpful to understand the format of the file.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi,
The information about the font is stored in the follwing format:
1. LoByte (Point size for Font)
2. LoByte (Point size for Font)
3. LoByte(LoWord(Height))
4. HiByte(LoWord(Height))
5. LoByte(HiWord(Height))
6. HiByte(HiWord(Height))
7. LoByte(LoWord(Width))
8. HiByte(LoWord(Width))
9. LoByte(HiWord(Width))
10. HiByte(HiWord(Width))
11. LoByte(LoWord(Escapement))
12. HiByte(LoWord(Escapement))
13. LoByte(HiWord(Escapement))
14. HiByte(HiWord(Escapement))
15. LoByte(LoWord(Orientation))
16. HiByte(LoWord(Orientation))
17. LoByte(HiWord(Orientation))
18. HiByte(HiWord(Orientation))
19. LoByte(LoWord(Weight))
20. HiByte(LoWord(Weight))
21. LoByte(HiWord(Weight))
22. HiByte(HiWord(Weight))
23. Italic(byte)
24. Underline(byte)
25. StrikeOut(byte)
26. CharSet(byte)
27. OutPrecision(byte)
28. ClipPrecision(byte)
29. Quality (byte)
30. PitchAndFamily(byte)
31. Length of face name (L)
For Length L following 2 bytes will be repeated
1. LoByte (character of face name)
2. HiByte (character of face name)
Here the first inforation i.e.Point size for Font is the value which we get from the
CFontDialog::GetSize()
function and the rest of the information are the the parameters of the CFont::CreateFont( int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline, BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision, BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily, LPCTSTR lpszFacename ).
I am not able to map all these parameters to their corresponding c# values and thus cant open the application developed using the previous version( MFC ) and see the fonts properly.Any suggetions???
-- modified at 4:33 Monday 13th February, 2006
|
|
|
|
|
Hello,
I'm trying to display data from a text file "TAB" into a data set for display in the windows form. Later , I need to update any changes that the user made to the text file. Anyone knows how to do this?
I'm using C#
-- modified at 1:40 Monday 13th February, 2006
|
|
|
|
|
how u r expecting a table in a text file... in text files u can't create tables, if u want to do that means seperate the texts with seperators and then get the string from that text file do the operations
VMSSanthosh
|
|
|
|
|
Hii,,
i need to identify all the systems connected in a lan..How can i do it? and if my lan contains multiple domains then how can i find the domains programatically and find the systems under that domain??PLease help
|
|
|
|
|
Hi,
I hope you can manipulate the follwing code and get information about the Domains
using System;
using System.Net;
class GetResolveInfo
{
public static void Main(string[] argv)
{
if (argv.Length != 1)
{
Console.WriteLine("Usage: GetResolveInfo address");
return;
}
IPHostEntry iphe = Dns.Resolve(argv[0]);
Console.WriteLine("Information for {0}", argv[0]);
Console.WriteLine("Host name: {0}", iphe.HostName);
foreach(string alias in iphe.Aliases)
{
Console.WriteLine("Alias: {0}", alias);
}
foreach(IPAddress address in iphe.AddressList)
{
Console.WriteLine("Address: {0}",
address.ToString());
}
}
}
Hope this will help you
kss
|
|
|
|