|
can u suggest some books based on win applications
|
|
|
|
|
Well... I load from database some tables in comboboxes. I want to display only a part of data (i work with adress (state, region, street, cp etc.)) so i use local datasets and load all of it in combobox with arraylist (datasource, displaymember etc.). But i can't just register every street in the country, so for a special place i register all of it, and for all other i want to make possible to register it if it's not registered. So i need to check if i write in combobox some text and then want to insert it in the database if this text is already in the combobox displaymember. So how can i search for an item in combobox by displaymember text?
|
|
|
|
|
Please do not post the same question in multiple forums. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I have a login form which will connect the Active Directory to check the user; but the output that i get is alway not couldn't connect.
Boolean Success = false;
DirectoryEntry Entry = new DirectoryEntry("LDAP://" + Domain, UserName, Password);
DirectorySearcher Searcher = new DirectorySearcher(Entry);
Searcher.SearchRoot = Entry;
Searcher.Filter = "(&(objectClass=user)(sAMAccountName=" + UserName + "))";
Searcher.PropertiesToLoad.Add("cn");
Searcher.SearchScope = SearchScope.Subtree;
try
{
//Test = UserExists(Domain, UserName, Password);
SearchResult Results = Searcher.FindOne();
Success = (Results != null);
}
please help me to find the solution.Regards,
John.L.Ponratnam
|
|
|
|
|
Hello everybody,
I'm developing a custom control containing a TreeView control and a couple of buttons and etc ...
Now, the question is that how can I show the smart tags menu of the TreeView at the design time?--------------
Vahid Rassouli
|
|
|
|
|
Ours is a desktop application (windows based) and based on remoting distributed architecture.
It is a windows based application and not web based.
Steps followed to run the application
1. Application is deployed / hosted on Citrix Server.
2. User has to first logon to citrix server.
3. User clicks the icon of the application in Citrix Server.
Question is
1. If IIS is running, could it mean that underlying channel is HTTP, or could it be
that remoting is done using TCPChannel itself
2. I know that IIS is a web server for ASP.NET web application, why is IIS being used
for a windows application.
3. What could be the role of IIS / Worker process in a desktop or windows application?
4. important!!! Is it that Citrix works as a fileserver also. I am asking because
files are not maintained in the client machine, so when user clicks the icon
in citrix, does necessary DLLS get loaded in the client machine firstly?
Regards,
NetQuestionsmodified on Friday, February 19, 2010 1:29 AM
|
|
|
|
|
Doesn't the use of IIS completely rule out the use of TcpChannel. The communication should be using HTTP and SOAP and not
using Tcp sockects?
Regards,
NetQuestions
|
|
|
|
|
NetQuestions wrote: If IIS is running, could it mean that underlying channel is HTTP, or could it be
that remoting is done using TCPChannel itself
That depends on your remoting configuration. Did you tell your app to use HTTP or to use Sockets to talk to the remote object?
NetQuestions wrote: 2. I know that IIS is a web server for ASP.NET web application, why is IIS being used
for a windows application.
What makes you think it is? Did you have a remote object or a webservice being hosted by IIS?
NetQuestions wrote: 3. What could be the role of IIS / Worker process in a desktop or windows application?
None at all.
NetQuestions wrote: 4. important!!! Is it that Citrix works as a fileserver also. I am asking because
files are not maintained in the client machine, so when user clicks the icon
in citrix, does necessary DLLS get loaded in the client machine firstly?
That depends entirely on how your application is configured in Citrix. If your streaming the app to the client, then the app gets sent to the client and run there. If app is configured to run on the Citrix server, then all that's sent to the client is the window images of the application.
There are, of course, more options for all of these questions, but your not providing enough details on the background of any of these questions to answer them with anything other than generalities.
See what I'm getting at here? Your questions are all answerable, but only by you because all of this stuff in under direct control of how you designed your app, what remoting configuration you've chosen, how the app was deployed to the Citrix server, and how it's being setup and advertised in Citrix.
|
|
|
|
|
thanks dave. I shall get back to you.
regards,
NetQuestions
|
|
|
|
|
Colleagues,
Is there a standard (and free) control which is like a ComboBox, only better? Some of the potential features could be:
* being able to control the font for each of the items individually
* icons, checkboxes next to the items
If such thing exists, could you post a reference? If not, then I’ll stop the wishful thinking and carry on with the standard ComboBox.
Cheers,
- Nick
|
|
|
|
|
You may like to investigate WPF where it is relatively easy (after the steep learning curve) to create such controls yourself. Take a look at some of the WPF articles here on CodeProject to see the sort of things that can be done. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi,
ComboBox (as well as ListBox):
1. holds and shows items of any type you choose, not just strings.
2. supports "user drawing", see DrawMode property and DrawItem event.
Hence you could:
- define your own little class representing such item, with all the properties you'd like;
- paint it yourself in whatever format you like.
I often do this with ListBox, and occasionally with ComboBox.
And no, I don't have a published example around.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
You might want to subclass the combobox and add your own functionality as shown here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Using VB 2008 and a simple MDI application...
When the active mdi child is maximized, there is a small gap between the right side of the child and the right side of the parent. Admittedly not a life-altering problem but it is worrisome. Anyone know of a fix?
|
|
|
|
|
Hi,
Please forgive me as this may be a very simple question but I am a newbie at this. I have searched for this info for three days now and cannot seem to find any answers. I have two questions:
Q1. How do I reset the background color of a push button.
I have a standard button. In the code snippet below I also have a cursor style change. The cursor changes back to the original (default cursor) when the mouse leaves the button (without me including any cursor specific code in the MouseLeave function) but the back color does not change. I even tried to set up a pointer to store the original color and this works but after the mouse leaves the button the style of the button is chnaged to flat. Do I need to also store the FlatStyle and retrieve it on MoudeLeave?
// declare an int pointer (for the exit button background color) called
btnExit_default_BackColor
int *btnExit_default_BackColor;
// declare a boolean pointer (for the exit button UseVisualStyle background color) called
btnExit_default_UseVisualStyleBackColor
bool *btnExit_default_UseVisualStyleBackColor;
private: System::Void btnExit_MouseEnter(System::Object^ sender, System::EventArgs^ e) {
// allocate memory for an int variable and make the btnExit_default_BackColor pointer
point to this new memmory
btnExit_default_BackColor=new int;
//assign the exit button background color to the memory allocated
*btnExit_default_BackColor=btnExit->UseVisualStyleBackColor;
// allocate memory for a bool variable and make the btnExit_default_UseVisualStyleBackColor
pointer point to this new memmory
btnExit_default_UseVisualStyleBackColor=new bool;
//assign the exit button background color to the memory allocated
*btnExit_default_UseVisualStyleBackColor=btnExit->UseVisualStyleBackColor;
btnExit->Cursor=Cursors::Hand; // change mouse cursor to hand when over a push button
// Change button outline color to 0x00FF4500 (orange red with opacity 0)
System::String^ highlightColor="#0x00FF4500";
btnExit->BackColor=System::Drawing::ColorTranslator::FromHtml(highlightColor);
}
private: System::Void btnExit_MouseLeave(System::Object^ sender, System::EventArgs^ e) {
// Change button outline color to original state before mouse hover
btnExit->BackColor=System::Drawing::Color::FromArgb(*btnExit_default_BackColor);
btnExit->UseVisualStyleBackColor=*btnExit_default_UseVisualStyleBackColor;
delete btnExit_default_BackColor; // delete the btnExit_default_BackColor pointer
delete btnExit_default_UseVisualStyleBackColor; // delete the
btnExit_default_UseVisualStyleBackColor pointer
btnExit_default_BackColor=0; // set pointer to null
btnExit_default_UseVisualStyleBackColor=0; // set pointer to null
}
This seems very complicated for what I think is a very simple thing. I just want the color of the button to chnage when the mouse is over it and have the button revert to its original (design) state when the mouse leaves. Can someone please help me with this. Thank you very much in advance for any help you may be able to provide.
Q2. Can someone please explain to me the funcion of the ^ in the parameter list of the functions above; i.e. in
private: System::Void btnExit_MouseLeave(System::Object^ sender, System::EventArgs^ e) {
I cannot find any reference to this operator. The closest I have come is that it may be a top-level reference but I don't know what this means and how it works,
Please forgive if these are too simple questions. Thank you.
Paul
|
|
|
|
|
I can't answer your first question but I can explain the ^ operator:
That operator is a reference to a managed object.
So, if you have
void btnExit_MouseLeave(System::Object^ sender, System::EventArgs^ e)
That means that the function takes a reference to a System:Object and a reference to a System::EventArgs object.
If you have Object* obj , it means that obj points to the object on the heap.
In the same way, the ^ means that the variable points to the object on the managed heap.
The ^ is used with the gcnew operator to assign a new object instance to a variable, as in:
Object^ var = gcnew Object()
|
|
|
|
|
We can use SharePoint API as well as SharePoint List web reference to update List Items. Using API it is quite straight forward as we can directly assign a DateTime object against a DateTime field in SharePoint list. But with List web reference it is not that straight forward as we need to first convert the DateTime object into the SharePoint DateTime formatted string and then assign it to the specific field.
http://www.mindfiresolutions.com/lp/sharepoint-development.htm[^]Cheers,
Eliza
|
|
|
|
|
I have a couple of custom controls in the same project (Visual Studio 08) that inherit from UserControl. Is there away that I can hide one of the controls from the toolbox, during "application" design time? C#, if it matters.
Thanks!
|
|
|
|
|
If you really need to, delete them by right click and delete.
I would prefer adding a tab and have all my controls in that.
|
|
|
|
|
Hello,
In my winapp targetting .Net FW v2.0.50727, a SQLConnection.Open() is done following FolderBrowserDialog.ShowDialog().
On the SQLConnection.Open(), I get the following error: "Error in the application"
stack trace
================
at System.Threading.TimerBase.AddTimerNative(Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.TimerBase.AddTimer(TimerCallback callback, Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.Timer.TimerSetup(TimerCallback callback, Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.Timer..ctor(TimerCallback callback, Object state, Int32 dueTime, Int32 period)
at System.Data.ProviderBase.DbConnectionPool.CreateCleanupTimer()
at System.Data.ProviderBase.DbConnectionPool.Startup()
at System.Data.ProviderBase.DbConnectionPoolGroup.GetConnectionPool(DbConnectionFactory connectionFactory)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPool(DbConnection owningObject, DbConnectionPoolGroup connectionPoolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at FolderBrowseAndSQLConnect.Form1.button2_Click(Object sender, EventArgs e) in E:\mybackup\FolderBrowseAndSQLConnect\FolderBrowseAndSQLConnect\Form1.cs:line 29
Please give suggestions to solve this problem. I run it on a "Win XP Professional SP3 Version 2002". Interestingly, this issue is not reproducible from other machines that have the same OS & .Net FW configuration.
Thanks
|
|
|
|
|
Can you post the code from Form1.button2_Click?
I are Troll
|
|
|
|
|
Sorry for the delay, here's the code:
private void button2_Click(object sender, EventArgs e)
{
try
{
string connStr = "";
if (string.IsNullOrEmpty(txtUser.Text) && string.IsNullOrEmpty(txtPswd.Text))
connStr = String.Format("Data Source={0};Integrated Security=SSPI",txtSQLServer.Text);
else
connStr = String.Format("Data Source={0};user id={1};password={2}", txtSQLServer.Text,txtUser.Text,txtPswd.Text);
SqlConnection sqlConn = new SqlConnection(connStr);
sqlConn.Open();
MessageBox.Show("succesfully queried databases");
sqlConn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
|
|
|
|
|
You're getting the Application Error on sqlConn.Open, and only on that specific machine? How does the connection-string look when you debug the application?I are Troll
|
|
|
|
|
Answer to Q#1.1: Yes the application error is on sqlConn.Open.
Answer to Q#1.2: Yes, this is reproducible only on some machines.
Answer to Q#2: connection string looks like this - "Data Source=computer-88\\sqlexpress;Integrated Security=SSPI"
|
|
|
|
|
Looks good, doesn't seem to be a problem with the code. It was on a specific machine? Could there be another application running that's using the same port as SQL Express?
You might want to try to connect over IP, using the default port-settings. If it helps, we'll have a clue where to look next I are Troll
|
|
|
|
|