|
What do you mean by "apply css file in my project"
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Sir/Madam
I want to insrert and update a value of textbox. it it is not in the database then display blank. else then show that value and if i click a button named save then it will insert value if it is blank else update that value. the value of that textbox is related to another combobox. and they have one common field soilid.
Sir/madam
if this discription is less then ask me for detailed i will send you that. and i hope that it is sufficient and hope that my problem is solved very qickly.
Thanks for your support
Balwan
|
|
|
|
|
It's not that your question is not detailed enough - it is that it is too broad a question to easily answer in one post.
You are asking about generic database connectivity, which can be found for looking at the ADO.NET documentation, or any number of articles written about database access.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
hello
Could you please tell me how to delete entries in HKLM of windows registry(regedit) in inno scripting lang.
Yogesh_T
|
|
|
|
|
Hi,
In the web application(C#) that i am developing, I use a javascript prompt window.
I need to get the value that is entered in the prompt window to a label control in the C# web form.
I could get the value into a text box using javascript code as:
document.getelementbyid('textbox1').value=-----
but if I try to get the value from the textbox to the label control(or from a hidden field), I am getting the value only after its posted back.Any solution for this?
Thanks,
-- modified at 4:04 Tuesday 20th June, 2006
|
|
|
|
|
Hi
I am using Visual Studio 2003 to develop C# applications. Is there an easy way to prgrammatically change the name of a saved file, eg a word document name?
Kobus
|
|
|
|
|
File.Move[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
|
Thanks,
I should have known it.
Kobus
|
|
|
|
|
Hi every one.
I am System Tools Developer , and I want use C# to program Device Driver.
Can any one tell me Can I do that in C#
|
|
|
|
|
I've been searching for some code to show how to print an image and scale it to the paper size and center it in the printable area. So far I've had no luck. Lots of examples on how to print text, but none for images. Does anyone have any examples, or know where a good example is?
Thanks.
|
|
|
|
|
Nobody knows how to print an image? Incredible.
|
|
|
|
|
Hi,
I have DataTable. I want to convert data in datatable to .dbf file using c#. Is there any way to do that? Could you please help me in this regard?
Thanks in advance...
Nagendra
|
|
|
|
|
QQ-group that topic is for C# number is 6026787...
accept programer only come form Wuhan-China.
you are welcome!
|
|
|
|
|
|
If I write a pure C# application, only using the standart publi API, no interop, the same binary should work well on32 bit, 64 bits and perhaps on the compact framework as well if I link against it.
Now how could I achieve the same thing if I do interop and I have a managed C++ API?
let say I have a managed C++ module compiled for 3 different target but with always the same interface:
mycppmodule32.dll
mycppmodule64.dll
mycppmoduleCE.dll
let say in the C# code I also do some interop
internal class User32 // & CE ?!
{
[DllImport("USER32")]
public IntPtr GetHdc(IntPtr hWnd); // 4 byte IntPtr
}
internal class User64 // not sure it exists, but I assume....
{
[DllImport("USER64")]
public IntPtr GetHdc(IntPtr hWnd); // 8 byte IntPtr
}
Let suppose these DLLs are included as modules in my csharpdll.dll.
Now if I deploy all these DLLs, how could write a simple nice code in my C# dll which internally target whatever native lib is appropriate?
Is it possible (to keep it simple)?
|
|
|
|
|
Create a C# 'runtime' dll that you can conditionally compile. Then simply swap that out.
|
|
|
|
|
er...
thanks for answering!
what I was trying to do in a simple manner (if possible) is to have one library to run them all!
like imagine my program is a click once application, I would like (if possible) to avoid the x32 link, the x64 link, the CE link.
Just one link and it runs whatever the end-user machine.
Or also imagine the user "install" (i.e. copy) the file on one PC, and then he simply copy on an other PC and it sill works!
Conditional compilation is a clean way to have a build for a given platform.
But I wonder if there is a no hassel way to have one build for all platform that the user could simply copy without worrying about his pc's architecture....
you see what I mean?
is it possible? (in a simple way)
Note:
I did something like that on the PocketPC a while ago but it was akward.
Basically it was worked like that:
enum Platform
{
CE,
Win32,
}
public class OSUtil
{
internal static Platform Platform { get {} }
public Value AMethod()
{
switch(Platform)
{
case CE:
return OSUtilCE.AMethod();
case CE:
return OSUtilWin32.AMethod();
}
}
}
class OSUtilCE
{
static Value AMethod() {}
}
class OSUtil32
{
static Value AMethod() {}
}
|
|
|
|
|
No!
It didn't work like that, too simple!
Don't forget runtim verification when the method is launched, it worked like that:
enum Platform
{
CE,
Win32,
}
public class OSUtil
{
internal static Platform Platform { get {} }
public Value AMethod()
{
switch(Platform)
{
case CE:
return OSUtilCE.AMethod();
case CE:
return OSUtilWin32.AMethod();
}
}
}
class OSUtilCE
{
[DllImport("CEDll")]
static Value AMethodImpl();
static Value AMethod() { return AMEthodImpl(); }
}
class OSUtil32
{
[DllImport("Win32Dll")]
static Value AMethodImpl();
static Value AMethod() { return AMEthodImpl(); }
}
|
|
|
|
|
I know, I could do as I did, but generate the wrapper code automatically
|
|
|
|
|
Hi All,
I currently have an xslt called from C#, this xslt calls(defines an xslt) that uses some jscript functions.
The jscript functions declares a new (microsoft.xmldom) object, this used to worked before when I had just installed msxml 4.0 sp2 in my server, after I installed sql 2005 which installed msxml6.0. this sentence takes too long to execute, sometimes it timeouts. I've commented this line an the xslt executes pretty fast, does anyone has a clue on what might be happening, this seems to happens only when the xslt is being called from C# code, I have several instances of microsoft.xmldom declaration running without any problems,
Any commments will be appreciated.
Thanks in advance.
|
|
|
|
|
Hi All
I have a question relating to the resources/namespaces required when automating either to Excel or Word as I find that namespaces and resources that work perfectly on my machine with Office 2003, do not work with other machines who have Office 2003.
I'm having to type the full Microsoft.Office.Interop.Word/Excel namespace out which in the tutorials and other sample code I've seen, is not the case so I wonder if there is something wrong with my installation.
Here is a little program I created which takes all Word Documents within a directory and merges them into one large Word Document.
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using System.IO;<br />
using Microsoft.Office;<br />
<br />
object oMissing = System.Reflection.Missing.Value;<br />
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
<br />
<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
lblSelect.Visible = false;<br />
<br />
}<br />
<br />
<br />
private void btnOK_Click(object sender, EventArgs e)<br />
{<br />
Microsoft.Office.Interop.Word._Document oDoc;<br />
Microsoft.Office.Interop.Word._Document cDoc;<br />
Microsoft.Office.Interop.Word.Application wordAppA = new Microsoft.Office.Interop.Word.Application();<br />
Microsoft.Office.Interop.Word.Application wordAppB = new Microsoft.Office.Interop.Word.Application();<br />
oDoc = wordAppA.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);<br />
<br />
folderBrowserDialog1.ShowDialog();<br />
DirectoryInfo di = new DirectoryInfo(folderBrowserDialog1.SelectedPath.ToString());<br />
FileInfo[] diFiles = di.GetFiles("*.doc");<br />
<br />
lblSelect.Text = "Folder currently selected: " + folderBrowserDialog1.SelectedPath.ToString();<br />
lblSelect.Visible = true;<br />
<br />
int count = 0;<br />
foreach(FileInfo fi in diFiles)<br />
{<br />
count++;<br />
}<br />
<br />
progressBar1.Maximum = count;<br />
<br />
count = 0;<br />
foreach (FileInfo fi in diFiles)<br />
{<br />
object file = fi.FullName;<br />
cDoc = wordAppB.Documents.Open(ref file, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);<br />
cDoc.Select();<br />
wordAppB.Selection.Copy();<br />
oDoc.Application.Selection.Paste();<br />
oDoc.Application.Selection.InsertBreak(ref oMissing);<br />
cDoc.Close(ref oMissing, ref oMissing, ref oMissing);<br />
count++;<br />
progressBar1.Value = count;<br />
}<br />
wordAppB.Quit(ref oMissing, ref oMissing, ref oMissing);<br />
wordAppA.Visible = true;<br />
Form1.ActiveForm.Close();<br />
}<br />
Now this works absolutely perfectly on my machine without any fail what so ever but when I try to put it on any other machine even though we both have Office 2003, I get this following error
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
I can get around this by having it copy the Microsoft.Office.Interop.Word.dll into the source directory of my application and it will then work but this is a pain because I shouldn't need to do it.
Anyone got any ideas?
Thanks so much
David Bloch
Houston Medical
-- modified at 21:19 Monday 19th June, 2006
|
|
|
|
|
I'm working on a windows application, in the main form I have a few custom controls, which are contained on a different project. In the main form a few user settings are set, and I need the controls to get those settings, but I can't get them. Is there a way that I can share user settings on different projects that belongs to the same application? I-m using visual studio 2005 and C#
Thanks in advance
|
|
|
|
|
Are they persisted settings? If so, have you considered setting/reading registry key values in HKCU\Software\{mycompany}\{mysettings\{setting a}, etc? Or if the settings are persisted in an INI file local to the application exe, reading in that (assuming the INI is updated real time) and getting the settings from there?
Mike Poz
|
|
|
|
|
I have an ArrayList with numerical values in.
I want to be able to only have distinct items, either by getting rid of any duplicates, or copying single values over to a new array (whatever works).
e.g.
I have: 1, 2, 3, 3, 4, 5, 5, 5, 8, 9, 9
I want: 1, 2, 3, 4, 5, 8, 9
Unfortunately I can't figure out how to do this. Can someone please help?
|
|
|
|
|