|
i am trying to create a schedule control where you can add/edit/delete appointments, select
start and end hour, have a day or week view....
I have been doind some research on it but no luck
I hope some one can help me
Thanks in advance
|
|
|
|
|
there is a schedular control here on CP
http://www.codeproject.com/KB/custom-controls/schedule.aspx
(sorry chrome won't allow me to post it as a link )
|
|
|
|
|
plz check the below code.i am trying to drag a node from a tre view and drop it into a textbox
the code didnt show me any error but i coudnt drop the node to the textbox.
private void treeView2_DragEnter(object sender, DragEventArgs e)
{
treeView2.DoDragDrop(treeView2.Nodes, DragDropEffects.Copy);
}
private void textBox7_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Text))
e.Effect = DragDropEffects.Copy;
}
private void textBox7_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
textBox7.Text = e.Data.GetData(DataFormats.Text).ToString();
}
plz anybody tell me wat the error is
|
|
|
|
|
tracywitty wrote: if (e.Data.GetDataPresent(DataFormats.Text))
My first guess would be that Text data is not present. You can use tracing ( ) to see all the formats in the Data.
foreach (string s in e.Data.GetFormats())
Debug.WriteLine(string.Format("DragEnter: {0}", s));
led mike
|
|
|
|
|
If you're using sample code to figure out how to do drag/drop in a treeview, you need to do your best to follow that sample code EXACTLY.
One thing no documentation will ever tell you is that drag/drop actually invokes into the COM world under the covers, and any data errors or exceptions thrown there will never be seen by your code - it will just appear to not work and you won't know why.
In other words, you need to understand very clearly what you are doing when implementing drag/drop - it's relatively straightforward in .NET, but has some pitfalls you need to be aware of.
|
|
|
|
|
I am using 'ADOX.Catalog' namespace and the following code to create a new MS Access database.
Private Function CreateAccessDatabase() As Boolean
'-------------------------------------------------------
'This method is called to create a new Access database
'Required: NewDBConnectionString
'-------------------------------------------------------
Dim ADOXCatalog As New ADOX.Catalog
Try
If Me.NewDBConnectionString.Trim.ToString.Length = 0 Then Throw New Exception("Connection string is not specified")
'Call create method to create a new database
ADOXCatalog.Create(Me.NewDBConnectionString.Trim.T oString)
Return True
Catch ex As Exception
Throw ex
Return False
Finally
If Not ADOXCatalog Is Nothing Then
ADOXCatalog = Nothing
End If
End Try
End Function
The moment it created database, it is also leaving a .ldb file in the same directory. I don't want that .ldb file. If I tried to delete the file forcedly, it is passing an exception "The file is being used....". All the connection strings are properly closed.
Can anyone help me to remove this .ldb file.
|
|
|
|
|
The LDB file keeps track of all connections to the database. You cannot remove it. It will disappear as soon as the last connection to the database gets disconnected.
|
|
|
|
|
Hi ,
I am using .rdlc report in c# with reportviewer, when i run the applicaton it sows only one record in report.
can anyone hlp me out
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
|
Hello Friends,
I'm using a CheckedListBox in my project which is having checkboxes with their file name. An i want to show the checked file name into another ListBox. But I'm having some problems.
First, For checking a checkbox i've click double on a checkbox.So i'm not getting where should i place my code for checking the checkbox at a single click.........
Seconds, i've a variable sum=0 i want to add 1 in variable sum as the checkboxes are checked........... It's working fine but when i check my first record it shows 0 and when i check my second checkbox then it shows 1 but it must be 2 at the moment......................
|
|
|
|
|
First off, why don't you just have a button that will transfer all checked listboxes to the other listbox.
Second, this.chkListBoxs.CheckedItems.Count.
Regards,
Thomas Stockwell
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.
Visit my Blog
|
|
|
|
|
I want to develop an application which can enter username and password to another application, for example from my custom application on press of a button username and password placed into msn messenger's username and password if msn messenger is open and its login screen too.
Thanks
|
|
|
|
|
Good luck.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Great idea. When you have it working you could post an article and share your knowledge with the rest of us.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i'm working on a database client. i would like users to be able to view multiple tables and run multiple queries in tabs.
each tab will contain a text box (query input) a button (not so necessary) and the datagrid (to display results.)
how do i go about this? here's what i have, but it works only the first time. the others just open blank tab pages without the controls. quess the control names have an effect there...
private void newQueryToolStripMenuItem_Click(object sender, EventArgs e)
{
tabMain.TabPages.Add("1", "New Query", "app_tables");
SplitContainer split = new SplitContainer();
split.Dock = DockStyle.Fill;
split.FixedPanel = FixedPanel.Panel1;
split.Orientation = Orientation.Horizontal;
TextBox text = new TextBox();
text.Dock = DockStyle.Fill;
text.Multiline = true;
text.ScrollBars = ScrollBars.Both;
split.Panel1.Controls.Add(text);
DataGrid dgrid = new DataGrid();
dgrid.Dock = DockStyle.Fill;
split.Panel2.Controls.Add(dgrid);
tabMain.TabPages["1"].Controls.Add(split);
tabMain.TabPages["1"].ImageKey = "app_server";
this.PerformLayout();
}
|
|
|
|
|
nevermind... got it figured out. added a name property to the controls using GIUD.
private void newQueryToolStripMenuItem_Click(object sender, EventArgs e)
{
string key = Guid.NewGuid().ToString();
tabMain.TabPages.Add(key, "New Query", "app_tables");
SplitContainer split = new SplitContainer();
split.Name = key;
split.Dock = DockStyle.Fill;
split.FixedPanel = FixedPanel.Panel1;
split.Orientation = Orientation.Horizontal;
TextBox text = new TextBox();
text.Name = key;
text.Dock = DockStyle.Fill;
text.Multiline = true;
text.ScrollBars = ScrollBars.Both;
split.Panel1.Controls.Add(text);
DataGrid dgrid = new DataGrid();
dgrid.Name = key;
dgrid.Dock = DockStyle.Fill;
split.Panel2.Controls.Add(dgrid);
tabMain.TabPages[key].Controls.Add(split);
tabMain.TabPages[key].ImageKey = "app_server";
this.PerformLayout();
}
now is time to add event handlers.
|
|
|
|
|
I want to know how to close the windows form when Esc button is pressed.
Rangasamy
|
|
|
|
|
Hi Ragu,
Firsy you have to change this property on form
KeyPreview = true
You can change this on the form properties in designer or in the form load method:
private void Form1_Load(object sender, EventArgs e)
{
this.KeyPreview = true;
}
And then, you only have to do this:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
this.Close();
}
That´s it?
-----
LeandroAB
|
|
|
|
|
Set the form's CancelButton property to a button that will close the form.
"Multithreading is just one damn thing after, before, or simultaneous with another." - Andrei Alexandrescu
|
|
|
|
|
Hello friends
I have made a windows explorer , Which will show all the folders in the computer
Now on clicking a folder i want to get the images under it
I am able to get the list of images
The problem is displaying
I want to make a scrollable image viewer
I will be very much thankful if any suggestions or code is provided
thanks
Happy programming
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
I couldn´t undertand perfectly what re you trying to do, but i can suggest the listview component.
You can show the files into it like the windows explorer, setting icons and all.
-----
LeandroAB
|
|
|
|
|
|
How can we connect a VB.NET application with a bar code reader and how we can use the data which is read by the bar code reader in our application.
Thanks,
Sayuj O
|
|
|
|
|
sayuj wrote: How can we connect a VB.NET application with a bar code reader
Most bar code readers act just like a keyboard. Scan a barcode and it "types" the code just like a human would be doing.
sayuj wrote: how we can use the data which is read by the bar code reader in our application
Uhhh... Wouldn't that be dictated by your application's requirements??
|
|
|
|
|
Anyone know what to do about a BadImageFormatException in System.Windows.Forms.dll? My program worked just fine yesterday, then I changed a couple of string constants and a timeout value in a serial communications class, and now a timer.onTick event gives me this exception, before any of the changes I made are even used. Any ideas? All I know is that a BadImageFormatException means "something" is corrupted. I've tried cleaning and rebuilding my solution, reverting to the version from yesterday (still breaks), and compiling yesterday's version on another machine. All the same problem.
One thing that is odd. It works just fine in debug mode through the IDE. But release mode through the IDE, and both debug and release installs give me this exception. Also, I am not using generics (another cause I've found of this exception). I am also not loading any assemblies through my code.
Any help would be greatly appreciated,
Brandon
modified on Tuesday, October 14, 2008 4:57 PM
|
|
|
|