|
Hi all
I am reading a DB into a binding source that I am then displaying in a datagridview
I want to do a few things like go through and format a few rows (example: companyname/username to just display the user name)
i also want to get a count on of how many of each type in a certain column
lastly i know i can use the .filter to the binding source but i have two questions i need clarified
1a) how do you string more than one filter together.
2a) if i use the filter and then i ran a counting loop or something in the binding source would it give me the account for all the info in the binding source or would it give me the totals for the filtered info.
Thanks
|
|
|
|
|
Hai,
I want to place an microsoft office document imaging in a windows form in c#.net ie(C#.net + windows application)
My requirement is to place the image in the half of the winform and below some controls such as labels and textboxes are to be placed and by seeing the data from the image user is going to enter the data in the controls if he enters the correct data user has to save the data.if any body finds a solution and what area the dlls to be imported .
Please send to me
suryaprakash_kk@apollohealthstreet.com
surya prakash
|
|
|
|
|
hi did u found the solution for doing this....can u gv me some sample for this code if ur done with this....
|
|
|
|
|
Hello everyone,
I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement.
As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!!
I am puzzled and I was wondering if someone can help me out on this.
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Here is one of the easiest one:
In your main Program.cs call a Form:
--Name that form splash screen,
--Set the property 'FormBorderStyle' = 'None'
--call a method show splash so basically you will write as below:
public SplashForm()
{
InitializeComponent();
}
public void ShowSplash()
{
Thread.Sleep(1000);
this.Close();
}
Now in main write this:
SplashForm f2 = new SplashForm();
f2.Show();
f2.ShowSplash();
This will work as a splash screen!!
|
|
|
|
|
Better ask your question to Tom Clement itself instead of posting it here.
there is a Discussion board below the article.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Try this it is workin on my project its also from "A Pretty Good Splash Screen in C#" by Tom Clement.
<br />
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 />
<br />
namespace GasDistributionManagement<br />
{<br />
public partial class SplashScreen : Form<br />
{<br />
static int var =0;<br />
public SplashScreen()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)<br />
{<br />
<br />
}<br />
<br />
private void SplashScreen_Load(object sender, EventArgs e)<br />
{<br />
this.ClientSize = this.BackgroundImage.Size;<br />
timer1.Start();<br />
}<br />
<br />
private void timer1_Tick(object sender, EventArgs e)<br />
{<br />
var++;<br />
progressBar1.Value++;<br />
if (progressBar1.Value != 100)<br />
{<br />
int i = 1 + ((100 - var) / 8);<br />
if (i / 3 > 2)<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.DarkViolet;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
else if (i / 3 == 2)<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.Red;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
else<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.DarkKhaki;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
}<br />
else<br />
{<br />
timer1.Stop();<br />
this.Hide();<br />
Login log = new Login();<br />
log.Show();<br />
}<br />
}<br />
<br />
}<br />
}
|
|
|
|
|
Hi All,
Plz give code me code to take a difference between two date (difference must be in the days) one of them is present date other may be any.
Thanx in advance,
|
|
|
|
|
DateTime t = new DateTime(2007,07,17);
TimeSpan diff = DateTime.Today.Date.Subtract(t);
MessageBox.Show(diff.Days.ToString());
|
|
|
|
|
|
|
|
Hello everyone,
I am debugging and learning MSDN C# COM server sample.
http://msdn2.microsoft.com/en-us/library/aa645738(vs.71).aspx
I am using Regasm to generate Windows Registry scripts, here it is,
I can understand that for C# COM Server, since it is managed code, it will use mscoree.dll as the entry point. But I can not see anything related to the real codebase dll (CSharpServer.dll), which contains the real implementation of coclass and interface definition.
I am wondering how mscoree.dll find and invoke real implementation in CSharpServer.dll?
[code]
REGEDIT4
[HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation]
@="CSharpServer.InterfaceImplementation"
[HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation\CLSID]
@="{C6659361-1625-4746-931C-36014B146679}"
[HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}]
@="CSharpServer.InterfaceImplementation"
[HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="CSharpServer.InterfaceImplementation"
"Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
[HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32\0.0.0.0]
"Class"="CSharpServer.InterfaceImplementation"
"Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
[HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\ProgId]
@="CSharpServer.InterfaceImplementation"
[HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
[/code]
thanks in advance,
George
|
|
|
|
|
Hi!
Without looking into it too deeply: I think the assembly containing the CSharpServer has to be placed in the GAC. That's the codebase...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi mav,
Do you know how to check GAC? In MSDN, it is not mentioned that we need to register codebase into GAC and only Regasm is mentioned to be used.
regards,
George
|
|
|
|
|
ReHi!
There are several ways, for example using gacutil.exe.
If you're using regasm to register an assembly, you either have to give a codebase so that your code can be found or put the assembly into the GAC. Can't imagine a different way for .NET to find the assemblies...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks mav,
If you look at the output I posted in the question, there is no real codebase (actual dll which contains coclass implementation), only mscoree.dll.
So, I doubt if we are not using gacutil tool, how/whether the actual codebase could be found. Any comments?
regards,
George
|
|
|
|
|
Pleasure to help !!
|
|
|
|
|
Ok here's the skinny:
I want to allow users to create their own forms and they are familiar with html, hence they will write them in html.
It is basically data entry, but in varying formats.
I want to be access the information they put in the various input boxes through my windows application.
Is there a way to query the forms they create. In other words, can I have their forms in an html browser on one panel and have the submit button on another panel where the code would reside and I can see their entered data?
I appreciate any and all help!
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
Hi Sean,
May be I did not understand what you wanted, but I think Sharepoint is what you need. Or if you want an ASP.NET application, you will have to build a Custom CMS (content management system), where you can allow users to create something like articles and and then, when they submit the article, you can review them before it goes online....
If above does not makes any sense, I am sorry
|
|
|
|
|
I want to read the text from input objects, like a basic textbox for a name, in an html document but without it having to be "post"ed.
here's an example
Name:
Address:
Notice there is no submit button on the form.
Someone would fill in their name and a line of their address then click a System.Windows.Forms.Button
Here is my code (which doesn't work)
foreach(HtmlElement elt in browser.Document.Forms)
{
foreach(HtmlElement ch in elt.GetElementsByTagName("INPUT"))
{
MessageBox.Show("Text = " + ch.InnerText);
}
}
I was expecting it would show the text that was typed in but I keep getting a blank return.
Any help would be great!
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
You can try writing client side code, javascript may be.
In the textbox, you can register the script for key up (or some other as convenient)
txtBox.Attributes.Add("onKeyup",javascript:ShowText(this.ID)");
and javascript:
ShowText(param)
{
var textBox = document.GetElementByID(param);
alert(txtBox.Value);
}
hope that does that.
|
|
|
|
|
That lead me perfectly down the path I needed to go. Thanks RepliCrix!
For anyone else out there, the code I used was
C#
public form1()
{
InitializeComponent();
// Make the form the scripting object
browser.ObjectForScripting = this;
// Display the html file file.html
browser.Navigate(Application.StartupPath + "\\file.html");
}
void Button1Click(object sender, EventArgs e)
{
foreach(HtmlElement elt in browser.Document.Forms)
{
foreach(HtmlElement child in elt.GetElementsByTagName("INPUT"))
{
browser.Document.InvokeScript("SendTypedText", new object[] { child.Name });
}
}
}
public void ShowText(string ibox_name, string ibox_value)
{
MessageBox.Show(ibox_name + " = " + ibox_value);
//Of course now you can do whatever you need to do with the data
}
//file.html code
Box1:
Box2:
Box3:
//Send Back Input Values
function SendTypedText(param)
{
var thisForm = document.forms[0];
window.external.ShowText(param, thisForm[param].value);
}
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
hi looking for an open source LDAP server for use in conjunction with C#/.NET - any good suggestion besides openldap?
Correct me if I'm wrong, don't find a good number of documentation/tutorial with OpenLDAP, from perspective of a dot-net developer.
I'm using this for hierachical information storage - user/group, classification... etc...
Thanks in advanmce
devy
|
|
|
|
|
Hi,
I need some expert opinion. Assume that i need to display 3 shape(circle, rectangle and a triangle). I should be able to select any of them at one time to be drag and drop. So, should i draw these shape onto the form directly or should i save it in the bitmap and load the image. if using bitmap, each of the shape must be save separately?
Thanks
|
|
|
|