|
In case the control is button ,
this.button1.Size = new Size(Width, High);
|
|
|
|
|
I want to resize controls like the way in Design View of C#. That's all.
Thank you
|
|
|
|
|
hi to all
how read a cell from dbgrid witch it binds with a table?
thanks
-- modified at 8:38 Thursday 12th January, 2006
|
|
|
|
|
is it possible to add bit maps on menu items in c# windows applications?
if yes please give mathods.
|
|
|
|
|
Hi there,
Sure. You'll get a lot of this stuff by do quick search from this site
below is just one of them Image Menu Item
<< >>
|
|
|
|
|
how can i develop elliptical (or in other shapes) puch buttons just like
windows application form push buttons using C#?
|
|
|
|
|
Hi there,
You can develop your custom button control by writting your own control class that inherits from the standard button class System.Windows.Forms.Button and then you have to override the method OnPaint to paint your button
protected override void OnPaint(PaintEventArgs e)
{
//code to pain your button here
}
Hope this helps
<< >>
|
|
|
|
|
how can we use win32 api functions from C# windows applications?
?
|
|
|
|
|
Hi there,
Just simply declare the API function that ur application want to call
in ur application, should be something like
[DllImport("User32.Dll")]
public static extern void GetWindowText(int h, StringBuilder s, int nMaxCount);
that means GetWindowText is an API in User32.dll. Then, call it if needed.
<< >>
|
|
|
|
|
|
:-DHi, i have created a tab control with few tabpages, i would like to have an up button and a down button located outside of the tab control (but in the same form) that allows user to scroll the current selected tabpage. how can i do that? or which property/function allows me to do so?
Thanks Alot,
from a beginner
|
|
|
|
|
Hi. I am not sure but maybe you can check out the Panel class.
Hope it helps,
FJ
|
|
|
|
|
Hi Friends,
In my application, I have created with listview control with 3 rows with Green color as row background. By default row 1 is in selected state. If i want to deselect the row from the listview control by clicking anywhere above the third row. At that time the deactivation of the row is applied, but the row background is applied as white. This could be occured even i rearrange the column of the listview also. How can i restore back the background color for the listview row after deselecting the row or rearrange the column?
Please help me to solve this issue.
Regards,
Prakash.
A Journey of thousand miles must begin with a single step.
|
|
|
|
|
I'm not safe from my own source according to VS2005.
So I built a sample solution in VS2005. After deployment of the solution to my own machine, I tried to add a csproj to the solution. Keep in mind I built these on my own machine. What does VS2005 say? Well, basically it says that MSBuild is a security nightmare in that it can run what essentially amounts to macros that could destroy my hard drive. Guess I'll never download another source project from myself and that I should really, really be sure about who I'm downloading source from. Wait, that's my source!
Halfway down this link is what MS has to say:
Linky to MS Build Overview
Anyone come across any workarounds so that anyone who downloads my csproj won't get this message?
Thanks!!!
Jim
|
|
|
|
|
how to declare a connection string in web.config and use it from there in our Web form
-- modified at 23:11 Friday 2nd December, 2005
|
|
|
|
|
Hi there,
The connection string depends on what kind of DB you are using.
the great site will give you all kind of Db Connection String
<< >>
|
|
|
|
|
<configuration>
<appSettings>
<add key="ConnectionString" value="connectionstring(depends on database)"/>
</appSettings>
<system.web>
Then u can use it as:
string connectionstring = System.Configuration.ConfigurationSettings.AppSettigs["ConnectionString"];
Regards,
Sandeep
+919891027854
|
|
|
|
|
Is there a way to set a single key as a MenuStrip item shortcut? When I try to set the ShortcutKeys value to 'P' (in the properties editor), I get an invalid property message.
-- K
|
|
|
|
|
Hello
I know not if I can post this here, because is C# + Interop, but I find not some sub forum about this.
I wish handle events of some SysListView32 object, But I know not if this is possible. I have the handle this object via FindWindowEx (like the spy++).
I have some samples using timers and checking the properties of the SysListView32, but I think timers a few odd, if we can use events and delegates.
I apreciate any help
Thanks
|
|
|
|
|
When I press F5 for debugging the Autodesk logo flashes and then goes away - with no error messages. Autocad2006 will not load from within Visual Studio 2003. I can manually run Autocad2006, use netload run the code but I cannot debug.
I have set up a project using the
New AutoCAD Managed CS Project Application wizard and the text in Lab1. The properties debugging are as per instructions and agree with the wizard.
Does having both Autocad2006 and CivIl3D cause a problem?
Gazza
|
|
|
|
|
Hi
I am having a code for 2 functions one is to Extract the file from a zip file. Another one is to read the Extracted file n parse it.
While Execution the application I am getting an exception The File(Extracted file) being used by some other application and its exiting by showing the line number "StreamReader sr = File.OpenText(FILE_NAME);".
But If I am debugging the application ..the results r perfectly fine.
Can Any one please explain this.
I am attaching the functions here
public static void ExtractZIPFile()
{
sbyte[] buf = new sbyte[1024];
int len;
java.io.FileInputStream fis = new java.io.FileInputStream(@"C:\TEMP\POWER_PRODUCTS.ZIP");
java.util.zip.ZipInputStream zis = new java.util.zip.ZipInputStream(fis);
java.util.zip.ZipEntry ze;
ze = zis.getNextEntry();
java.io.FileOutputStream fos = new java.io.FileOutputStream(FILE_NAME);
while ((len = zis.read(buf)) >= 0)
{
fos.write(buf, 0, len);
}
zis.close();
fis.close();
FileProcessing();
}
public static void FileProcessing()
{
if (!File.Exists(FILE_NAME))
{
Console.WriteLine("{0} does not exist.", FILE_NAME);
return;
}
CreatePPTable();
StreamReader sr = File.OpenText(FILE_NAME);
String input="";
while ((input= sr.ReadLine())!=null)
{
String []strs = input.Split(';');
#region Add a row
DataRow drNew = dsPProducts.Tables[0].NewRow
drNew["PASS2_AVAIL_CD"] = strs[1];
...
drNew["PASS2_AVAIL_CD"] = strs[122];
dsPProducts.Tables[0].Rows.Add(drNew);
#endregion end of adding a row
Console.WriteLine(input);
}
sr.Close();
File.Delete(FILE_NAME);
}
|
|
|
|
|
Looks like you forgot to close fos in the following snippet.
dvsr wrote: java.io.FileOutputStream fos = new java.io.FileOutputStream(FILE_NAME);
while ((len = zis.read(buf)) >= 0)
{
fos.write(buf, 0, len);
}
When debugging, the GC must have run and closed it for you. That would explain the debug/release behavior.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi Sinthil,
Thanks for ur Help....
Once again its proved How dumb i am..
Thank you once again.
Subbu
|
|
|
|
|
Hi everybody.
I'm developing a program which has a combobox with all client names but as client name is not the primary key, or better: unique, on the database, some itens on the combo box are repeated, so this way there is more than one person with the same name.
In order to solve that I'd like to know if it is possible to associate another value (preferable an unique ID which would be loaded from the database) for each item on the combo box, but in a way that the program user would see only the name on the combo, not this unique ID, which would be used by the program.
If my explanation was not clear:
- I'd like to have this user view on the combo box:
John Wallace
Marck Keen
Isaac May
John Wallace
The way it is right now (no associated values) I can't do a query that would retrieve me only one row, because using "select * from table where name = ' + combo.SelectedItem.toString() + "'"; it would retrieve me 2 rows if, for example, I select John Wallace which has 2 occurences on the same combo.
So, behind the scenes, I'd like to retrieve the unique id from the selected item. So the program would have that:
John Wallace 344072407
Marck Keen 40947047
Isaac May 483609
John Wallace 20648
Thus, I can make a different selection based on the name, like:
"select * from table where uniqueID = ' + combo.SelectedItem."somethingThatWouldRetrieveMeTheUniqueID" + "'";
Thank you !
|
|
|
|
|
You could create a class like:
public class ComboEntry {
public string Name;
public int Id;
public override string ToString() {
return Name;
}
}
and put instances of it into the ComboBox. The ComboBox will call the ToString method to determine what text should be shown and when you access the SelectedItem property you can just cast back to ComboEntry and get the Id.
|
|
|
|