|
It's a bit unusual, but there's not such thing as a 'login form', it's all just HTML. You can do whatever you like.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi , my program has two date time pickers. a from-date and a to-date. I would like to imply certain rules, for instance, I dont want the picked dates to be more than 30 days apart, and I dont the from date to be higher than the to-date. I would also like to knowis there a way to link a controll to a query, I know how to do it in the ASP.Net Programming environment but the C# environment is a bit tricky.
Help would be greatly appriciated.
Thanx
Oliekrokenosterpikkelikkeastrysvoel
|
|
|
|
|
Chona1171 wrote: I know how to do it in the ASP.Net Programming environment but the C# environment is a bit tricky.
I'm not sure I follow. There's no way to do ASP.NET without C# or VB.NET, do you mean in VB ? So does this mean you're using winforms now ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sorry whmean to say was, in the Web development environment of Visual Studio, you can easily link any controll to a query , but in the C#(And all the other laguage) Development environment does not allow the same options.
Oliekrokenosterpikkelikkeastrysvoel
|
|
|
|
|
I want to set a string to a location on the hard drive. I would like to use a XML setting file but not 100% sure how to do this yet. So if you can help with that Great!
my current problem:
const string FilePath = ("C:\laptop\warrants.zip");
this line gives me 2 "Unrecognized escape sequence" errors
Is there a good resource for comparing files over the internet? My Main goal is to update a program on all my remote user's laptops when the program is updated on the LAN. My plan is to use the Webclient class to download the file over the internet, this update is a 60MB download so I can't have everyone download at the same time and I can not have the application downloading the file and doing the comparison on the laptops.
thanks for any ideas
|
|
|
|
|
I did some more searching and found that I needed an @ or \\ to make the string hold the \
any Ideas on the best way to space out the updates would be great, this will be my first production program.
|
|
|
|
|
As you found, you have two options. One is to use \\, and then you can use \" for quotes, \t for tab, etc. Or, you can use @, as in @"c"\laptop\warrants.zip". In this literal mode, "" equals ", and \ equals \.
Planker wrote: Is there a good resource for comparing files over the internet?
I use Araxis Merge, it's paid for itself many times over.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Planker wrote: I would like to use a XML setting file but not 100% sure how to do this yet
I define a typed dataset with one table in which i have two columns: 'key' and 'value'. (Add->NewItem->DataSet)
settings is the name of the dataset class
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Data;<br />
using System.IO;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace MyXmlSettings {<br />
public class Settings {<br />
public static readonly Settings Instance = new Settings();<br />
private settings dsSettings;<br />
<br />
private Settings() {<br />
dsSettings = new settings();<br />
}<br />
<br />
public void SaveSettings() {<br />
dsSettings.WriteXml(Application.StartupPath + @"\settings.xml");<br />
}<br />
<br />
public void LoadSettings() {<br />
string file = Application.StartupPath + @"\settings.xml";<br />
<br />
if(File.Exists(file))<br />
dsSettings.ReadXml(file);<br />
else<br />
SaveSettings();<br />
}<br />
<br />
public string GetSetting(string key, params string[] defVal) {<br />
DataRow row = dsSettings.setting.Rows.Find(key);<br />
if(row != null)<br />
return row[1].ToString();<br />
else if(defVal != null && defVal.Length > 0) {<br />
SetSetting(key, defVal[0]);<br />
return defVal[0];<br />
}<br />
return string.Empty;<br />
}<br />
<br />
public void SetSetting(string key, string value) {<br />
DataRow row = dsSettings.setting.Rows.Find(key);<br />
if(row == null) {<br />
row = dsSettings.setting.NewRow();<br />
row[0] = key;<br />
dsSettings.setting.Rows.Add(row);<br />
}<br />
row[1] = value;<br />
}<br />
}<br />
}<br />
<br />
dsSettings.WriteXml(path) generates a flat xml file.. but it works quite well for me
life is study!!!
|
|
|
|
|
hi guy i have question about mapping
for example:
i draw a letter like 'a' in a bitmap, then i have an 'a' letter in a file or somewhere else, how do i map the bitmap 'a' with the 'a' letter in a file?
thanks you so much
|
|
|
|
|
You can't. You need an OCR program to pull the 'a' back out of your bitmap, and turn it back into text.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi all,
can anybody tell me how to add the reference of Microsoft.Office.Tools.Word
in C# project?
thanks
regards,
praveen
|
|
|
|
|
well[^], it looks like you need the tools for the office system installed.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
thanks, i got and installed
praveen
|
|
|
|
|
hi everybody,
can anybody tell me how can we put a image over another image in ms word
through C#.I mean after inserting a image in word file through C# i have to
insert another image over previous image.How to do this please help me
regards,
praveen
|
|
|
|
|
Does Word even support this ? Or do you mean replace ( not merge ) the image ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
actually i have inserted a image of a windows now i want to put mouse icon image on some specific point over previously inserted image.i don't know whether word support this or not.if possible then please let me know.
thanks,
praveen
|
|
|
|
|
I don't believe so, no. If you can't do it in Word, I doubt you can do it by controlling Word.
You want to draw an icon as you move the mouse, or make a permanent watermark ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i have an icon image of mouse arrow i just want to put it somewhere over the image.
|
|
|
|
|
OK, if you want to merge it on once, perhaps you can retrieve the bitmap and draw your arrow on it.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You just have to change the properties of the images so that they can overlap. Normaly, when images are defined "in front of text", they are able to overlap. Then you just need to change the position of the images. Try to make it manualy by recording in a macro your action, then get the code and adapt it to offie automation. it should work.
David Domingues at webrickco@gmail.com. Feel free to visit http://webrick.athost.net/index.php
|
|
|
|
|
Good People,
Why is the following code not compiling:
<br />
Random myRandom = new Random();<br />
int iNumber = 0;<br />
iNumber = myRandom.Next(1, 8);<br />
It keeps telling me that:
Error 1: Invalid token '=' in class, struct, or interface member declaration
and in reference to the function "Next(...)" of class Random, it tells me:
Error 2: Invalid token '(' in class, struct, or interface member declaration
Furthermore, when I try to use myRandom auto-complete does not see it. I am truly puzzled since I have the following usings:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
I am truly puzzled about what's going on. Any help you can provide would be greatly appreicated. Below is the entire partial class for reference:
namespace Chris<br />
{<br />
public partial class Chris : Form<br />
{<br />
public Chris()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
Random myRandom = new Random();<br />
int iNumber = 0;<br />
<br />
iNumber = myRandom.Next(1, 8);<br />
<br />
bool shouldDraw = false;<br />
<br />
private void OnMouseDown(object sender, MouseEventArgs e)<br />
{<br />
shouldDraw = true;<br />
}<br />
<br />
private void OnMouseUp(object sender, MouseEventArgs e)<br />
{<br />
shouldDraw = false;<br />
}<br />
<br />
private void OnMouseMove(object sender, MouseEventArgs e)<br />
{<br />
if (shouldDraw)<br />
{<br />
Graphics myGraphics = CreateGraphics();<br />
<br />
myGraphics.FillRectangle(new SolidBrush(Color.FromArgb(250, 155, 59)), e.X, e.Y, 5, 5);<br />
<br />
myGraphics.Dispose();<br />
}<br />
}<br />
}<br />
}
|
|
|
|
|
BlitzPackage wrote: int iNumber = 0;
iNumber = myRandom.Next(1, 8);
This code needs to be in a method, you can't set a value outside of a method, except the way you did it first ( to 0 )
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks Christian, you're absolutely right!
|
|
|
|
|
Hello i am trying to override a listview's Items property i have created a new ListItems method that implements a custom UITypEeditor for ListViewItem allowing my to insert my own type that inherits from ListViewItem called ControlItem now sow far all of this seems to work properly however my problem is that when the designer serialized the newly created item it uses the wrong constructor
ControlItem controlItem1 = ((ControlItem)(new System.Windows.Forms.ListViewItem("")));
it is calling the constructor of the base class, is there a way for me to ovveride this behavior and tell it my own type to instantiate? i have tried the DesignerSerializationVisibility attribute but it does not seem to work.
here is the definition of the ListItems method
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor(typeof(ControlItemCollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
public ListView.ListViewItemCollection ListItems
{
get { return Items; }
}
i would appreciate any help that could be provided. thank you.
|
|
|
|
|
This doesn't really answer your question, but rather than use inheritance to add functionality to the ListView class, why not create a user control that simply consists of a fully-docked ListView? This way, you can expose a Items collection of any type you wish. Admittedly it's more work, but you end up with a better fitting control (rather than simply tacking on new specific behavior to a very generic control).
-Phil
|
|
|
|