|
Thank you very much Dave,now I can scroll it down according to your suggestion.
I changed UInt32 into int so I could assign the negative value to dwData and then the mouse finally scroll down. Thanks again Dave ^^
|
|
|
|
|
No problem
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hello friends,
I'm using VS2005 (.Net Framework 2.0). I have a few problems with the Windows Form controls. First, I've searched and searched, but couldn't find a horizontal separator control, like the one we see in the File Properties dialog box, in the Windows Form Controls library. Is there a way to add such a control to my forms or I have to derive a new class?
Second, the textbox control doesn't support transparent background. I've searched the Codeproject articles, but they all suggest long and complex method for the purpose. If someone can please suggest a sweet and simple solution, I'd be very grateful. I'm developing a new application and deriving new classes just to implement a new UI element is a time-consuming and complex affair.
Many thanks in advance.
modified on Saturday, October 25, 2008 8:56 AM
|
|
|
|
|
Ankit Rajpoot wrote: I have to derive a new class?
You could use a Panel, set it's border to Fixed3D and set it's Height to 4. Seriously, create a new user-control and write a paint-handler. You'll need to draw two lines on the canvas.
Ankit Rajpoot wrote: Second, the textbox control doesn't support transparent background.
With good reason; even the login-screen of World of Warcraft doesn't use transparancy in the input-controls. It will be harder for the user to read what he/she has typed.
You could use a label, and add/remove characters (from the .Text property) as the user presses keys (OnKeyPress event). Not a pretty solution, though
|
|
|
|
|
Hello eddyvluggen,
What I need a transparent textbox is for displaying the path of a file in a properties dialog box. The path may be longer than the width of the dialog box, so the best solution would be to use a textbox that has its ReadOnly property set to true. So that the user can click in the textbox and then use his/her mouse or arrow keys to see the complete path. I don't need to type anything in it, I just need it to display in it.
One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself (for solution explorer and properties and the toolbox.)
Thanks
|
|
|
|
|
Ankit Rajpoot wrote: I don't need to type anything in it, I just need it to display in it.
Sounds plausible How about a word-wrapped tooltip?
Ankit Rajpoot wrote: One more thing, I'd like to ask is that how can I implement the sliding panels in my application like the ones we see in VS itself
Use a Panel and set the AutoScroll property to 'true'. Next, drop the control that you want scrollbars on, into the panel. Set it's height and width so that it's larger then the Panel itself, and scrollbars will appear.
Good luck
|
|
|
|
|
Naaaahhhhh
I'm talking about their sliding property. The way they slide into view when the mouse hovers over them.
|
|
|
|
|
That's not a standard property, you'll need a third-party library or you'll have to code the functionality yourself. Sorry, but I can't really help there.
You could slide a form into view once you hover a panel, or you search the CodeProject
|
|
|
|
|
Hi,
Let us suppose there are 10 systems in network.I have created a table with few records in one system.Now i want to create same table with same records in remaining all 9 systems.I can not go to each and every system and do same.so that i decided to do like following.
suppose 1st i create table with few records in one system. now i want to create script for that table using c#, but not sqlserver management studio.After creating script using c# i would like to run the script(in all remaining 9 systems) from my system by providing server name ,user id,pwd.For this i need a win application.plz suggest me.
Otherwiseplz tel me how to create script using c#.
Thanks,
ravikumar
|
|
|
|
|
Why not use Management Studio scripting capability: script the objects you need, store the result in a file and run it through C# using SQLCommand.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi,
I want to maintian my xml data by using DataGridView, but I'm having a problem with getting the right xml element name to set a DataGridView.DataMember if the case is:
I have 2 xml files where the difference is:
sampleOne.xml:
<?xml version="1.0" standalone="yes"?>
<user>
<id>1</id>
<name>Robin</name>
</user>
<user>
<id>2</id>
<name>Batman</name>
</user>
sampleTwo.xml:
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<user>
<id>1</id>
<name>Robin</name>
</user>
<user>
<id>2</id>
<name>Batman</name>
</user>
</NewDataSet>
And the code for loading the xml into DataGridView:
private string getXmlElementName(string path)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(path);
XmlElement element = xmlDoc.DocumentElement;
return element.Name;
}
private void openXmlFile(string path)
{
DataSet ds = new DataSet();
ds.ReadXml(path,XmlReadMode.Auto);
dgvBrowser.DataSource = ds;
dgvBrowser.DataMember = getXmlElementName(path);
}
when loading sampleOne.xml it didn't show any errors, but the result of loading sampleTwo.xml will accure errors, it's because the element.Name = "NewDataSet" which is not appropriate for the dgvBrowser.DataMember. how can I get the element name "user"? Any suggestion for this? I browsed anywhere and still didn't get the answer for this problem
Thank you for the help.
Regards,
Andre H.H.
|
|
|
|
|
Perhaps methods GetElementsByTagName or SelectNodes would help. Both are found in XmlDocument class.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
I want a detailed hierarchy of exception classes.Specially ones that handle database exceptions.Please help...
|
|
|
|
|
MSDN[^]
For database exceptions, refer to the documentation for the database you are using as they are product specific.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hellow world !
i need to convert access file to sdf fpr Pocket pc
i need to convert it in the PC (not in my PPC)
how can i do it ?
than'k for any help
|
|
|
|
|
Hi,
i have some images stored in sql database and is all ok. They are saved as a byte[] and i load them into the c# application.
So, i was wondering about how can i have a byte[] in a c# solution (design time not runtime time), well i want to add a byte [] to the solution not image file!!!
Can i do that? is not really important, but i like the way pictures are stored in sql kind of stealth mode.
Thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
modified on Friday, October 24, 2008 8:13 PM
|
|
|
|
|
You can but it's not very efficient as the byte array will need to be serialized by the designer for it's value to persist.
If you want to do it, it's probably easiest to wrap a List<byte> in a component, and call it's ToArray method to get the byte array and it's Clear + AddRange methods to set a byte array.
I don't see what advantage you will gain by doing this though.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
|
Hi,
i created a folder and added a few icons there (i embeded them after), and i want to load them in a label only in some ocasions (other ocasions remains with no icon), the bellow code is for bitmap but not for icons! well it loads but i get edges in white color
Assembly myAssembly = Assembly.GetExecutingAssembly();
Bitmap mybit = new Bitmap(myAssembly.GetManifestResourceStream("UserControl_Page.icons.error.ico"));
Image img = Image.FromHbitmap(mybit.GetHbitmap());
ToolStripStatusLabel_InfoBottom.Image = img;
how can i do this for an icon file???
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I am working on a SDK. It is currently for our use, but one day it will be licensed to our customers. I need a way to ensure that the only code that uses the SDK is our code. Our code is signed (Strong Name). I was thinking that it would be great if there is an Init function or Load event I could use to check that the assembly loading mine was signed with our key. Does such a thing exist? Do you have an alternative idea?
Pat O
Tanks for your support
Pat O
<a href="http://currentchaos.blogspot.com/">Blog</a>
_ _ _
|
|
|
|
|
AppDomain.AssemblyResolve
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Thanks, I was aware of that. I was hoping for something that is called on code within the assembly. Again the goal is to enforce licensing, therefore relaying on someone to register my licencing code prior to using my SDK seems unlikely to work. I guess I could ask the more general question how do others handle licensing?
Tanks for your support
Pat O
<a href="http://currentchaos.blogspot.com/">Blog</a>
_ _ _
|
|
|
|
|
Hi All,
I m using a windows service for calling a web service to insert some data in Db in set interval. When i run exe of my windows service, everything is working perfectly, but when i m creating setup of windows service and deploying it, its not updating data in DB. I don't know the problem with setup. I m using installer in windows service and added custom actions in setup. Even setup if installing as expected and running the service after installation it, but after that i can't see any changes in my data.
Can any one help me in this issue.......
Thanks in advance
|
|
|
|
|
You have to narrow down where the problem is. Is it in calling the Web Service? Is it connecting to the database?? Is it in calling the database functions?? There's too many places to list.
But, I'll take an educated guess at it and say that you used a Trusted Connection to the database, correct? Since services are, by default, run under the Local System account, the SQL server doesn't trust it, so, the connection fails. It's better to use an SQL account that is specificly used by your service to log into the database.
|
|
|
|
|
HI
Can anybody help me i wrote the following code in Console application. Now i want to convert it in Method GetContact(String TeamName). i want to call it from Aspx page. It will get the parameter TeamName and pass it to my SQL Where Clause statement. After the following code will generate the xml and save the file c:temp. RightNow it is working fine but only in Console Application. How i can use this code in MY_FOR_CONTACT(string TeamName). I want to give this code to front end developer who use it to create xml file everytime. and save it c:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using System.IO;
class ExecuteXmlReader
{public static void Main(){
String TeamName = "gta";
String sConnection = "server=HTCWEBDEMO;database=hometrust;user id=ht_admin;password=htc_tr!st";
//String sConnection = "server=zjaffary\\SQLExpress;Integrated Security=SSPI;database=northwind";
SqlConnection mySqlConnection = new SqlConnection(sConnection);
mySqlConnection.Open();
// Get the same data through the provider.
string mySQLStatement = "SELECT Title,FirstName,LastName,PhoneNumber,Faxnumber, email from contactlist where TeamName='" + TeamName +"'; select FirstName, LastName from contactlist where TeamMorty ='True' and teamname='" + TeamName + "';";
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter(mySQLStatement, sConnection);
//SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter("SELECT FirstName,LastName,Title,City from employees; select city from employees;", sConnection);
DataSet myDataSet2 = new DataSet();
myDataSet2.DataSetName = "Contacts";
mySqlDataAdapter.Fill(myDataSet2);
// Write data to files: data1.xml and data2.xml for comparison.
myDataSet2.WriteXml("c:/temp/ContactList.xml");
mySqlConnection.Close();
}
}
|
|
|
|